PadLex / SvgToGcode

MIT License
46 stars 27 forks source link

Instruct GCode parse to fill #24

Open Milner99 opened 2 years ago

Milner99 commented 2 years ago

Hi,

Great convertor it's so close to perfect for what I need. Wondering if there is a setting that I can choose to rather than outline a shape in SVG > GCode but to infill/pocket.

I'm hoping so and I just haven't configured it properly. Please can you review and advise if this is possible with SvgToGcode Repositiory.

Images attached, outline is from this repo - filled in tool path the other convertor which I can't use. SVG is the source. 22 Other Convertor

Screenshot 2022-05-06 at 00 26 31

This repo convertor

Screenshot 2022-05-06 at 00 27 38

Thank you so much Chris

PadLex commented 2 years ago

As is the library only converts SVG paths to gcode paths. However, after converting the SVG paths to geometry, you could make a loop which copies and shrinks your objects before compiling it to gcode.

Milner99 commented 2 years ago

Thank you replying.

Not sure I know how to do that. Would this be something you could help me with?

PadLex commented 2 years ago

If you'd rather not code you might want to try the inkscape extension which uses this library. If you don't need to repeat the procedure too often you could copy and resize the path by hand.

If you don't mind coding then I'd play around with curves (between curves = parse_file("drawing.svg") and gcode_compiler.append_curves(curves)).

johannesnoordanus commented 1 year ago

Hi, filling stroke width etc can be achieved by rendering the svg to an image file (jpeg, png ...) and subsequently convert the image to gcode. Repeat this (in a loop) if you want to burn deep (or even through) material.