Giter Club home page Giter Club logo

benbox-slicer's Introduction

Benbox PNG Slicer

Converts PNG raster images into Gcode to be sent to the Benbox Laser Engraver.

Also includes an OctoPrint plugin!

This code was based on Inkscape plugin at 305engineering/Inkscape.

Usage

Basic usage looks like this:

benbox-slicer --input test.png

The results will be in a file called output.gcode in the current directory.

Other options:

  • --speed The speed to make the laser go while its on. Defaults to 200.
  • --resolution Lines per mm. 10 works best with the benbox. Defaults to 10.
  • --mode Mode of converting from the PNG to the laser. See below. Defaults to bw.

Mode

bw

B/W mode uses a simple threashold if brightness to determine if the pixel should be burnt or not.

BW mode preview

random

Random tries to use little dots to emulate greys.

Random mode preview

greyscale

This mode attempts to use the laser's intensity to draw different tones of grey.

It is experimental, and doesnt seem to work all that well for me yet, but why not give it a go?

Greyscale mode preview

OctoPrint plugin

This also includes a plugin for OctoPrint.

To install it, all you have to do is pip install this along with octoprint!

pip install octoprint
pip install benbox-slicer

Setting up the benbox with OctoPrint

Currently the benbox does not work out of the box with OctoPrint :(

The benbox does not support checksums in GCODE, and you will have to modify the source code to make it work.

Open up octoprint/util/comm.py to around line 1524 and comment out or delete the code so that it always just uses _doSendWithoutChecksum.

For example:

# now comes the part where we increase line numbers and send stuff - no turning back now
#if (gcode is not None or self._sendChecksumWithUnknownCommands) and (self.isPrinting() or self._alwaysSendChecksum):
#    linenumber = self._currentLine
#    self._addToLastLines(command)
#    self._currentLine += 1
#    self._doSendWithChecksum(command, linenumber)
#else:
self._doSendWithoutChecksum(command)

benbox-slicer's People

Contributors

mic159 avatar

Watchers

James Cloos avatar

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.