Inkscape.org
Using Inkscape with Cutters/Plotters GCode Tools duplicates each path
  1. #1
    Justin K Justin K @justin.king

    Everytime I use the Gcodetools -> Path to Gcode, I get a ton of duplicated paths, and I can't seem to figure out why. 

    I've done my own research, and found a few other posts describing similar issues, but they were all from years ago on older versions, and the suggested workarounds don't seem to fix it for me.

    Example: https://graphicdesign.stackexchange.com/questions/137666/inkscape-causing-tool-paths-to-be-doubled-duplicated?newreg=6efa833dc3db4565a3ce237c9b96f4ee

    I was originally using version 1.1, the problem was happening there, so I tried updating to the latest version (1.3.2) but the problem still occurs. Perhaps I'm just doing something wrong?

    Thanks in advance for any help!

     

    Version: Inkscape 1.3.2 (091e20e, 2023-11-25, custom)

    Repro steps:

    1. Add a star
    2. Path -> Object to path
    3. Add Gcode orientation points
    4. Run Path to Gcode

    My resulting Gcode file looks like this, it has probably 20 or so blocks that are all the exact same, just for path1.

     

    (Start cutting path id: path1)

    (Change tool to Default tool)

     

    G00 Z23.000000

    G00 X38.903308 Y284.167702

     

    G01 Z17.500000 F100.0(Penetrate)

    G01 X28.204269 Y289.607511 Z17.500000 F400.000000

    G01 X17.580430 Y284.027084 Z17.500000

    G01 X19.536946 Y295.711129 Z17.500000

    G01 X10.855259 Y303.919426 Z17.500000

    G01 X22.763491 Y305.700753 Z17.500000

    G01 X28.021753 Y316.354187 Z17.500000

    G01 X33.424930 Y305.771062 Z17.500000

    G01 X45.356401 Y304.146950 Z17.500000

    G01 X36.787516 Y295.824892 Z17.500000

    G01 X38.903308 Y284.167702 Z17.500000

    G00 Z23.000000

     

    (End cutting path id: path1)


     

    (Start cutting path id: path1)

    (Change tool to Default tool)

     

    G00 Z23.000000

    G00 X38.903308 Y284.167702

     

    G01 Z17.500000 F100.0(Penetrate)

    G01 X28.204269 Y289.607511 Z17.500000 F400.000000

    G01 X17.580430 Y284.027084 Z17.500000

    G01 X19.536946 Y295.711129 Z17.500000

    G01 X10.855259 Y303.919426 Z17.500000

    G01 X22.763491 Y305.700753 Z17.500000

    G01 X28.021753 Y316.354187 Z17.500000

    G01 X33.424930 Y305.771062 Z17.500000

    G01 X45.356401 Y304.146950 Z17.500000

    G01 X36.787516 Y295.824892 Z17.500000

    G01 X38.903308 Y284.167702 Z17.500000

    G00 Z23.000000

     

    (End cutting path id: path1)

    ....

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    Not reproduced here...  Inkscape 1.3.2 (091e20e, 2023-11-25),  OS version:       Windows 10 22H2

     

    1. Describe your OS (your computer's Operating System: Mac/Windows/Linux/etc. & version).
    2. Describe if Inkscape was newly installed, or upgraded from an earlier version.
    3. Describe the version of Inkscape and the installer you used (the file you downloaded from the website: .msi/.exe/.zip/other )
    4. Describe any special hardware being used, like tablet/stylus, external drives or multiple monitors.
    5. Describe any helper/assistive programs or keyboard modifiers (macros, languages, etc.).

    Bonus points, if you:

    • Attach* a screenshot of the issue.
    • Attach* an example SVG file that has the issue.

     

  3. #3
    Rudy Sneppe Rudy Sneppe @Gij_Kieken

    Hey Justin K,

    What is your setting for depth step in default tool?

     

    Tool 01
  4. #4
    Justin K Justin K @justin.king

    @Rudy, my depth step was set to 1.0, I switched it to 10.0 and that reduced the number of duplicates, setting it to 20 finally only gave me the expected result. I don't understand how that works... 

    A little background about my setup, I am engraving on a piece of plywood. Z0 is the base of the printer, and then I go up to my safe height of 23mm, and want to engrave at 17.5mm. Not really sure what the depth step means for me, I can manually adjust the depth of my router using the motors in increments of 0.1, 1, or 10 mm, so I would think my depth step should be 0.1, 20 doesn't make any sense to me, but I guess if it works around the problem I can live with that...

    I tried switching my depth step to 0.1 (which seems like it should be to me), ran it again, and got a gcode file with a ton of duplicate entries all for the same star shape. I've attached a screenshot of my setup, as well as the .svg and the .gcode file that it gave me.

    @Tyler

    - Windows 11 Home 23H2

    - Updated from 1.1 to 1.3.2 (091e20e, 2023-11-25, custom) but the problem was also happening on 1.1. 

    - Downloaded the Windows 64 bit .msi from Inkspace site

     

    Starscreenshot
    Star
  5. #5
    Justin K Justin K @justin.king

    I even tried wiping all of my settings (at least I'm assuming) by deleting %appdata%\inkscape, and the problem still persists. I don't understand how my setup could be different from others. 

    I am literally trying to go "scorched-earth" and start from a completely clean state. Is there anything else I could try to get into a clean state?

  6. #6
    Justin K Justin K @justin.king

    If I run it again and have my gcode depth function set to the default of "d", it works fine. The problem is when I set my depth to 17.5. I think I understand what it's doing now, it thinks my tool can only move in increments of 1mm, so it's trying to produce a set of points for each mm between 23 and 17.5, it's just not very obvious at first that that's what's happening because the Z value for each set is 17.5.

    So my takeaways are

    1. The "depth step" setting of the tool seems like it should be interpreted as the MAX step size, not the MIN step size.
    2. The underlying code seems to assume that the depth will be negative. For positive depths, I need to set my tool depth step set to a value greater than or equal to my depth setting, and then it works fine

     

    Unless I'm just doing something wrong, I'm assuming this is just a "quirk" of the software, and I can work around it. My next step is going to be figuring out why the Area tool for Gcode isn't working correctly, and now I'm wondering if the positive depth value has something to do with that as well. 

     

     

  7. #7
    Tyler Durden Tyler Durden @TylerDurden

    It is common for Z moves to be negative. CNC machining often follows the right-hand rule. https://en.wikipedia.org/wiki/Right-hand_rule

  8. #8
    Justin K Justin K @justin.king

    I understand this is common practice. The software just doesn't work very well with admittedly somewhat unusual setup (as described in my earlier post). Thank you for your help

  9. #9
    Rudy Sneppe Rudy Sneppe @Gij_Kieken

    @Justin,

    This link maybe of interrest to you <https://www.youtube.com/watch?v=yUTVOTDbDRI>

     

  10. #10
    Rudy Sneppe Rudy Sneppe @Gij_Kieken

    The way I do it.

    When your plywood is fixed, load the G-code file.

    Manualy go to the desired X & Y position where you want to engrave the star.

    Then carefully set the Z depth so the tip of your flute just touches the workpiece.

    In the console type < G92 X0 Y0 Z0 >

    Finaly, hit Run.

    %
    (Header)
    (Generated by gcodetools from Inkscape.)
    (Gij Kieken)
    (Default startpoint is bottom left.)
    (Header end.)
    G90
    G21 (All units in mm)
    
    (Pass at depth -0.5)
    (Start cutting path id: path815)
    (Change tool to Default tool)
    
    G00 Z 8.0000
    G00 X 31.3310 Y 2.6323
    M3 S1000
    G01 Z -0.5000 F 100.0000(Penetrate)
    G01 X 21.5941 Y 11.5392 Z -0.5000 F 100.0000
    G01 X 11.5072 Y 3.0306 Z -0.5000
    G01 X 14.3523 Y 15.9165 Z -0.5000
    G01 X 1.9402 Y 20.3978 Z -0.5000
    G01 X 14.5223 Y 24.3768 Z -0.5000
    G01 X 12.1971 Y 37.3665 Z -0.5000
    G01 X 21.9341 Y 28.4596 Z -0.5000
    G01 X 32.0210 Y 36.9682 Z -0.5000
    G01 X 29.1758 Y 24.0823 Z -0.5000
    G01 X 41.5879 Y 19.6011 Z -0.5000
    G01 X 29.0058 Y 15.6221 Z -0.5000
    G01 X 31.3310 Y 2.6323 Z -0.5000
    G00 Z 8.0000
    M5
    (End cutting path id: path815)
    
    
    (Pass at depth -1.0)
    (Start cutting path id: path815)
    (Change tool to Default tool)
    
    G00 Z 8.0000
    G00 X 31.3310 Y 2.6323
    M3 S1000
    G01 Z -1.0000 F 100.0000(Penetrate)
    G01 X 21.5941 Y 11.5392 Z -1.0000 F 100.0000
    G01 X 11.5072 Y 3.0306 Z -1.0000
    G01 X 14.3523 Y 15.9165 Z -1.0000
    G01 X 1.9402 Y 20.3978 Z -1.0000
    G01 X 14.5223 Y 24.3768 Z -1.0000
    G01 X 12.1971 Y 37.3665 Z -1.0000
    G01 X 21.9341 Y 28.4596 Z -1.0000
    G01 X 32.0210 Y 36.9682 Z -1.0000
    G01 X 29.1758 Y 24.0823 Z -1.0000
    G01 X 41.5879 Y 19.6011 Z -1.0000
    G01 X 29.0058 Y 15.6221 Z -1.0000
    G01 X 31.3310 Y 2.6323 Z -1.0000
    G00 Z 8.0000
    M5
    (End cutting path id: path815)
    
    (Footer)
    M5
    G00 X0.0000 Y0.0000
    M2
    (end)
    %

     

     

    Pathtogcode
    Orientatiepunten
    Toolstar