I've recently acquired an HP plotter. I know there's a ULP script that can generate HPGL, but it's routing, fill, and pen lift/drop optimization isn't the best. It can take a LONG to plot a small board.
I'm working on a python script that reads the new XML format, and creates an optimized pen path and fill patterns; this could be used for either additive (plotters) or subtractive (routers) creation of a PCB.
Anyway, things are going well, and I'm in the implementation phase of the rendering of the polygons. I would like that the output matches the what's shown in Eagle exactly. To that end, I'm having a bit of trouble with how Eagle decides to show non-continuous wire patterns.
Messing around with a single horizontal wire, it seems that when using the 'long dash' pattern, it begins when the wire reaches a length of 10.5 mm. Under 10.5, it is a continuous wire. At 10.5, you have two long dashes with a 1.5mm gap. From there, it adds another long dash every 4mm: 10.5, 14.5, 18.5, 22.5, etc. The gap is always 1.5mm, and the longdash length is adjusted to fit. The line always ends on a longdash.
For the shortdash, the first one is at 2.01 (not 2.0).
Can anyone comment on what rule(s) determine how many repetitions are shown for a given line length. I can hard-code the rules into the code, but I think there is a simple mathematical rule that I haven't been able to figure out yet.