AbhyudayaSharma / image2gcode

A Node.js web-app for converting any JPEG or PNG image to CNC GCode
MIT License
7 stars 5 forks source link

Gcode generated fills the objects and not only the boundry #3

Open Tarun-Karthik opened 5 years ago

Tarun-Karthik commented 5 years ago

For any basic shape like square, cirlc etc. the gcode generated is a filled element. How to get gcode that draws only the boundry

AbhyudayaSharma commented 5 years ago

What kind of image are you using for generating the GCode? Please upload the image so that I can test it too.

Tarun-Karthik commented 5 years ago

i am using a png,jpg image for the conversion plotter 39

Tarun-Karthik commented 5 years ago

do i have to configure anything to make it generate only the boundary and not fill the entire element

AbhyudayaSharma commented 5 years ago

Can confirm the behavior. This seems like a bug in em/svg2gcode which is used to generate the gcode for the selected image.

AbhyudayaSharma commented 5 years ago

Don't know how it isn't working. The test case for lines.jpg works fine and gives output for the boundaries. Thanks for reporting the issue. I don't have the time right now but will try to fix it as soon as possible. It would be really great if you could help me out.

Gupta-Shreya commented 5 years ago

To fix the issue remove the "path = path.fillPath(this.toolDiameter, this.precision);" line from /image2gcode-master/image2gcode-master/node_modules/gcanvas/lib/gcanvas.js. I have checked it and also tested it. after removing the line it only generates code for the boundary

AbhyudayaSharma commented 5 years ago

This issue should be open for now as this behavior is not expected. I will fix it as soon as possible. Thanks @Tarun-Karthik and @Gupta-Shreya.