insideCourtyard vs insideBackCourtyard

KiCad 6.0.2.
Rule with “insideCourtyard” condition works well at Front.
But when I move IC to Back, rule does not work. I need to change “insideCourtyard” to “insideBackCourtyard” and add new rule with “insideFrontCourtyard”.

I think it’s not correct, “insideCourtyard” should work both at Front and at Back. Am i right?

Try with 6.0.4. If I remember correctly there were some bugfixes in that area.

1 Like

I’ve checked 6.0.4 - the same:

Rule is:
(rule “small IC”
(constraint clearance (min 0.15mm))
(condition " A.insideCourtyard(‘DD*’) && A.Type==‘Pad’ && B.Type==‘Pad’ "))

Rule works well if i change insideCourtyard → insideBackCourtyard or change condition to
(rule “small IC”
(constraint clearance (min 0.15mm))
(condition " (A.insideBackCourtyard(‘DD*’) || A.insideFrontCourtyard(‘DD*’)) && A.Type==‘Pad’ && B.Type==‘Pad’ "))

Is this semantics. When you flip the footprint to the back, your clearances must be to the B.Courtyard layer

1 Like

It’s not a bug, of course, but wen i see set of
{insideBackCourtyard; insideFrontCourtyard; insideCourtyard}
i think
insideCourtyard == insideFrontCourtyard AND insideBackCourtyard
but not
insideCourtyard == insideFrontCourtyard

I just would like to make KiCad more comfortable… :slight_smile:

I do believe it is a bug, otherwise there is not point on making the *Front and *Back explicit.

Maybe @JeffYoung has a more informed opinion about this ?

What happens if you have a through board component that has (different) courtyards on the two sides and then flip it. Some optical mouse parts do this

in this case i MUST use insideFrontCourtyard + insideBackCourtyard, but not insideCourtyard, i think. Or add different rules, depends on RefDes.

Regarding insideCourtyard(), insideFrontCourtyard(), and insideBackCourtyard(), the documentation says:

Returns true if the any part of the object is inside the courtyard of the given footprint reference. [insideCourtyard()] checks both the front or back courtyard and returns true if the object is inside either one; [insideFrontCourtyard() and insideBackCourtyard()] check a specific courtyard. The * wildcard can be used in the reference: insideCourtyard('R*') would check all footprints with references that start with R .

So, it’s a bug, not feature :frowning:

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