Parse an SVG into GCODE that a 3d printer can draw with a pen attached
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Today I spent a lot of time debuging why the png defiltering worked on 8bit images but not 16bit images. I finally managed to figure it out when I realized that I read the specification wrong. There is still a lot more to implement but this is one major hurdle out of the way.
I got tired of making a gui so instead I'm working on adding png parsing to this project. This would allow a user to draw a png instead of just an svg. Today I managed to get enough of the format to draw out a simple image. I need to continue implementing more of the format and implement an edge detection algorithm so it can actually be drawn.
I made the base for the gui to use the program. Currently many functions are not yet supported but using tkinter and custom tkinter it is able to use the file dialog open a svg file and run the code to turn it in to gcode. More work needs to be done on speeding up the code to display the gcode to make it more usable.
I have now added parsing for polygon and polyline geometric shapes with logic for giving lines width when necessary. This means that I have completed adding all geometric commands allowing this project to parse nearly every SVG. I now plan on either making a command line tool or GUI (or both) that will allow easy importing, positioning, and scaling of an SVG for printing.
SVG images have a stroke width property that makes lines thicker. I have now implemented this property so that images appear as expected
I have now implemented all of the path commands allowing for a large majority of SVGs to be parsed. Now I am moving on to the geometric commands like polygon and ellipse. I plan on parsing these by turning them into a path command then parsing that so limit code duplication. I also made the number of points that make up an arc dependent on the length of the arc so they don't lose quality
I implemented enough of the SVG format to turn this svg: https://www.svgrepo.com/svg/521276/docker-16 into usable gcode