Here is a growing collection of HP/GL file utilities and viewers for use on SGI-IRIX workstations.
Perl
xhpgl
as a Netscape
helper application.
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
used is PE
(PoylineEencoded command). PE
is very popular because it compresses the pen movement commands by
encoding them. This significantly reduces the plot file size. However PE
is more difficult to decode which is why many HP/GL to DXF programs
don't properly support it.
Command | HP/GL | HP/GL-2 | Description |
SP | x | x | 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 |
PE | x | Polyline Encoded - a series of movements encoded to minimize bytes used. |
|
PU | x | x | Pen Up |
PD | x | x | Pen Down |
PW | x | Pen Width - translated to polyline with width |
|
IP | x | x | new user unit scale factor |
AA | x | x | Arc Absolute |
AR | x | x | Arc Relative |
EA | x | x | 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 |
SI | x | x | character height |
DI | x | x | direction (angle) of text |
CS | x | x | text scaling parameter |
CI | x | x | CIrcle |
SC | x | x | SCale factor |
LT | x | x | Line Type - indirectly supported by mapping to a unique AutoCAD layer |