Custom design rules not working on backside of the board

Hello everyone,

I could use some help on custom design rules again.
Consider the rule following

(rule TP
	(layer outer)
	(condition "A.insideCourtyard('TP*')")
	(constraint clearance (min 1mm))

If I apply this I see clearance ring immediately grow into larger size

However, if I flip this to back, the clearance shrinks to original size

Care to point out what I’m doing wrong?
Thanks again,

I can observe the same behavior in KiCad 6.0.4. The rule seems fine and works for THT Testpoints on both outer layers and SMD Testpoints on the TOP layer. The BOTTOM layer clearance for SMD Testpoints is not adjusted.

There may be a different condition for the backside courtyard. See the syntax help. This may have changed a bit for the upcoming v7. I haven’t tested it. It may depend on the non-flipped/flipped status of the footprint.

EDIT: insideCourtyard vs insideBackCourtyard. IIRC recognizing this problem/bug resulted to some changes, and in v7 there’s a condition named “intersectsCourtyard” which should check for both front and back. (“insideCourtyard” is deprecated.)

Expression functions
All function parameters support simple wildcards (* and ?).

True if any part of A lies within the given footprint’s principal courtyard.

True if any part of A lies within the given footprint’s front courtyard.

True if any part of A lies within the given footprint’s back courtyard.

The clearance ring seems to depend on the displayed/active layer:

  • F.copper active: clearance on top-side smd-pad (and all THT-pads) == 1mm
  • B.copper active: clearance on bottom-side smd-pad (and all THT-pads) == 1mm

edit: test done with v7

Yes it is true that the active layer needs to be changed in order to see the clearance ring. But the ring itself is not consistent with the design rules. Mine is 6.0.11 So I guess I would have to wait for 7 to be a stable release.

Maybe it will be resolved with upgrading to V7. Thanks for the info

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