I’m using the latest KiCad 7, and I am designing a board with a USB connector (C530616 from LCSC) that has plastic alignment pins that are very close to the pads (about 0.09 mm). The normal board constraints flag this in the DRC check. So I wanted to create a custom rules for this.
I have tried:
( rule narrow_npth_clearance
( condition "A.Pad_Type == 'NPTH, mechanical'" )
( constraint clearance ( min 0.08mm ) )
( constraint edge_clearance ( min 0.08mm ) )
( constraint hole_clearance ( min 0.08mm ) )
)
But DRC still flags the errors.
When I do inspect on constraints and clearance I get no output.
I also tried to limit the selection to the specific footprint:
( rule USB_plug_overrides
( condition "'Library ID' == 'my-connectors:USB Type C C530616'" )
( constraint clearance ( min 0.08mm ) )
)
But no luck there either.
Anyone have any tips to what is wrong with my rules?
I made a little project to demonstrate the issue:
kicad_custom_rules_test.zip (157.6 KB)