Otto
1
I try to make a custom rule to check the assembly drawing is readable.
(version 2)
(rule “via_not_in_pad”
(condition “A.Type == ‘via’ && B.Type == ‘pad’”)
(constraint physical_hole_clearance (min 0.01mm))
)
(rule “assembly drawing is readable”
(layer “F.Fab”)
(constraint clearance (min 0.1mm))
(condition “A.Type == ‘Text’ && B.Type == ‘Graphic’”)
)
The rule (the second one) is accepted but does not generate errors. Any Idea?
Thanks a lot
Unbenanntes Diagramm.drawio (4.9 KB)
Use physical_clearance
. clearance
is for electrical clearance and fab graphics don’t have electrical connectivity.
Otto
3
Thanks a lot — that is correct. Using physical clearance generates the expected errors.
Unfortunately, errors are also caused by text that is not visible. How can the property text.visible be used correctly?
(rule “assembly drawing is readable”
(layer “b1 F.Fab”)
(constraint physical_clearance(min 0.01mm))
(condition “A.Type == ‘Text’ && B.Type == ‘*’”)
)
same with
(rule “assembly drawing is readable”
(layer “b1 F.Fab”)
(constraint physical_clearance(min 0.01mm))
(condition “A.Type == ‘Text’ && B.Type == ‘Graphic’”)
)
Looks like A.Visible
works.
Also you don’t need to check B.Type == Graphic
, as this won’t catch text-to-text collisions.
(rule "assembly drawing is readable"
(layer "F.Fab")
(constraint physical_clearance(min 0.01mm))
(condition "A.Type == 'Text' && A.Visible")
)
But probably the clearance checks should just consider the visibility of the text: DRC: physcial clearance doesn't consider text visbility (#21625) · Issues · KiCad / KiCad Source Code / kicad · GitLab
Otto
5
This also reports collisions involving non-visible text.
I have the impression that you always need A and B for a clearance constraint.
Finally, I split the rule:
(rule “assembly drawing text overlaps graphic”
(layer “b1 F.Fab”)
(constraint physical_clearance(min 0.01mm))
(condition “A.Type == ‘Text’ && A.Visible && B.Type == ‘Graphic’”)
)
(rule “assembly drawing text overlaps text”
(layer “b1 F.Fab”)
(constraint physical_clearance(min 0.01mm))
(condition “A.Type == ‘Text’ && A.Visible && B.Visible”)
)
I seems it works fine.
Thank you very much for your help!
Regards
1 Like