Discussion:
Octagon flag on Pad[]
(too old to reply)
Dave Curtis
2014-07-15 03:48:17 UTC
Permalink
"octagon" flag appears to do nothing on Pad[] directives. Is this correct?
DJ Delorie
2014-07-15 04:09:40 UTC
Permalink
Post by Dave Curtis
"octagon" flag appears to do nothing on Pad[] directives. Is this correct?
Correct.
Dave Curtis
2014-07-15 04:41:24 UTC
Permalink
Post by DJ Delorie
Post by Dave Curtis
"octagon" flag appears to do nothing on Pad[] directives. Is this correct?
Correct.
Is that by plan? A friend and I are looking at "challenging footprint
specs" (we're easily entertained..) and I've seen a couple where an
interpolated octagon could be helpful.
DJ Delorie
2014-07-15 04:42:25 UTC
Permalink
Post by Dave Curtis
Is that by plan? A friend and I are looking at "challenging footprint
specs" (we're easily entertained..) and I've seen a couple where an
interpolated octagon could be helpful.
It pre-dates my involvement, but yes, it's intentional.
Peter C.J. Clifton
2014-07-16 09:56:07 UTC
Permalink
Post by Dave Curtis
Post by DJ Delorie
Post by Dave Curtis
"octagon" flag appears to do nothing on Pad[] directives. Is this correct?
Correct.
Is that by plan? A friend and I are looking at "challenging footprint
specs" (we're easily entertained..) and I've seen a couple where an
interpolated octagon could be helpful.
Thats a poly-curve.

(As are ROUND pads, obround pads, square, .... (you get the idea).

Bonus points for allowing "HOLES" to be non-round (poly-curve) too, to
support manufacturing slots ;)

(And for footprints which use slots to pass wide tabs on a big power
connector, for example.)

Peter
Dave Curtis
2014-07-16 17:36:21 UTC
Permalink
Post by Peter C.J. Clifton
Post by Dave Curtis
Post by DJ Delorie
Post by Dave Curtis
"octagon" flag appears to do nothing on Pad[] directives. Is this
correct?
Correct.
Is that by plan? A friend and I are looking at "challenging footprint
specs" (we're easily entertained..) and I've seen a couple where an
interpolated octagon could be helpful.
Thats a poly-curve.
(As are ROUND pads, obround pads, square, .... (you get the idea).
Well, but octagons are a RS-274X pad macro primitive, both flashed and
stroked, so they are fair game for footprint pad construction.

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?
Post by Peter C.J. Clifton
Bonus points for allowing "HOLES" to be non-round (poly-curve) too, to
support manufacturing slots ;)
(And for footprints which use slots to pass wide tabs on a big power
connector, for example.)
How are footprint slots communicated to the fab house? Outline layer
paths are routed after fab, but slots would need to be routed
pre-plating. Would another mechanical layer be added that contains slot
routing information? And do you communicate slot outlines or a toolpath
and tool diamater?
Post by Peter C.J. Clifton
Peter
DJ Delorie
2014-07-16 18:32:29 UTC
Permalink
Post by Dave Curtis
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.
Post by Dave Curtis
How are footprint slots communicated to the fab house? Outline layer
paths are routed after fab, but slots would need to be routed
pre-plating. Would another mechanical layer be added that contains slot
routing information? And do you communicate slot outlines or a toolpath
and tool diamater?
Typically the humans talk to each other and discuss what form the info
needs to be in. I suspect they'd want a separate gerber for each type
of milling operation - plated slots, unplated slots, board outline,
etc.
Dave Curtis
2014-07-16 23:01:56 UTC
Permalink
Post by DJ Delorie
Post by Dave Curtis
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. The round-end rectangle pads are drawn
by interpolating a round aperture. Since the standard set of base
apertures defined in RS-274X includes octagons, and PCB already flashes
octagons for Pin[]'s with the "octagon" flag, it seems like somebody
went out of there way to turn off interpolation of octagon apertures.
Peter Clifton
2014-07-20 17:07:26 UTC
Permalink
Post by Dave Curtis
Post by DJ Delorie
Post by Dave Curtis
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.clifton-j0HF+osULJQMjHSeoOxd2MuBeof9RJB+Wmv/***@public.gmane.org>

Clifton Electronics
Peter Clifton
2014-07-20 16:53:21 UTC
Permalink
Post by Dave Curtis
Post by Peter C.J. Clifton
Post by Dave Curtis
Post by DJ Delorie
Post by Dave Curtis
"octagon" flag appears to do nothing on Pad[] directives. Is this
correct?
Correct.
Is that by plan? A friend and I are looking at "challenging footprint
specs" (we're easily entertained..) and I've seen a couple where an
interpolated octagon could be helpful.
Thats a poly-curve.
(As are ROUND pads, obround pads, square, .... (you get the idea).
Well, but octagons are a RS-274X pad macro primitive, both flashed and
stroked, so they are fair game for footprint pad construction.
I'd prefer to model things more generically in future, not by using
classes of template objects.

If we can always model a pad as a polygon / polycurve, it cuts out the
multiple choice code-paths where we must select ("Is it square-ended, is
it round-ended, (is it an octagon)"...)
Post by Dave Curtis
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?
Square pads are already broken for rotation, no need to add octagons to
the list of broken geometric primitives as well!
Post by Dave Curtis
Bonus points for allowing "HOLES" to be non-round (poly-curve) too, to
Post by Peter C.J. Clifton
support manufacturing slots ;)
(And for footprints which use slots to pass wide tabs on a big power
connector, for example.)
How are footprint slots communicated to the fab house? Outline layer
paths are routed after fab, but slots would need to be routed
pre-plating. Would another mechanical layer be added that contains slot
routing information? And do you communicate slot outlines or a toolpath
and tool diamater?
Its been a while since I was involved on a board which used them, but
IIRC, we manually pasted the relevant outline contours onto an unused
layer, which the fab used as a pre-plating process route-layer.

I think the communicated data was interpreted much as outlines usually
are.. they cut so the edge of the cutter follows along the centreline of
your layer geometry.

A more robust communication would just be the contour, with no width -
but gerber doesn't really do that. (I guess in theory, the outline trace
could be made with a 0-width aperture, but PCB doesn't natively support
this at the moment).
--
Peter Clifton <peter.clifton-j0HF+osULJQMjHSeoOxd2MuBeof9RJB+Wmv/***@public.gmane.org>

Clifton Electronics
Dave Curtis
2014-07-22 04:41:08 UTC
Permalink
Post by Peter Clifton
Post by Dave Curtis
Post by Peter C.J. Clifton
Post by Dave Curtis
Post by DJ Delorie
Post by Dave Curtis
"octagon" flag appears to do nothing on Pad[] directives. Is this
correct?
Correct.
Is that by plan? A friend and I are looking at "challenging footprint
specs" (we're easily entertained..) and I've seen a couple where an
interpolated octagon could be helpful.
Thats a poly-curve.
(As are ROUND pads, obround pads, square, .... (you get the idea).
Well, but octagons are a RS-274X pad macro primitive, both flashed and
stroked, so they are fair game for footprint pad construction.
I'd prefer to model things more generically in future, not by using
classes of template objects.
If we can always model a pad as a polygon / polycurve, it cuts out the
multiple choice code-paths where we must select ("Is it square-ended, is
it round-ended, (is it an octagon)"...)
While I'm all for mathematical elegance and generalization, it seems
like that kind of decomposition works against us here. A drawing model
which targets the available primitives is going to require a lot less
code trying to re-construct what the user intended. Data sheet
footprints are going to assume RS-274X macros. Drawing them in some
other model and expecting the tool to reconstitute the macros from soup
is just making life hard for ourselves.
Post by Peter Clifton
Post by Dave Curtis
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?
Square pads are already broken for rotation, no need to add octagons to
the list of broken geometric primitives as well!
Now that I understand that square pads are not being drawn using a
square aperture, it makes sense. I think you made the point of my
paragraph above for me.

-dave
DJ Delorie
2014-07-22 04:43:49 UTC
Permalink
Data sheet footprints are going to assume RS-274X macros.
That one made me laugh :-)
Dave Curtis
2014-07-22 06:18:43 UTC
Permalink
Post by DJ Delorie
Data sheet footprints are going to assume RS-274X macros.
That one made me laugh :-)
Well, I've been spending a lot of time lately looking at footprint
examples, and even the most obscure have a reasonable aperture macro
decomposition. If you have an example of one that doesn't, please send
it to me to add to my collection.
DJ Delorie
2014-07-22 15:50:27 UTC
Permalink
http://www.bourns.com/data/global/pdfs/SRR6038.pdf
Dave Curtis
2014-07-22 17:27:20 UTC
Permalink
Post by DJ Delorie
http://www.bourns.com/data/global/pdfs/SRR6038.pdf
Start with this example of a round-cornered rectangle, copy/pasted from
the RS-274X spec:

%AMRECTROUNDCORNERS*
0 Rectangle with rounded corners. *
0 Offsets $4 and $5 are interpreted as the *
0 offset of the flash origin from the pad center. *
0 First create horizontal rectangle. *
21,1,$1,$2-$3-$3,0-$4,0-$5,0*
90
Copyright Ucamco NV.
0 From now on, use width and height half-sizes. *
$9=$1/2*
$8=$2/2*
0 Add top and bottom rectangles. *
22,1,$1-$3-$3,$3,0-$9+$3-$4,$8-$3-$5,0*
22,1,$1-$3-$3,$3,0-$9+$3-$4,0-$8-$5,0*
0 Add circles at the corners. *
1,1,$3+$3,0-$4+$9-$3,0-$5+$8-$3*
1,1,$3+$3,0-$4-$9+$3,0-$5+$8-$3*
1,1,$3+$3,0-$4-$9+$3,0-$5-$8+$3*
1,1,$3+$3,0-$4+$9-$3,0-$5-$8+$3*%

Then add a primitive circle with exposure "off" to erase the circle, and
another primitive rectangle with exposure "off" to erase the rest of the
gap. Done. That flashes the whole footprint in one go.

Or, you could create a macro for just one of the pads by doing a base
rectangle, a filler rectangle at the top, two circles for the round
corners, and one circle with exposure "off". Then use that pad twice to
create the part footprint. Overall, this would be a simpler macro.
Dave Curtis
2014-07-23 02:23:42 UTC
Permalink
So if anyone has any other footprints that appear to be nasty cases, I
would like to add them to my collection. One of the things DJ's example
did is convince me that "exposure off" (erasure) is a necessary part of
modeling footprints entirely in aperture macros. Additive drawing of
RS-274X primitives is insufficient in the general case.

-dave
Post by Dave Curtis
Post by DJ Delorie
http://www.bourns.com/data/global/pdfs/SRR6038.pdf
Start with this example of a round-cornered rectangle, copy/pasted from
%AMRECTROUNDCORNERS*
0 Rectangle with rounded corners. *
0 Offsets $4 and $5 are interpreted as the *
0 offset of the flash origin from the pad center. *
0 First create horizontal rectangle. *
21,1,$1,$2-$3-$3,0-$4,0-$5,0*
90
Copyright Ucamco NV.
0 From now on, use width and height half-sizes. *
$9=$1/2*
$8=$2/2*
0 Add top and bottom rectangles. *
22,1,$1-$3-$3,$3,0-$9+$3-$4,$8-$3-$5,0*
22,1,$1-$3-$3,$3,0-$9+$3-$4,0-$8-$5,0*
0 Add circles at the corners. *
1,1,$3+$3,0-$4+$9-$3,0-$5+$8-$3*
1,1,$3+$3,0-$4-$9+$3,0-$5+$8-$3*
1,1,$3+$3,0-$4-$9+$3,0-$5-$8+$3*
1,1,$3+$3,0-$4+$9-$3,0-$5-$8+$3*%
Then add a primitive circle with exposure "off" to erase the circle, and
another primitive rectangle with exposure "off" to erase the rest of the
gap. Done. That flashes the whole footprint in one go.
Or, you could create a macro for just one of the pads by doing a base
rectangle, a filler rectangle at the top, two circles for the round
corners, and one circle with exposure "off". Then use that pad twice to
create the part footprint. Overall, this would be a simpler macro.
Loading...