svg2gcode icon indicating copy to clipboard operation
svg2gcode copied to clipboard

Gcode generated for simple shapes is being filled and not only the boundary

Open Tarun-Karthik opened this issue 6 years ago • 6 comments

The gcode generated for simple shapes is being filled. I just wanted to get the gcode for the boundry .

Tarun-Karthik avatar Mar 06 '19 05:03 Tarun-Karthik

I found that if I don't specify stroke style and fill:none to the svg, the parser considers the inside as filled.

crlngn avatar Jul 25 '19 21:07 crlngn

I just installed it and ran a test on a simple svg with two lines, not forming any closed shape.

~/.npm-packages/lib/node_modules/svg2gcode/node_modules/gcanvas/lib/gcanvas.js:407
      throw 'You must set context.toolDiameter to use fill()'
      ^
You must set context.toolDiameter to use fill()

set fill:none as suggested above now it runs but just sits there doing nothing. need to cntl-c to end it.

This does not look very useful. What is it supposed to do.

The svg has two lines, why does it try to do more than create two simple gcode paths. No proper explanation of what this tool is supposed to do or not do. Needs some basic documentation; ie more that just the command name itself !

J-Dunn avatar Jan 10 '20 06:01 J-Dunn

@J-Dunn How did you implement the stroke and fill style? Once I understood the limitations the code worked fine for me, but I had to edit my svg.

crlngn avatar Jan 13 '20 19:01 crlngn

Thanks, I did get a little bit further but it seems that inkscape is not respecting the first line which gives the python interpreter. The script line1 points to a python2.7 executable but inkscape is apparently calling "python" which default path provides python3 . I found some patches somewhere which rearranges things for py3 syntax but there were still issues, I get error reported from the script and I gave up at that point. Yet another chase down a warren full of rabbit holes which leads no where. Things seem to get broken quicker than anyone can keep up these days.

J-Dunn avatar Jan 13 '20 21:01 J-Dunn

@carolinex Can you explain the limitations?

ram4nd avatar Jun 12 '20 08:06 ram4nd

It's been some time since I last used it, but I do remember that I had to convert certain shapes to paths and remove most properties from the root element. If you use a software like illustrator to create your paths, make sure to convert the shapes into paths on the software. I will take a look at my past code here and update this answer if I remember anything else.

crlngn avatar Jun 14 '20 10:06 crlngn