Project

General

Profile

Pstoedit with laos support » History » Revision 6

Revision 5 (axel, 2012-11-14 19:06) → Revision 6/8 (axel, 2012-11-16 20: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 

 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!  

 Peter described ( [[http://redmine.laoslaser.org/issues/17]] ) a way to test it 
 <pre> 
 In any case, (0,0) SHOULD BE "lower left corner".  
 If you send this file: 
 0 0 0 
 1 10000 20000 
 You should end up with a diagonal line from the lower left corner,  
 10mm in X direction (left to right) and 20mm in Y direction (bottom to top). As seen from the 
 Front of the laser. If the pstoedit driver or visicut thinks otherwise, it's config file should be altered. 
 There is info on the wiki how to change the pstoedit config. Look for the new "postscript" config file. 
 </pre> 

 </pre>