[PEDA] Octagonal Pads (was Re: moving to ad6)

Geoff Harland g_harland at optusnet.com.au
Tue Nov 21 00:16:06 CST 2006


Harry,

Thanks for conducting the tests which I suggested, and for reporting the
results to everyone. There have been assorted occasions when I have
criticised Altium for failing to provide basic functionality in a bug-free
manner, but in this particular case, it does look like they really have
given some thought as to what would be involved in properly supporting a new
type of shape for pads.

However something else which I am not yet certain about involves pads which
have an octagonal shape. Within the release notes which were provided for
SP3 (for AD6) is the following item:

"Rotated octagonal pads are now exported correctly to Gerber."

*If* the wording of that item had, instead, actually been something like
this:

"Octagonal pads are now always exported correctly to Gerber."

then that would have suggested that such pads are in fact correctly depicted
within Gerber files, *BUT* ...

my experience, with *all* versions of Protel/AD up until SP4 for AD 2004
(the last SP released for that version), is that pads which have an
Octagonal Shape property have *NEVER* been depicted properly within Gerber
files, and that is the case regardless of the relative values of their
X-Size and Y-Size properties (equal or otherwise), and regardless of the
values of their Rotation properties (zero degrees or otherwise).

In the particular case of octagonal pads which have equal X-Size and Y-Size
properties, and an Angle property of zero degrees, the manner in which such
pads have been depicted within Gerber files (which incorporate embedded
aperture definitions) has long been in the form of a "regular" octagon (all
sides of equal length, and all internal angles (between adjacent sides) of
equal value (to wit, 135 degrees)).

For all that though, the details have still been incorrect in two different
ways:

1. The *orientation* of that octagon is incorrect; it *should* have two
horizontal edges and two vertical edges (like the "source" pad within the
PCB document file); however, the octagon which really is depicted has *no*
horizontal edges and *no* vertical edges.

2. The *size* of that octagon is also incorrect; it *should* be larger by a
factor of the secant of 22.5 degrees (which can be expressed in the
"radical" form of SQRT(4 -SQRT(8)), as can be verified by a bit of
trigonometry and algebra).

The problem, as I see it, comes down to how to interpret the section of the
RS-274X standard (which specifies how to specify embedded aperture
definitions within Gerber files) which specifies Aperture Definitions which
have a (regular) "Polygonal" shape.

*My* interpretation of that section, which is *also* shared by (at least)
Graphicode's GC-Prevue application, and also by Altium's CAMtastic server
(or at least up until the SP4 version of AD 2004), is that any such Aperture
Definition which has a Rotation property of zero degrees always has a vertex
residing on the positive X-axis (and thus, in the particular case of such an
aperture which has eight sides, also has a vertex on the negative X axis,
and a vertex on the positive Y axis, and a vertex on the negative Y axis).
And that the "Outside Dimension" property specifies the distance between
"opposite" *vertices* (or at least in the case of such apertures which have
an *even* number of sides).

However Altium's software for creating Gerber files from PCB files seems to
have long interpreted that section as specifying that when such an aperture
has a Rotation property of zero degrees, then the positive X-axis passes
through the mid-point of one of the edges. And it also seems to have
interpreted the "Outside Dimension" property as specifying the distance
between "opposite" *edges*.

In my opinion, that section of the RS-274X standard is definitely not as
clear as it could be. (Somewhat perversely though, it could reasonably be
argued that some other sections of the same standard are "over specified"
instead.)

One extract:
"... The first point is located on the X axis. May be rotated ±360° from the
X-axis. ..."

 And another (immediately preceding) extract:
"... To define a solid aperture, enter only the outside dimension and number
of sides (3 to 12). ..."

That said, I can only repeat how the GC-Prevue application and the CAMtastic
server have interpreted that definition; a Polygonal Aperture Definition
with a Rotation property of zero degrees (and a "Number of Sides" property
of 8) is depicted as having two vertices on the X axis and two vertices on
the Y axis, and the "Outside Dimension" property matches the distance
between "opposite" *vertices*.

At one time, all pads (within PCB files) which had equal X-Size and Y-Size
properties, and a Rotation property which was an integral multiple of 90
degrees, were depicted within Gerber files as having an octagonal shape (but
with an incorrect orientation and size), but at some stage (IIRC, with one
of the SPs released for Protel 99 SE), only such pads which had a Rotation
property of zero degrees continued to be depicted in that manner, while such
pads having a Rotation property which was a non-zero integral multiple of 90
degrees, were thenceforth depicted as having a *circular* shape instead.

And all *other* pads having an Octagonal Shape property (i.e. unequal X-Size
and Y-Size properties, and/or a Rotation property which is not an integral
multiple of 90 degrees) have long been depicted within Gerber files as
though they actually have a *Round* Shape property (instead of an Octagonal
Shape property).

The bottom line, however, is that it is *always* possible to correctly
depict *any* pad which has an Octagonal Shape property within Gerber files,
and regardless of whether or not such a pad has equal X-Size and Y-Size
properties, and also regardless of whether or not its Rotation property is
an integral multiple of 90 degrees.

That can be proved by creating ODB++ files from a PCB file (which contains
an assortment of pads which have an Octagonal Shape property), and after
those (ODB++) files are subsequently displayed within a CAMtastic file,
exporting the contents of that CAMtastic file into Gerber files, and then
importing those Gerber files into a different (and originally "blank")
CAMtastic file. (Or at least all of that can be done with the SP4 version of
AD 2004.)

Such pads are correctly depicted within Gerber files by the use of "Aperture
Macros" of an "Outline" type (which have an associated "Primitive Number"
property value of 4). And while it would not be absolutely necessary to use
those macros to depict any pads which have equal X-Size and Y-Size
properties (because such pads *could* *always* alternatively be depicted by
the use of Polygonal Aperture Definitions, which are distinctly "simpler" in
nature than "Outline" type "Aperture Macros"), an advantage of *always*
using "Outline" type "Aperture Macros" (for *all* pads having an Octagonal
Shape) is that their use would eliminate the confusion that has been created
as a consequence of Altium "polluting" the RS-274X standard.

I am saying that Altium has "polluted" the RS-274X standard because some PCB
manufacturers have become "accustomed" to interpreting Polygonal Aperture
Definitions in the same way that Altium's software has, so if you actually
attempt to rectify those definitions within Gerber files (by changing the
value of the Rotation property from zero degrees to 22.5 degrees, and by
"magnifying" the value of the "Outside Dimension" property by the secant of
22.5 degrees), then there is a risk that your PCB will be "mis-manufactured"
as a consequence of the PCB manufacturer interpreting the Polygonal Aperture
Definitions in the same way that Altium's software has (rather than how I
believe that such definitions *should* be interpreted). I speak from
experience, but with the qualification that I was lucky in that a PCB
manufacturer actually called me to enquire whether I "really wanted rotated
octagonal pads" within the PCBs which I was ordering at the time.

So what I am saying is that what the software *should* be doing is to
specify "Outline" type "Aperture Macros" within the Gerber files whenever
*any* pad having an Octagonal shape is to be depicted (as doing so will
always result in such pads always being depicted correctly, and also avoid
any problems due to the RS-274X standard having been "polluted").

However, I can't help suspecting (based on the item contained within the
Release Notes for SP3 for AD 6) that what has *really* happened is that
octagonal pads which have equal X-Size and Y-Size properties, and a Rotation
property which is a non-zero integral multiple of 90 degrees, are once again
being incorrectly depicted using Polygonal Aperture Definitions, instead of
as having a circular shape, and as such, there is still an outstanding issue
which affects *every* pad which has an Octagonal shape...

As I mentioned before, you could create ODB++ files from a PCB file, then
export Gerber files from the CAMtastic file depicting the ODB++ files, but
doing that definitely requires distinctly more work. And it shouldn't be
necessary to have to jump through those additional hoops, so whenever users
were to opt for the more direct (and logical) option of generating Gerber
files *directly*, then the contents of those Gerber files *should* *always*
be fully "kosher"...

Regards,
Geoff Harland.


Harry Selfridge wrote:
> Geoff,
>
> I thought it would be interesting to take your
> challenge and try the tests you proposed with "rounded rectangular pad
shape".
>
> AD6.6 passes all the tests you proposed.  I used
> three different CAM editors to look at the
> Gerbers - CAMTASTIC, CAM350 and Pentalogix
> Viewmaster.  I used decimal values for pad
> rotation, such as 77.6deg, and 267.8deg, in
> addition to rotation in 45deg increments.  There were NO errors in any
file.
>
> Library production and usage were error free.
>
> The ASCII PCB file clearly shows
> "SHAPE=ROUNDEDRECTANGLE" for every line
> referencing the new pad shape.  That file reopens properly in AD6.6.
>
> Etc, etc...
>
> I can provide the Gerbers if you would like to satisfy yourself.
>
> Harry
>
>
> <snip>
> >I have read that the most recent SP now provides support for pads which
have
> >a Rounded Rectangular shape. Here are some questions for those who do
have
> >AD6, and who have also installed that SP:
> >
> >1. If you save a PCB file (which contains at least one such pad) in an
ASCII
> >(text) format, and then inspect the contents of that file (using Notepad,
> >for instance), are the properties of that pad (/those pads) listed in a
> >recognisable and comprehensive manner?
> >
> >2. Assuming that the ASCII file is in fact OK in that regard, can you
> >subsequently reopen that file and then the pad(s) concerned have the same
> >properties as before (that file was closed)? (Tip: When you look at that
> >file using Notepad, *don't* try resaving it at that time, because if you
do,
> >there is a possibility that the file will not reopen (in AD6) without
> >"drama". Some lines within the file end with the x0D (/ #13 / CR)
character
> >followed by the #0A (/ #10 / LF) character, while other lines end with
> >*just* the x0D character, and if you resave that file, then *all* of the
> >lines will subsequently end with the x0D character followed by the #0A
> >character. AD6 could well subsequently "think" that that file is not an
> >AD6-compliant file, and you could have to redefine the boundary of the
PCB,
> >amongst other tasks.)
> >
> >3. If you create a Gerber file from a PCB file containing at least one
such
> >pad, does the CAMtastic file which is subsequently created depict the
pad(s)
> >concerned in an appropriate manner? And are the pad(s) still correctly
> >depicted when you create a Gerber file in a mirrored form? And do both
> >Gerber files still look OK when such pads have an assortment of Angle
> >properties, e.g. for every integral multiple of 45 degrees, and for an
> >intermediate value within every "semi-quadrant"?
> >
> >4. If you preview those Gerber files (i.e both an unmirrored Gerber file
and
> >a mirrored Gerber file) using a "third party" application (for instance,
> >Graphicode's GC-Prevue application), are all of the pads concerned still
> >depicted in an appropriate manner (and within both of those Gerber
files)?
> >
> >5. If you create one or more components which incorporate such pads, are
all
> >of the relevant properties properly copied to the footprint(s) within the
> >PCB Library file which is created when using the Make (PCB) Library
command?
> >(To comprehensively test this would call for at least one component
placed
> >on the Top side of the ("source") PCB and at least one component placed
on
> >the Bottom side; ideally, the properties of at least 16 pads on *each*
side
> >of the PCB should be checked to ensure that Angle properties are
also/still
> >properly handled. But to start off, have just one component with just one
> >such pad, and with both the component and its pad having an Angle
property
> >of zero degrees. There's no point in testing more comprehensively if that
> >server can't even "copy" that pad properly.)
> >
> >*If* all of those tests pass with flying colours, then that would
indicate a
> >level of professionalism by Altium which is above and beyond what I have
> >been accustomed to within the versions preceding AD 6. (When Embedded
Board
> >Array objects were first provided (in AD 2004), they wouldn't even pass
test
> ># 1 above.)
> >
> >Nobody is under any obligation to undertake any of the above tests of
> >course, but if you want peace of mind, it would still be helpful to
> >determine whether any of those tests fail before you contemplate
"relying"
> >on AD 6 in supporting this new type of pad.
> >
> >Regards,
> >Geoff Harland.
<snip>





More information about the PEDA mailing list