KrabzCAM, generate g-code from svg

Hi, the path-element in your svg contains a list of line-segments in some kind of random order.
KrabzCAM will do an attempt to stitch these segments together into continous paths, but this only works when the line endpoints are very close.
In your case the distance in some cases are too far (as shown below).

As you can se from the text “8 path(s) selected…”, the artwork is divided into 8 parts instead of the intended 2. None of the paths are closed either, so you will not be able to use profile or pocket operations.

You can fix this in inkscape using the ‘merge nodes’-button
, but I guess this will be quite tedious for large designs…
Maybe use a different tool, or use the design tool differently…I don’t know.

I tried to merge the nodes manually myself, and then everything seems to be working…(svg below)


Hope you find this helpful

Thank you for inspecting the SVG. The lines were initally constructed by setting an origin then sequentially going a distance with each vector beginning at the end point of the prior vector, all made as a “single line” in LibreCAD. Both sawtooths were generated as a single sequence, but the two straight lines and the first and last verticles were done in individual steps. I’ll make a close inspection of the line segments there and assure that all the vertices are contiguous, if that still fails, I’ll get back to you, but I expect between a rigorous construction of the DXF and the “merge-nodes” in Inkscape, the problem will be fixed.

Hi again. While using the method you advised I still cannot make g-code. As before, using Firefox 102.13.0esr with Debian 12, Inkscape v1.2 and LibreCAD 2.2.0 to make a new simple vector set line drawing as a DXF passed to Inkscape fails. You can see the Inkscape file in the attached screenshot. The new drawing is made in LibreCAD in one pass as a single line with snapping to each vertex-there are no discontinuites in the DXF vector set. Opening the DXF in Inkscape then using “Edit Path By Nodes”, selecting the entire DXF, invoking “Join Selected Nodes”, then grouping the DXF and saving as a “plain svg” makes only 42 bytes of g-code in KrabzCAM. KrabzCAM has the same warning message in all permuations: “Warning: SVG contained ignored invalid paths” and in all cases declares the path does not close (now some 32 passes, each trying different mixes of Node editing, grouping, and file formats: DXF,SVG,PDF). Doing the same Inkscape steps with a PDF made from the DXF also fails.

I will have to attach the SVG in a second message

The SVG:

Hi, seems like something went wrong with the merging of the nodes: :slight_smile:

Everything is also imported as one open path. To be able to use profiles and pockets the paths needs to be closed and not self-intersecting.

Seems like you try to create 2 object with the same shape. Maybe it would be easier to start with just one, and then add the other one afterwards when you got it working.

You can also easily copy and mirror objects in KrabzCAM.