PadLex / SvgToGcode

MIT License
46 stars 27 forks source link

add flattening option #17

Open EvansPM opened 3 years ago

EvansPM commented 3 years ago

From svg:

image

I got: image

It's perfect, make absolutly sens, love it! But would be nice to have option to get a flatten lines when curse are closed and filled. Or is it title bit out of scope?

PadLex commented 3 years ago

Hi Evans, if I understand correctly, you'd like fill-in the curves. Unfortunately, as you guessed, that's a little outside the scope of this project.

What you're looking for is an image engraving software. The key distinction is that svg-to-gcode traces paths from an SVG. What you're looking for converts an image's pixel values into dots or lines.

I've written a script for that but I haven't used it in a while so I'm not sure if it works. Besides it's a little bit of a mess. I think you're better exporting your SVG to png and then looking for a YouTube tutorial on image engraving.

Good luck!

EvansPM commented 3 years ago

Not necessary fill it but use one line like in the original image, i was exploring "Skeletonization" which can make good job but when come back to your SvgToGcode expecting geting a line, I always get something roundded. Anyway thanks.

PadLex commented 3 years ago

I'm afraid I still don't understand what you are trying to do. Would you like the curves to become straight lines?

EvansPM commented 3 years ago

yes a straight lines.