Python SVG to G-Code Converter
This library takes an svg file
location/my_file.svg and outputs the gcode conversion to a folder in the same directory
config.py contains the configurations for the conversion (printer bed size etc).
Simply clone this repo.
git clone https://github.com/JustaBitDope/py-svg2gcode.git
As a Python module
To import it into your existing python project:
import generate_gcode from py-scvg2gcode
As a Python Command
With Bash Script (Recommended)
You can also use the
RUNME script to convert files.
This method is useful for debugging as it gives you extra information.
The compiler is based on the eggbot project and it basically converts all of the SVG shapes into bezier curves. The bezier curves are then recursively sub divided until desired smoothness is achieved. The sub curves are then approximated as lines which are then converted into g-code.