Pstoedit with laos support » History » Version 4
axel, 2012-11-14 15:55
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
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
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.
@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.
But be careful! The laser might move beyond its limits!