These questions are for those who know the custom rules system, maybe @JeffYoung.
1. Is it possible to apply a rule to instances of certain footprint, so that for example all MyLib:0402resistor are affected? I wonder if there could be for example a property “Footprint” for all items inside footprints, and then “LibraryLink” for the Footprint which can be reached from the inner items.
2. Should a custom rule for pad clearance override Clearances → Pad clearance in Pad properties? I have a rule:
(version 1)
(rule "padclearanceinsidesamefootprint"
(condition "A.Type == 'Pad' && B.Type == 'Pad' && A.Parent == B.Parent")
(constraint clearance(min 0.15mm))
)
which, as far as I can see, should affect the pad clearance inside any footprint. But it doesn’t, and Clearance Resolution doesn’t apply the custom rule:
Layer F.Cu
Pad 1 [<no net>] of REF** on F.Cu [netclass Default]
Pad 2 [<no net>] of REF** on F.Cu [netclass Default]
Local override on Pad 1 [<no net>] of REF** on F.Cu; clearance: 1,0000 mm.
Local override on Pad 2 [<no net>] of REF** on F.Cu; clearance: 1,0000 mm.
Resolved clearance: 1 mm.
(BTW, “Parent” should be documented better. The current documentation says “Returns the unique identifier of the parent object of this object”. What is “parent object”? I found out that the footprint is the parent of the pad, though.)
If I remove the customized pad clearance in the pad Properties, the rule works. So I wonder if the rule applying order is this on purpose or an oversight.