Vector formats
HP-GL pen travel ledger
Sum commanded pen-up and pen-down travel for straight-line HP-GL paths.
Your inputs
Start with an exampleYour result
Example resultAa — A small example of your colors.
How it works
Track PA/PR coordinate mode, PU/PD state and SP selection. Sum Euclidean segment lengths and convert using the supplied units per millimetre.
A 120,160 move is 200 units, followed by 40 pen-down units. At 40 units/mm, pen-down travel is 6 mm; the final pen-up move is 1 mm.
Limits
Only IN, PA, PR, PU, PD and SP; up to 20000 commands/segments. IN is allowed only first and does not invent physical homing. Initial position and scale are explicit; coordinates are used as written without device quantization. Arcs, transforms, encoded polylines and text are rejected. Travel does not predict plotting time, ink use or machine limits.