Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't convert SVG properly #4

Open
Harvie opened this issue Jul 11, 2018 · 3 comments
Open

Can't convert SVG properly #4

Harvie opened this issue Jul 11, 2018 · 3 comments

Comments

@Harvie
Copy link

Harvie commented Jul 11, 2018

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 added a commit to Harvie/svg2gcode that referenced this issue Jul 13, 2018
@Harvie
Copy link
Author

Harvie commented Jul 13, 2018

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

@Harvie
Copy link
Author

Harvie commented Jul 13, 2018

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
Copy link
Author

Harvie commented Jul 14, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant