kicad-developers team mailing list archive
Mailing list archive
Plotting infrastructure reworking patch
Sat, 27 Jun 2009 18:42:52 +0100 (GMT+01:00)
OK, done it, tested it somewhat, and it seems to work fine...
changes for the user:
- Mostly nothing...
- removed the 'Org=Center'
checkbox in the pcb plot dialog (since no plotter in these days require
it... anyway it's easy to put it back)
- You can have the sheet frame
plotted on gerbers (it's useful)
- You can have the drill sheet on
gerber (very useful to check hole sizes before manufacturing), it
follows the axis chosen for the drill tape.
- Pad on silkscreen also
shows surface pads, not only the drilled ones (of course you'll never
submit silks with pads to manufacturing for obvious reasons but for
verification could be handy)
What changed inside:
- A lot (is a big
- 99% of the plotting code is now device independent: there is
a Plotter base class which works somewhat like a DC, and three
subclasses for the actual plotting implementation (PS, HPGL, RS274X)
New aperture allocation code: just pick your pen size and draw or
request flashes. No more manual aperture selection before plotting:D
now is STL based, instead of the old linked list implementation. There
is a simpler handling of the temp file, too.
- Two layers of drawing
primitives: low level one (line, arc, circle, rect, poly, marker)
eventually inside filled. High level ones supports flashes and
sketch/filled primitives (NOTE sketch mode is not fully tested for
- Easier coordinate transformation (no more separate
calculations for mirrored plots and such, just set the paper size)
Mostly device independent plotting: except some peculiarities (i.e. pen
overlap in HPGL) one initialized the plotter object works the same for
every output. So no more if (IsPostscript) or switches on plot format
around the program. I didn't try but you could actually plot a
schematic on a gerber just changing class instantiation.
- Should be
easy to extend, if we want to export as DXF or some other format (for
example if wx support for svg is not adequate), just implement a new
subclass and plug it in the plot initialisation
I also have done (not
included here) a full ISO font with tech repertoire and a simplex font
for cyrillic (no idea if it's ISO conformant). These are problematic
for some reasons:
- The iso font (latin and greek) was generated from
the isoct and isogreek freely downloadable from iso. They're not
exactly free to use, altought they were also hand tuned after
conversion (for example, capital omega in the iso font is broken).
The cyrillic one was similarly extracted (with different scaling) from
a free (no license found) .shx containing an extended version of the
hershey simplex sans.
- The remaining glyphs for the technical
repertoire were made by me, no problem on these :D:D
If someone is
interested I can give the .shp converter I've built and the resulting .
h font files too... but I'm not sure about public distribution, the
licence is not clear.
------=_Part_73823_19689352.1246124572676 Content-Type: APPLICATION/X-BZIP2; name=plotting-r1843.patch.bz2
Content-Disposition: attachment; filename=plotting-r1843.patch.bz2;
[Attachment content not displayed.] ------=_Part_73823_19689352.1246124572676--