An .svg to .gcode converter
Clone or download
pjpscriv Small fixes
Added new test file, renamed 'run' to 'convert', small converter change to included points ON the printing bed limit.
Latest commit 9927d68 Oct 26, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.

Python SVG to G-Code Converter

A fast svg to gcode compiler forked from github user vishpat's svg2gcode repository.

This library takes an svg file location/my_file.svg and outputs the gcode conversion to a folder in the same directory location/gcode_output/my_file.gcode.

The file contains the configurations for the conversion (printer bed size etc).


Simply clone this repo.

git clone


As a Python module

To import it into your existing python project:

import py-svg2gcode


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.

./RUNME my_svg_file.svg


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.