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.
 
 
 
Sameer Puri 126217a21f
upgrade to gcode v0.1.0
4 years ago
.github GH actions: use source-based coverage 4 years ago
examples Fix incorrect smooth curve ctrl point reflection, update README.md with demo, add compensation for same closepath point, add demo in README 6 years ago
src upgrade to gcode v0.1.0 4 years ago
tests move gcode parse/emit to sameer/g-code, use structopt 4 years ago
.gitignore add gcode test file 5 years ago
Cargo.lock upgrade to gcode v0.1.0 4 years ago
Cargo.toml upgrade to gcode v0.1.0 4 years ago
LICENSE Bump sierpinski size 6 years ago
README.md Update README.md 4 years ago

README.md

svg2gcode

svg2gcode codecov

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

TODO

  • Support all path variants
  • Support group and path transforms
  • Biarc interpolation (G2/G3 instead of many G1)
  • Px, pc, in to mm
  • Configurable DPI for px/pc to mm
  • Sort paths by distance to reduce G0 distances
  • Configurable start/end sequence
  • Comments in GCode input
  • Rustdocs
  • End-to-end tests

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