Project

General

Profile

Actions

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.61 of pstoedit.

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, horizontal
  • marking: low power vector lines
  • cutting: high power vector lines

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.

Data flow

Postscript file + Postscript configuration file => ghostscript > intermediate output > pstoedit backend code ==> output file

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.

Make sure you have the development libraries for libpng installed, otherwise the pstoedit laos-plugin will not compile.

./configure
make
make install

Usage:

pstoedit -f laos infile.ps outfile.lgc

There are example .ps files in the subdirectory examples.

Sending a .lgc file to the laser

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!

Testing laser motion

Peter described ( [[http://redmine.laoslaser.org/issues/17]] ) a way to test it

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.

Installing CUPS

Once pstoedit creates proper .lgc files, you can install the CUPS printer driver to automatically print from any program.

LAOS_CUPS_driver

Updated by jaap almost 12 years ago · 8 revisions