plot

module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2020 License: MIT

README

Plot — for gcode-based xy-plotters

This repository contains code for generating commands for an xy-plotter.

The simplest way to use this code is to run the svgtogcode command, which parses an svg file, and writes gcode, configured by flags.

For example:

svgtocode -in drawing.svg -size 270,180 -paper 297,210 -center -out out.gcode

This parses the file drawing.svg, resizes it to 270mm by 180mm, clips all lines outside the image, reorders the paths to reduce pen movement, and centers it on an A4 page of size 297mm by 210mm. Finally, it writes the output file out.gcode which can be sent to an xy-plotter which understands gcode.

Note that this code understands and parses only a small part of the SVG standard.

The paths package contains code for loading and saving SVG files, resizing, clipping, and sorting paths.

The gcode package contains code for writing gcode files.

Directories

Path Synopsis
cmd
svgtogcode
Binary svgtogcode converts an input svg file into gcode for an xy plotter.
Binary svgtogcode converts an input svg file into gcode for an xy plotter.
svgtogcode/svgtogcode
Package svgtogcode provides the functionality for the svgtocode binary as a library.
Package svgtogcode provides the functionality for the svgtocode binary as a library.
Package gcode can write gcode files.
Package gcode can write gcode files.
Package paths provides tools for manipulating 2d paths consisting of line segments.
Package paths provides tools for manipulating 2d paths consisting of line segments.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL