svg2gcode icon indicating copy to clipboard operation
svg2gcode copied to clipboard

Can't convert SVG properly

Open Harvie opened this issue 7 years ago • 3 comments

I've tried two SVGs so far and both failed to convert properly and completely. I even tried to use inkscape to cleanup, simplify and convert SVGs to splines. without any succes. I attached SVGs here: svg_test.zip Here is preview of what happend:

SVG: image GCode (fliped and incomplete): image

SVG: (incomplete and possibly fliped) image Gcode: image

Also note that there's G1 between shapes. There should be G0 between shapes so we don't cut between them.

Harvie avatar Jul 11 '18 13:07 Harvie

i've partialy fixed the G0/G1 controversy: image

Harvie avatar Jul 13 '18 23:07 Harvie

After some more processing in inkscape and flipping resulting gcode upside down: image

To flip the code i did this:

- print "G%d X%0.1f Y%0.1f" % (feed, scale_x*x, scale_y*y)
+ print "G%d X%0.1f Y%0.1f" % (feed, scale_x*x, -scale_y*y)

In inkscape i needed to do following:

Object -> Ungroup (shift+ctrl+g) Path -> Break apart (shift+ctrl+k)

Is there way to do this automaticaly in svg2gcode?

Harvie avatar Jul 13 '18 23:07 Harvie

But still this does not work for second file. It surely improved:

image

But still there's half of the file missing. Exactly there are 2 incomplete shapes and 5 shapes missing and there are 5 pairs of preamble+postamble in the generated file indicating that svg2gcode is aware of these 5 shapes. But the g-code between pre/postambles is missing.

Harvie avatar Jul 14 '18 00:07 Harvie