Traces instead of pad on Gerber output

Can you then say what is the standard way to do it in gerber format?

https://www.ucamco.com/files/downloads/file_en/399/the-gerber-file-format-specification-revision-2020-09_en.pdf#page=55 says aperture macros are meant for this case, not regions.

https://www.ucamco.com/files/downloads/file_en/399/the-gerber-file-format-specification-revision-2020-09_en.pdf#page=69 has an example how to do roundrects.

Not sure if it’s reasonable to continue this thread here.
I suggest submitting an issue.

Yet the doc says in p. 97:

Aperture attributes can be attached to a region, see 5.3.1.

And in 5.1.3:

Example:
%TA.AperFunction,ComponentPad*%

4.4.2.6 in conjunction with 5.3.1, 2.3 and 4.4.6.4 leads me to the conclusion that while we may generating syntactically valid files, we’re still not doing it the way it’s supposed to be done.

Perhaps some real gerber experts should weigh in. On GitLab, not here.

Edit: Also https://www.ucamco.com/files/downloads/file_en/130/pcb-fabrication-data-a-guide_en.pdf#page=29 isn’t particularly subtle about

All pads must be flashes. All flashes must be pads.

I’m trying with 5.99, plotting one roundrect pad. Gerber isn’t easily human readable, but to me it looks like it does a flash (with the region).

EDIT: No, I draw that back.

The spec is somewhat contradictory, I feel. On the one hand they say that a pad must be a flash, and on the other hand they provide an explicit mechanism to tell it a region is an SMD pad. I understand a pad must consist of a single object, for many reasons. One is that there is no attribute ‘this is part of a pad’.
My take is that this quote was against painted pads, and it means: pads must not be painted. They probably forgot about regions.
Some example Gerber files on the Ucamco website are from KiCad. I suppose they all use pad-regions. Clearly, Ucamco is OK with that, I think.

I don’t think this is a good idea. A pad now is several objects. This is equivalent to painting. It would get the image right, but you still don’t know what the pad is. Your fabricator has the image right, that is not the issue.
The remedy is worse than the disease.

This is a reference roundrect (Ucamco SMD_prim_20):

This is a KiCad 5.99 roundrect:

They provide a mechanism, but they don’t say ComponentPad/SMDPad in particular are supposed to be used as region attributes.
Everything else in the spec seems to suggest they shouldn’t.

Do you have a specific example? The ones I found (and mentioned above) don’t do it the KiCad way.

So it looks like KiCad directly uses a polygon / region as a pad, and Ucamco suggests to use a macro to define a flash code and use a flash code for a pad.

Is this correct?
(My knowledge of the Gerber file format is pretty limitited)

It does sound logical though. Typically an IC has many pads of the same size, and defining the outline of a pad once and then re-using it makes sense.

[Edit]
This is also reflected in the Ucamco document, Page 29 that chschlue linked to earlier, and I repeat:
All pads must be flashes. All flashes must be pads.

There is a sample file with components that comes from KiCad. Take the F copper layer. It contains pad-regions.


This is an image in their viewer, it shows such a pad and coordinates. If you inspect the region, it tells you it is an SMD pad. It their reference viewer shows it like this, I suppose it is OK, and the spec is misleading.

Got one (from the-gerber-file-format-x3-kicad-x3-sample_en):

Still, I don’t think that’s how it was meant to be (I’m not disputing it’s a valid file)

Our messages crossed. Indeed, valid or not, that is not clear. But it is clear it is an SMD pad, and it is some kind of weird limitation in the fabricator’s software.

Yes.

That it’s technically somehow possible to do it the way KiCad does it doesn’t mean it’s a good way.
OTOH, the OP’s fab should be able to deal with the current output.

True.

But why do it strangely? Just to make a point that it’s not explicitly forbidden?
Doesn’t make sense to me.

@chschlue, do you have a gitlab account? Could you report this?

Because this seems to require some specialized knowledge, we can also summon some developers here, @Seth_h, @JeffYoung or @craftyjon lurk here sometimes.

To sum this up, chschlue said about the gerber roundrect pads generated by KiCad and the official ucamco gerber spec:

KiCad generates roundrect pads as regions but doesn’t seem to flash them. The docs aren’t clear but the linked document seems to say that all pads should be flashed.

Just noticed the OP already did.

Edit: Which got closed… I’ll try and open one with a more specific description.

Please do that, the issue and also the title of this thread don’t describe the underlying problem accurately. But thanks to @vignesh_waran for the patience and for reporting it.

1 Like

Feel free to comment in case I missed an important aspect.