Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default REGEX_EXCLUDE footprint name filter excludes components whose footprint names contain "MountingHoles" #169

Open
ghost opened this issue Apr 20, 2022 · 4 comments

Comments

@ghost
Copy link

ghost commented Apr 20, 2022

Default REGEX_EXCLUDE footprint name filter excludes some components whose footprint names contain "MountingHoles".

Per the default bom.ini, a component whose footprint field is "PROJ_LIB:DSUB-9_Female_Vertical_P2.77x2.84mm_MountingHoles" would be matched by the default filter (below) and silently excluded from the BOM.

[REGEX_EXCLUDE]
; A series of regular expressions used to exclude parts from the BoM
; If a component matches ANY of these, it will be excluded from the BoM
; Column names are case-insensitive
; Format is: "[ColumName] [Regex]" (separated by a tab
References      ^TP[0-9]*
References      ^FID
Part    mount.*hole
Part    solder.*bridge
Part    test.*point
Footprint       test.*point
Footprint       mount.*hole
Footprint       fiducial
@SchrodingersGat
Copy link
Owner

@phansel thanks for reporting. Would you be willing to submit a PR to fix this?

@ghost
Copy link
Author

ghost commented Apr 21, 2022

I have a couple theories on how we could address this:

  • Expand the References list
  • Edit the KiCAD standard library so that SMT test points and mounting holes have DNI already populated
  • Match only if the footprint and the part match MH/MK/TP/FID
  • Prompt the user or pass a warning in the BOM generation terminal

@set-soft
Copy link
Contributor

set-soft commented Apr 21, 2022

Looking at the current KiCad 6 library I see that real mounting holes starts its name with MountingHole_ all other components that matches mount.*hole doesn't have it at the beginning.

So I think that for KiCad 6 we just need to add a ^

The same seems to be true for the KiCad 5.1.9 lib.

set-soft added a commit to INTI-CMNB/KiBot that referenced this issue Apr 21, 2022
set-soft added a commit to INTI-CMNB/KiBot that referenced this issue May 26, 2022
- Applied to the Footprint
- The ac39118 fix only affected the Part

Related to SchrodingersGat/KiBoM#169
Fixes #201
@hraftery
Copy link
Contributor

hraftery commented Apr 14, 2023

This bit me again with a DSUB-9_Female_Horizontal_P2.77x2.84mm_EdgePinOffset7.70mm_Housed_MountingHolesOffset9.12mm footprint for a DE9 connector. I thought of the same mitigation as @set-soft and I think it could have sufficed for me (if it was applied to Footprint as well!).

But I opted for something less subtle, removing the Part mount.*hole and Footprint mount.*hole lines entirely and adding a References ^H line instead. My rational was its better to have to correct a mistaken BOM entry than unknowingly order a BOM with a missing item, but I'm not sure how universal my motivations are.

Also worth keeping in mind issue #178 , which has the same root cause. Any fix should probably be general enough to catch this family of issues, without making the out-of-the-box experience worse for most users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants