Mail Archives: geda-user/2014/07/20/13:07:39
On Wed, 2014-07-16 at 16:01 -0700, Dave Curtis wrote:
> On 07/16/2014 11:32 AM, DJ Delorie wrote:
> >> I guess I don't understand the logic of not allowing the octagon flag on
> >> Pad[]'s, since they are allowed on Pin[]'s. It seems to me that all the
> >> logic should be there to draw them -- wouldn't they be handled the same
> >> as a square aperture, even when the pad is parallel to the X/Y axes?
> >
> > Most pads are not squares, just rectangles.
>
> Doesn't really address my question. A rectangle is drawn by
> interpolating a square aperture.
Not in PCB's gerber output it isn't. It COULD be done that way, but we
don't.
Just skimming the code:
Round pads are emitted as a filled circle (flashed I think), truly
square pads are emitted as a filled rectangle (processed as a filled
polygon by the gerber exporter).
Non-square pads are emitted as lines, and the gerber exporter for lines
handles Square capped lines as polygons. Round-ended lines are stroked.
Admittedly, we don't match up well with UCamco's recommendations that
pads should be flashed with apertures!
The right answer I think, is to model everything as polygons /
polycurves, and define aperture macros for pads using these primitives.
Each unique combination of rotation and pad shape would probably have
its own macro.
It is easier to work out which pads are the same shape (and thus get the
same aperture) if we define pads by reference to a pad-stack. If we
define geometry for each pad individually, we then need to produce a
cache / hash of each pad shape, to avoid duplicate apertures at gerber
emission.
--
Peter Clifton <peter DOT clifton AT clifton-electronics DOT co DOT uk>
Clifton Electronics
- Raw text -