gcode2svg

1.0.3 • Public • Published

gcode2svg

Simple CNC g-codes to SVG convertor. It takes gcode string and converts it into a 2D SVG.

This is a part of my Arduino WIFI drawing bot project. List of all GCodes is here: http://reprap.org/wiki/G-code

Usage

var gcode2svg = require('gcode2svg');
gcode2svg('G0 X1 Y1\nG1 X100 Y100');

Installation

npm install --save gcode2svg

Supported GCodes

  • G0 - fast move
  • G1 - draw straight line
  • G2 - draw arc clockwise
  • G3 - draw arc counterclockwise
  • G90 - set absolute coordinates
  • G91 - set relative coordinates

Plans

  • Support following GCodes:
    • G20 - set units to inches
    • G21 - set units to mm
    • M2 - programm end
    • M600 - filament change pause to change color
    • T# - change tool to change colors
  • Support multiple tools with different options to swith betweent them and draw in multiple colors.

Links

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i gcode2svg

Weekly Downloads

6

Version

1.0.3

License

MIT

Last publish

Collaborators

  • alex18881