npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gcodify

v1.0.2

Published

Process an image and generates gcode to use with laser engravers

Downloads

13

Readme

GCODify

This tool parses an image and generates a GCODE file ready to be used to laser engrave with a 3d printer

Install

Install NPM is you dont have it: https://www.npmjs.com/get-npm

Install GCODify:

$ npm i -g gcodify

Usage

Usage: gcodify [options] <file>

Options:
  -V, --version                  output the version number
  -z, --z-offset [value]         Position for the Z axis in mm. Defaults to 90mm.
  -x, --x-offset [value]         Position for the X axis in mm. Defaults to 28mm.
  -y, --y-offset [value]         Position for the Y axis in mm. Defaults to 16mm.
  -w, --width [value]            Resizes the image by its width in mm (height will be automatically computed if not provided).
  -h, --height [value]           Resizes the image by its height in mm (width will be automatically computed if not provided).
  -p, --precision [value]        Laser beam size. Defaults to 0.01mm.
  -s, --laser-speed [value]      Speed for the movements while engraving. Defaults to 10 mm/s.
  -t, --travel-speed [value]     Speed for the movements while traveling. Defaults to 200 mm/s.
  -b, --image-brighness [value]  Tweaks the image brighness (from -1 to 1)
  -c, --image-contrast [value]   Tweaks the image contrast (from -1 to 1)
  -q, --image-quality [value]    Image quality (from 0 to 100). Defaults to 60.
  --pixel-threshold [value]      Threshold where a pixel is identified as black (from 0 to 255). Defaults to 128.
  --laser-on-code [value]        GCODE to turn laser ON. Defaults to M106.
  --laser-off-code [value]       GCODE to turn laser OFF. Defaults to M107.
  -o, --output-filename [value]  Overrides the filename used for the process output. Used for both preview and gcode output.
  --preview                      Will generate an image instead of a GCODE to preview what the CCODE will look like.
  --debug                        Show debug info such as stack traces and debug logs.
  -h, --help                     output usage information

Example:

We want to engave this picture:

bull

$ gcodify --preview -b 0.4 --pixel-threshold 125 -w 50 bull.png

This outputs preview.bull.png. We increase the brightness and lowering the threshold to discard what we dont want to print and we resize it to 50mm width (height will be automatically calculated).

Preview:

bull preview after running the first command

Once we are good with the preview, we generate the GCODE file to print:

$ gcodify -b 0.4 --pixel-threshold 125 bull.png

This outputs bull.png.gcode which is ready to be sent to the printer.

end result: engraved wood