Pstoedit with laos support » History » Revision 5
Revision 4 (axel, 2012-11-14 15:55) → Revision 5/8 (axel, 2012-11-14 19:06)
h1. Pstoedit with laos support
We wrote a plugin for *pstoedit*, called drvlaos.h/cpp, which converts a postscript file into printable data in our [[SimpleCode]] format. Thanks to Wolfgang Glunz, author of pstoedit, our driver code is now fairly simple. Most of the work is done by some new features added by Wolfgang in version 3.61Beta of pstoedit.
h2. How it works
*Pstoedit* simplifies the incoming postscript for us. With a user-definable filter, pstoedit creates a PNG image that containts all image data and all vectors that are going to be raster-engraved. What remains is the data that should either be cut or marked.
* engraving: bitmap based engraving, left to right
* marking: low power vector lines
* cutting: high power vector lines
h3. User definable filter
What is to be cut/marked/engraved can be configured in a configuration file. The file is called laoscfg.ps and should be kept in the pstoedit configuration directory. On Linux, this is usually @/usr/share/pstoedit@ or @/usr/local/share/pstoedit@. The file is in postscript format. It's values can be overwritten in the postscript input file.
* Thin lines (used for marking/cutting): 1pt or thinner (pt = 0,353mm)
* Cutting lines: red thin lines
* Marking color: black thin lines
LaserCuttingSpeed 2
LaserCuttingPower 80%
LaserCuttingFrequency 10000
LaserMarkingSpeed 30
LaserMarkingPower 80%
LaserMarkingFrequency 10000
LaserEngravingPower 30
LaserEngravingSpeed 70
LaserEngravingPPI 120
LaserEngravingInvert False
LaserEngravingMode BW
LaserBoundaryBox True
The postscript file is automatically copied when pstoedit (with LaOS patch) is installed.
h3. Data flow
Postscript file + Postscript configuration file => ghostscript ==> intermediate output ==> pstoedit backend code ==> output file
h2. Installation
Download our latest stable pstoedit version from GitHub:
@git clone -b laos https://github.com/LaosLaser/pstoedit.git@
Note the *-b laos*, this is the stable version.
@./configure
make
make install
@
Usage:
@pstoedit -f laos infile.ps outfile.lgc@
There are example .ps files in the subdirectory examples.
You can transfer a .lgc file with tftp in binary mode to the loas board.
@tftp ip_address_of_your_laos_board
status
binary
mode
put outfile.lgc
quit
@
But be careful! The laser might move beyond its limits!