• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

rotate/skew/resize coordinate system

Scheduled Pinned Locked Moved Unsolved
CNC
4
25
1.2k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    arhi @deckingman
    last edited by 29 Jun 2020, 15:13

    @deckingman said in rotate/skew/resize coordinate system:

    @arhi Probably not but is axis skew compensation any good for you ? https://duet3d.dozuki.com/Wiki/Gcode#Section_M556_Axis_skew_compensation

    great, skew is one of the things I want to compensate too. on large boards it happens that film stretches unevenly, especially if you make a board yourself and print on fscking samsung printer that will stretch the paus in length 😞 ... so hitting feducials with skew compensation should work .. need to check how it works with examples. I know TT printers use something like that (not trough g-code) to compensate for messed up mechanics

    1 Reply Last reply Reply Quote 0
    • ?
      A Former User @deckingman
      last edited by 29 Jun 2020, 15:22

      @deckingman said in rotate/skew/resize coordinate system:

      @bearer said in rotate/skew/resize coordinate system:

      @deckingman said in rotate/skew/resize coordinate system:

      axes did not necessarily move at right angles to each other.

      correct; so if the machine does move at right angles and you adjust it, it will not rotate, but change the angle to be obtuse or acute instead - causing non-linearity.

      I can't really be ars*d to think about it, but if you have a square and apply an orthagonal offset to X and the same offset to Y, don't you end up with the same square but rotated? How is it non-linear?

      because if you do M556 S100 X-0.512 Y-0.512 Z0. then X-0.512 causes the right angle at he XY plane to become slightly acute, and Y-0.512 causes the same to happen to the YZ plane, the Y command doesn't change in relation to X, only Z.

      1 Reply Last reply Reply Quote 0
      • undefined
        arhi @deckingman
        last edited by 29 Jun 2020, 15:25

        @deckingman said in rotate/skew/resize coordinate system:

        @arhi Is there any way that you could model the object as if it was going to be printed, then use a slicer to rotate it on the build plate and generate the required move co-ordinates?

        For any specific situation, everything is possible given time and energy. ATTM I'm thinking theoretically as the "big" mill I have (it's tiny compared to mills out there but it's much bigger than my MF70 conversion 😄 ) is ATTM out of operation due to linuxCNC computer that was driving it (via MESA card over ethernet) is dead. So now I have options

        • [0] ignore it (most probably what's going to happen as I'm pressed with time, but I can "think" about solution in free time)
        • [1] rebuild another PC for linuxCNC and reconfigure everything from scratch
        • [2] make a small GRBL on STM32F103 (there's a port, ppl say it works nice)
        • [3] make a quick smoothieboard compatible board and run smoothie in GRBL mode (as I do for my MF70 conversion but with real smoothieboard), it's easy as I already have big external drivers and power and everything else needed for that CNC
        • [4] get duet3 and dump these ugly drivers I have as duet3 can supply required 4A for these motors

        1 is something I'm trying to avoid as I don't have room for that PC and monitor and ..
        2,3 are cheap and I already have everything I need to make it work but I'm trying to unify as much as I can and since I started migrating stuff to duet..
        4 is expensive but makes sense in the long run

        Now this "rotation" and "resize" I have no clue if this can be done with GRBL/Smoothieware, but would be a good incentive to move to Duet3 😄

        So, back to the question, I have e.g. a g-code made for a PCB drilling, there's zero chance I can position that PCB ideally square on the bed so I need to be able to at least rotate but in most cases also to resize coordinate system. Yes I can manually measure, calculate and write a small piece of code to redo the coordinates in the g-code, but that's not practical. I can also do an octoprint plugin to do that on the fly, and if I go smoothieware/grbl way in case they don't support rotation I'll do just that, but no point of running octoprint + plugins with RRF, not a big point of spending the $$$ for duet then

        ? 1 Reply Last reply 29 Jun 2020, 15:35 Reply Quote 0
        • undefined
          jay_s_uk
          last edited by 29 Jun 2020, 15:34

          @arhi or run RRF on an LPC board (e.g. SKR 1.4 or MKS SGen L) with your external drivers

          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

          1 Reply Last reply Reply Quote 0
          • ?
            A Former User @arhi
            last edited by 29 Jun 2020, 15:35

            @arhi said in rotate/skew/resize coordinate system:

            So, back to the question, I have e.g. a g-code made for a PCB drilling, there's zero chance I can position that PCB ideally square on the bed so I need to be able to at least rotate but in most cases also to resize coordinate system. Yes I can manually measure, calculate and write a small piece of code to redo the coordinates in the g-code, but that's not practical.

            i used to have a camera to align to one mounting hole drill, it deep enough to put a dowel pin in it, and align the other corner pivoting one the pin before clamping it down for good. If you can eyeball it without the cam then maybe that'll work?

            undefined 1 Reply Last reply 29 Jun 2020, 15:38 Reply Quote 0
            • undefined
              arhi
              last edited by 29 Jun 2020, 15:35

              btw linuxCNC for e.g. don't have G68 but has G10

              http://www.linuxcnc.org/docs/2.6/html/gcode/gcode.html#sec:G10-L2_

              that allow rotating one of the existing coordinate systems around Z axes

              1 Reply Last reply Reply Quote 0
              • undefined
                arhi @A Former User
                last edited by 29 Jun 2020, 15:38

                @bearer said in rotate/skew/resize coordinate system:

                i used to have a camera to align to one mounting hole drill, it deep enough to put a dowel pin in it, and align the other corner pivoting one the pin before clamping it down for good. If you can eyeball it without the cam then maybe that'll work?

                I still have camera (want to replace it btw) and it works ok when I want to mill the pcb, I do not move the pcb from the bed and all cool, but if I etch the pcb and wanna drill holes and cut slots it's PITA .. can be done but really PITA 😞 ... I would like to have it done "properly" with feducials, and with linuxCNC for e.g. G10 L2 will get the job done for rotations. The scaling is not that important but is a nice to have

                1 Reply Last reply Reply Quote 0
                • ?
                  A Former User
                  last edited by 29 Jun 2020, 15:44

                  flatcam can probaly do the translation on the drill file, and with DSF (on both duet2 and 3 now) you might be able to use https://forum.duet3d.com/topic/13194/dsf-extension-exec-on-mcode-was-shutdown-sbc to automate it?

                  undefined 1 Reply Last reply 29 Jun 2020, 16:05 Reply Quote 0
                  • undefined
                    arhi @A Former User
                    last edited by 29 Jun 2020, 16:05

                    @bearer said in rotate/skew/resize coordinate system:

                    flatcam can probaly do the translation on the drill file

                    Not worth it, that's situation where I go to the mill, place pcb there, measure, read measurements, load into flatcam, generate code for that board, put new board, measure, generate new code... not really something I wanna do.

                    I wanna do openCV recognise feducial - mark, find another one, mark, rotate, size, mill/drill.
                    Need to check if G10L2 works on smoothie properly, I think it does

                    , and with DSF (on both duet2 and 3 now) you might be able to use https://forum.duet3d.com/topic/13194/dsf-extension-exec-on-mcode-was-shutdown-sbc to automate it?

                    DSF is IMO long way still.. we'll see

                    ? 1 Reply Last reply 29 Jun 2020, 16:14 Reply Quote 0
                    • ?
                      A Former User @arhi
                      last edited by 29 Jun 2020, 16:14

                      @arhi said in rotate/skew/resize coordinate system:

                      I wanna do openCV recognise feducial - mark, find another one, mark, rotate, size, mill/drill.

                      thats what I was thinking, using flatcam on the command line to do the rotation should be a walk in the park after having done the other bits.

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        arhi
                        last edited by 29 Jun 2020, 16:15

                        this grbl mode is not very familiar 😞 /me need to go back to school 😞

                        G55
                        ok
                        b'$G\n'
                        [GC:G0 G55 G17 G21 G90 G94 M0 M5 M9 T0 F200.0000 S0.8000]
                        ok
                        G56
                        ok
                        b'$G\n'
                        [GC:G0 G56 G17 G21 G90 G94 M0 M5 M9 T0 F200.0000 S0.8000]
                        ok
                        G56
                        ok
                        b'$G\n'
                        [GC:G0 G56 G17 G21 G90 G94 M0 M5 M9 T0 F200.0000 S0.8000]
                        ok
                        $G
                        [GC:G0 G56 G17 G21 G90 G94 M0 M5 M9 T0 F200.0000 S0.8000]
                        ok
                        G0X5F200
                        ok
                        b'$G\n'
                        [GC:G0 G56 G17 G21 G90 G94 M0 M5 M9 T0 F200.0000 S0.8000]
                        ok
                        G56
                        ok
                        b'$G\n'
                        [GC:G0 G56 G17 G21 G90 G94 M0 M5 M9 T0 F200.0000 S0.8000]
                        ok
                        G10 L2 P0 X30 Y60
                        ok
                        b'$G\n'
                        [GC:G0 G56 G17 G21 G90 G94 M0 M5 M9 T0 F200.0000 S0.8000]
                        ok
                        G0 X10 F200
                        ok
                        b'$G\n'
                        [GC:G0 G56 G17 G21 G90 G94 M0 M5 M9 T0 F200.0000 S0.8000]
                        ok
                        1 Reply Last reply Reply Quote 0
                        • undefined
                          arhi
                          last edited by 29 Jun 2020, 16:34

                          darn thing always return OK no matter if it's supported or not 😞 ...

                          anyhow tested G10L2 works for offsets but "rotation around Z" is ignored 😞 on smoothie in grbl mode and on grbl and turbogrbl too

                          1 Reply Last reply Reply Quote 0
                          23 out of 25
                          • First post
                            23/25
                            Last post
                          Unless otherwise noted, all forum content is licensed under CC-BY-SA