Here is a growing collection of HP/GL file utilities and viewers for use on SGI-IRIX workstations.
HP/GL was developed by Hewlett Packard to drive its family of pen plotters. Most commands are vector oriented - pick up the pen, put down the pen, move here, move there. Very few complex commands are part of HP/GL since the original plotters did not include powerful CPUs.
HP/GL-2 was developed as a successor to HP/GL to support many more advanced features that could be offloaded to plotters with powerful CPU's and large amounts of memory. HP/GL-2 also includes quite a lot of raster controls and commands since most modern plotters are actually raster devices. This includes embedded pen definitions (up to 256 since a raster device can never run out of pens...) fill patterns, screened vectors, clipping windows, data transformation and the like.
Most plotter drivers do not take advantage of the advanced HP/GL-2
functions since they are based on old code that originally supported
basic HP/GL. However one very popular HP/GL-2 command that is often
PE (PoylineEencoded command).
is very popular because it compresses the pen movement commands by
encoding them. This significantly reduces the plot file size. However
is more difficult to decode which is why many HP/GL to DXF programs
don't properly support it.
Selects a pen; data mapped to AutoCAD layer: Layer#=10xpen number + line-type
|PA||x||x||move Pen Absolute|
|PR||x||x||move Pen Relative|
Polyline Encoded - a series of movements encoded to minimize bytes used.
Pen Width - translated to polyline with width
|IP||x||x||new user unit scale factor|
outline of rectangle translated to a zero width closed polyline
|LB||x||x||string of text - to DXF text|
|DT||x||x||string termination character|
|DI||x||x||direction (angle) of text|
|CS||x||x||text scaling parameter|
Line Type - indirectly supported by mapping to a unique AutoCAD layer