Inkscape.org
Using Inkscape with Cutters/Plotters Gcode Generation in Inkscape
  1. #1
    AnOther AnOther @AnOther

    Hi, All,

    I'm using the Gcode extension in Inkscape to generate Gcode files for a small CNC router, and after making loads of mistakes learning my way around (and being helped by this forum - Inkscape is brilliant for what I need) I have another issue. I need to produce some printed circuit boards by etching them with the router (long story), and started by producing a drawing of what I wanted in LibreOffice Draw, and exporting it as an SVG file. Basically the layout is simply a number of copper 'lands' on the board, so the drawing is just a series of lines between the lands which will be milled out. As far as I can determine, the resulting exported SVG files appear to only consist of these lines. (when displayed with an image viewer - Pix in Linux)

    I then import this SVG file into Inkscape, and go through the usual procedure to generate a Gcode file - Object to Path, Tools Library, Orientation Points and Path to Gcode (all from the Gcode Extension). This all appears to work fine, and I end up with a Gcode (.ngc) file.

    However, this file appears to have some 'oddities': almost every Gcode 'block' is duplicated - if I run the file on the router, it carefully mills the shape I drew, then goes round it again. Its not every block, and there appears to be no 'pattern' to which block is duplicated that I can see. As well as this, every 'object' on the board is surrounded by a rectangle - that is, if the drawing shows a hexagon (for example), the Gcode for the hexagon is in the .ngc file, and it is followed by Gcode for a rectangle around the hexagon - the sides of the rectangle touch the hexagon. When I examine the Gcode file, these rectangles are actually indicated by a comment line (start cutting rect pathIDXXXX). If I edit these blocks out, and the 'duplicate' blocks mentioned above, then the file is fine and the CNC router will cut exactly what I want - but it has taken me an hour or so to edit the file, so a bit annoying to have to do.

    I cannot find anywhere any information on why these duplicate blocks, or the surrounding rectangle blocks are defined or produced - I have to say I am not 100% sure where they originate, (LibreOffice or Inkscape) except that I cannot see any trace of them in LibreOffice Draw (They are definitely not 'hidden' on a different layer of the LibreOffice SVG file - I checked) - so can anyone make any helpful suggestions please as to why this happens?  I should explain that the reason I produce the original drawings in LibreOffice is that all other related documentation is prepared in LibreOffice, and it appeared to be perfect for what I needed because I could export an SVG file for use in Inkscape, without messing about with various conversion applications.

    The whole system is running under LinuxMint 20.2.

    Keith