Hello all,
I’m trying to use custom design rules but some parts of it I do not understand.
First case: this works
(rule "a"
(condition "A.Pad_Type == 'Through-hole'")
(constraint clearance (min 5mm)))
But this does not
(rule "a"
(condition "A.Pad_Type == 'Through-hole' && A.Value == 'HDR*'")
(constraint clearance (min 5mm)))
This does not work as well
(rule "a"
(condition "A.Pad_Type == 'Through-hole' && A.Reference == 'J102'")
(constraint clearance (min 5mm)))
I thought it was a issue with combining ‘Pad_Type’ && something else.
But this works.
(rule edge
(condition "A.Pad_Type == 'SMD' && A.Value != '*Fiducial*'")
(constraint edge_clearance (min 1mm))
)
Without the filter ‘Fiducial’… it catches it. Since the clearance is 0.75mm
(rule edge
(condition "A.Pad_Type == 'SMD'")
(constraint edge_clearance (min 1mm))
)
All of these cases are run in solo. There were no other custom design rules.
A little help would be greatly appreciated.
eelik
February 1, 2023, 10:39am
2
No, never mind if you already read my removed comment…
Ok, here’s something better. Pads don’t have ref, value etc. Footprints do. You can’t extract the parent footprint of a pad with the current rule syntax.
A.Value is for a footprint, but you need a constraint for a pad. I remember there has been discussion about having access to a “parent” item like A.Footprint.Value, but I think it didn’t lead to anything. Maybe @JeffYoung can say more.
Meanwhile you have to use some other condition.
EDIT: for example, customize the footprints so that you add pads to a group named “edgepads”. Then use a rule like this:
(rule edge
(condition "A.memberOf('edgepads')")
(constraint edge_clearance (min -1mm)))
Thanks for the reply, it has shed some light.
The reason why case 4 worked is because it was completely ignored. Somehow combining footprint & pad properties in same object(say, “A”) causing this.
Anyhow there should be a way to combine these logic, any ideas on making this possible?
eelik
February 2, 2023, 11:38am
4
Read the linked thread; you have to use named group or rule area.
Solved it with named group. Thanks!
system
Closed
May 4, 2023, 5:53am
6
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.