From 20aae5492f989e0b1b36a3dbf5d73c34939928e0 Mon Sep 17 00:00:00 2001 From: Sameer Puri <11097096+sameer@users.noreply.github.com> Date: Wed, 15 Sep 2021 23:03:38 -0400 Subject: [PATCH] Update README.md --- README.md | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 16aa1f5..a827a79 100644 --- a/README.md +++ b/README.md @@ -11,21 +11,14 @@ Convert vector graphics to g-code for pen plotters, laser engravers, and other CNC machines -## Demo +## Usage ### Web interface - -Just select an SVG +Check it out at https://sameer.github.io/svg2gcode. Just select an SVG and click generate! ![SVG selected on web interface](https://user-images.githubusercontent.com/11097096/129305765-f78da85d-cf4f-4286-a97c-7124a716b5fa.png) -and click generate! -![image](https://user-images.githubusercontent.com/11097096/129305837-1748d30b-dfb6-464b-b9e8-7fbde25448ba.png) - - -Check it out at https://sameer.github.io/svg2gcode/ - ### Command line interface (CLI) #### Input @@ -44,28 +37,24 @@ cat out.gcode ![Vanderbilt Commodores Logo Gcode](examples/Vanderbilt_Commodores_logo_gcode.png) -### Real-world use on a Prusa Mini+ +### Library -A [Prusa Mini+](https://shop.prusa3d.com/en/3d-printers/994-original-prusa-mini.html) was set up with a [pen plotter attachment](https://github.com/sameer/models/wiki#prusa-mini-plotter). -The `Vanderbilt_Commodores_logo.svg` and `moore.svg` examples were plotted on the same page. +The core functionality of this tool is available as the [svg2gcode crate](https://crates.io/crates/svg2gcode). -```sh -cargo run --release -- --begin 'G0 Z10 G28 M201 X1250 Y1250 Z400 M203 X400 Y400 Z24 M205 X8.00 Y8.00 Z2.00 M107 G0 Z10 G0 X0 Y0 G0 Z1' --end 'G0 Z10' --on 'G0 Z1' --off 'G0 Z3' --origin 0,34 examples/Vanderbilt_Commodores_logo.svg -o out.gcode --feedrate 3000 -``` +## Blog Posts -![Pen plotter attachment on the 3D printer](https://raw.githubusercontent.com/wiki/sameer/models/prints/prusa_mini_plotter.jpg) +These go into greater detail on the tool's origins, implementation details, and planned features. -![Resulting plotted image](https://user-images.githubusercontent.com/11097096/119063561-6fb8ef80-b9a7-11eb-9f2f-ca69c0c1c9ae.png) +- https://purisa.me/blog/pen-plotter/ +- https://purisa.me/blog/svg2gcode-progress/ ## FAQ / Interesting details -- Use a 3D printer for plotting: (thanks @jeevank for sharing this) https://medium.com/@urish/how-to-turn-your-3d-printer-into-a-plotter-in-one-hour-d6fe14559f1a +- Use a 3D printer for plotting: (thanks [@jeevank](https://github.com/jeevank) for sharing this) https://medium.com/@urish/how-to-turn-your-3d-printer-into-a-plotter-in-one-hour-d6fe14559f1a - Convert a PDF to GCode: follow [this guide using Inkscape to convert a PDF to an SVG](https://en.wikipedia.org/wiki/Wikipedia:Graphics_Lab/Resources/PDF_conversion_to_SVG#Conversion_with_Inkscape), then use it with svg2gcode -- Are shapes, fill patterns supported? All objects can be converted to paths in Inkscape with `Object to Path` for use with this program. Not sure how practical fill patterns would be -- if you have ideas, feel free to open as issue or a PR. - -- What about a generic PPD driver for using a plotter as a printer? I thought about doing something like this where you package ghostscript + inkscape + svg2gcode but that would take a lot of time +- Are shapes, fill patterns supported? No, objects must be converted to paths in Inkscape with `Object to Path` for use with this program. See [#15](https://github.com/sameer/svg2gcode/issues/15) for more discussion. ## Reference Documents