Giter Club home page Giter Club logo

svg2gcode's Introduction

svg2gcode

A command line utility for converting SVG to Gcode using Gcanvas and canvg.

Installation

First make sure you have nodejs installed.

npm install -g svg2gcode

Usage

  Usage: svg2gcode [options] <file ...>

  Options:

    -h, --help                 output usage information
    -V, --version              output the version number
    -s, --speed <number>       spindle speed
    -f, --feed <number>        feed rate
    -d, --depth <number>       z of final cut depth
    -c, --depthofcut <number>  z offset of layered cuts
    -t, --top <number>         z of top of work surface
    -a, --above <number>       z of safe area above the work

svg2gcode's People

Contributors

em avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

svg2gcode's Issues

Output is scaled up a lot

I'm trying this code for the first time and the output looks correct except for being scaled up greatly. The output is too big by a factor of 37.566. Any idea what could be the issue?

Error when installing

When I ran npm install -g svg2gcode in Terminal I received a long error:

npm ERR! tar.unpack untar error /Users/jacob/.npm/svg2gcode/0.0.5/package.tgz
npm ERR! Darwin 13.2.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "svg2gcode"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! path /usr/local/lib/node_modules/svg2gcode
npm ERR! code EACCES
npm ERR! errno -13

npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/svg2gcode'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules/svg2gcode']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/usr/local/lib/node_modules/svg2gcode',
npm ERR!   fstream_type: 'Directory',
npm ERR!   fstream_path: '/usr/local/lib/node_modules/svg2gcode',
npm ERR!   fstream_class: 'DirWriter',
npm ERR!   fstream_stack: 
npm ERR!    [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR!      '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR!      'FSReqWrap.oncomplete (fs.js:99:15)' ] }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jacob/npm-debug.log

Could you help identify what I've done wrong? Thanks.

tiny gcode visualizer lib for tiny webserver

sorry to open ticket for my question but actually I'm looking for light gcode visualizer or probably cad2gcode convertor in my webpage , but this webpage hosted on tiny ESP826612F module which is connected to Arduino GRBL gcode interpreter by serial line, so I should have great care about its weight , My plan is just connect to wifi module and open the browser and do designated CAM job.,As I'm not pro in client side script like JavaScript I was hopping could have good advise here, do you suggest to make some plugin from such library so I shouldn't have to download or call all library ?
thanks

Expanding Square Pattern

After finally getting Cairo installed everytime I put an svg through, it just gives gcode for a square pattern (small square, larger bounding square, repeat)..

This is my command

svg2gcode -t 3 -c 4 -d 3 -D 1 /Users/brod/Desktop/test.svg

Any ideas?

Automatically determine toPoly integer scale based on occupied space

Do getPoints first, keep track of the bounding box, then use the abs max of the limits to determine an integer scale. This approach shouldn't require any tolerances to account for the divisions because we are working with the actual nominal curve instead of the theoretic one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.