HPGL-Distiller is a small program that was written to filter out aspects of a HPGL file which are not relevant for various HPGL output devices, typically vinyl cutters. The original reason for filtering out the irrelevant codes was that my own personal vinyl cutter was responding poorly to the excess data.
How does it work?
The HPGL-Distiller is actually a very simple program (even written in C) that breaks the incoming HPGL data stream into individual HPGL commands and simply copies or ignores each command based on the built in list of 'acceptable' HPGL commands. A lot of HPGL commands generated by pstoedit pertain to aspects of plotting like line type, width, pen colour, pen width and such, all of which aren't always relevant, especially in the cutting processes.
It should be pointed out that as you go up in the range of the plotters/cutters, the HPGL feature set they support will tend to increase (ie, supporting arcs, circles, rectangles natively).
How do I use it?
HPGL-Distiller is used as a post-processing tool after converting an existing vector format (SVG, DXF, EPS etc) into HPGL via 'pstoedit'. By default the output of the pstoedit (with -f plot-hpgl) contains a lot of HPGL commands which are of no relevance to the final vinyl cutter in question.
pstoedit -f plot-hpgl imagefile.eps fulloutput.hpgl
hpgl-distiller -i fulloutput.hpgl -o distilled.hpgl
(subsequently you can possibly output the distilled HPGL to your
cutter using 'cat distilled.hpgl > /dev/ttyS1 )
What's New in This Release:
· A shell script that can allow Inkscape and other programs to print directly to HPGL vinyl cutters was added.