How to check text (refdes, text) height in a custom rule?

Most plain vanilla cheap PCB manufacturers require a minimum silkscreen legend text height of 40mil.
How can I check that in a custom rule? There is no item like text_height or height.
Is there a complete documentation of the url items and clauses?

Thx and sorry if I did not read something that would be easily available (point me there).

2 Likes

There is currently no way to do that. @JeffYoung I recall we discussed adding an “assertion” constraint but can’t find an issue for it, do you know if it’s already tracked somewher?

There was a discussion about severity clauses like “error”, “warning” or “info”, if memory serves me. Isn’t it even planned for V7?
But then, even if it is an error as in the current implementation, I am lacking the items like text_height or something.

Severity clauses are planned, but wouldn’t help this case. The problem is that there is no constraint right now that can check text height. An assertion constraint would allow you to do something like (hypothetical syntax):

(rule "Text height"
    (condition "A.Layer =='*.SilkS' && A.Type == 'Board Text'")
    (constraint assert "A.Height >= 40mil"))

https://docs.kicad.org/master/en/pcbnew/pcbnew.html#custom_design_rules

Thanks. Embarrassing :flushed:

… and .Height would be any class member of the respective item’s class? If so: very nice.

Yes, exactly. Any expression that can be formed using the properties of each item and will evaluate to true or false would be possible.

Where can I upvote that? :slight_smile: (Just kidding)

Like I said, I don’t think anyone created an issue for it yet but waiting for Jeff to confirm.

In case nobody did, I will go ahead and file a wishlist item in the bug tracker as soon as Jeff’s answer is in.

It’s already implemented in 7.0 (as a first-class rule, not as a custom rule).

Text height, or assertions? If assertions isn’t already implemented, we should still open an issue to track that.

Both.
(Although obviously assertions are custom rules.)

3 Likes

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