[SOLVED] PcbNew 6.99: DRC footprint check for SMD footprints with THT pads

@JeffYoung SMD footprints can have pads. Think SMD components with exposed pads and THT pads to connect to a zone (on a different plane, thermal vias).
They are SMD in essence. Containing THT pads they are technically classified ‘THT’ and trigger a footprint type mismatch error running DRC.
Having a large number of said footprints, it is very uncomfortabe to exclude those errors, given the current DRC error handling “UI”.
No idea what could be done

I’m not the author of that test; I only ported it to the DRC framework.

(I don’t do SMD at all personally, so I don’t have much of an opinion.)

It’s unclear to me what is the original purpose of this attribute. If I have understood correctly, it comes from external needs and is not primarily for the EDA design phase. I can see how it can be useful for the assembly phase to include/exclude components from a position file. But I wonder if it would be better to have an explicit “exclude from position file” option. Whether or not a footprint is for an SMD or THT component isn’t a matter of choice; a component has only SMD pads, only THT pads, or both. How it is handled in assembly may depend on other factors. In any case, if the need for the attribute comes from some external source (e.g. gerber or other format), it may not be a good idea to use it for the internals and implementation of the design system unless it can be guaranteed to be correct for that purpose.

Fully agree. Only thing I could conceive of is statistics for order preparation. SMD component count maybe/is a parameter for assembly cost calculation.
But then the check can be set to “ignore” in the violation severities…

I examined the code and it doesn’t look at vias at all. So I assume your “thermal vias” are actually pads. If you set their Fabrication Property to “Heatsink” the footprint type checker will ignore them.

1 Like

Oh, I never thought of fab properties for pads. Thanks for the hint and your effort.

BUT: there are footprints with thermal vias (they are called so in the filename) in the standard libraries. I checked a few: none seems to have the fab property set to “Heatsink pads”. I could contribute and change that, but maybe this makes no sense until V7 is out. I’ll make a note to myself to raise the issue then.

1 Like

I think you can go ahead and submit a MR to the library team now. We’d want the fixed versions bundled into V7, so it does need to be done before V7 ships…

Ok. Did that now, starting with 2 directories. My first commit (or rather merge request) ever, age 69.
Feel like a schoolboy waiting for test results :smile:

1 Like

Don’t be too quick with manually editing / updating KiCad’s default libraries.
Quite a lot of the footprints in those libraries are generated via scripts, and the correct way to update them would therefore be to update the scripts and run them.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.