Trouble with Custom Design Rules for USB Connector

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)

Please read and follow the advice in this FAQ-article: New Member Information

If you fulfill the requirements you can promote yourself to basic-user level.
Subsequently you are allowed to attach your project (use kicad main manager–>File–>Archive project).
If you provide a example project to play with I think more forum-members are willing to look into this custom rules-problem.

2 Likes

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