You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.4 KiB

svg2gcode

svg2gcode codecov

Convert any SVG 1.1 path to gcode for a pen plotter, laser engraver, etc.

TODO

  • Biarc interpolation (G2/G3 instead of many G1)
  • Sort paths by distance to reduce G0 distances
  • Comments in GCode input
  • Rustdocs

Known bugs/issues

  • Ellipse paths are dubious -- large_arc, sweep may need to be inverted
  • Smooth curves should not use the control point when the previous curve is not of the same type (quadratic -> smooth cubic, cubic -> smooth quadratic)
    • This is just a nit, it shouldn't matter if the SVG is correct

Demonstration

Input

cargo run --release -- examples/Vanderbilt_Commodores_logo.svg --off 'M4' --on 'M5' -o out.gcode

Vanderbilt Commodores Logo

Output, rendered at https://ncviewer.com

cat out.gcode

Vanderbilt Commodores Logo Gcode

FAQ / Interesting details

Reference Documents