Scott-Cooper / Drawbot_image_to_gcode_v2

Creates gcode for use on drawbots
http://dullbits.com
GNU General Public License v3.0
165 stars 55 forks source link

[feature request] save as svg or dxf #1

Closed NoPinky closed 7 years ago

NoPinky commented 7 years ago

Hello, I really like the style of your generated graphics. Really great work! Now I would like to print it with a penplotter. Can you please provide a function to save the graphics as a svg or dxf, so one can do whatever one wants with the graphic, like plotting it with InkScape (HPGL extension in InkScape). I would try to implement it myself in a fork, but I've never programmed Processing before. Thank you in advance!

Scott-Cooper commented 7 years ago

Hey NoPinky, I've committed a version that can export SVG files. If you find problems, please let me know.

NoPinky commented 7 years ago

Thank you, I will test it and report back if I find anything.

NoPinky commented 7 years ago

Hello, I finally got time to test the svg export feature that you packed with the gcode generation. It seems like it does not work: the result seems to be a densly squished version of what it actually should be (see attached image). And it seems like your function exports a svg file that is the same as the pdf file: all pens combined, not 'what you see is what you get', so the result is a big ass file for a SVG with all the pens/layers. I used the girl-face-blue-eyes-makeup.jpg in your included sample file and the svg was 7MBytes. I opened the file in Inkscape, Edge browser, IE, Firefox... All render the same result. So it is not a problem with Inkscape.

girl_face_clipped_svg

I used processing-3.3.4 for my test run. What version do you use? And could you produce correct results with your svg export?

I think it would be better if the svg-export also exports all pens seperately like like the g-code-export. The file size would be smaller and it would give me and others the chance to change pens and do other stuff.

vovboc commented 6 years ago

Exactly the same problem. Picture as on my monitor.