Skip to content

mic159/benbox-slicer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

A raster PNG slicer for the Benbox laser engraver

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages