HI
I need to write rules specific to some PCB designator , and or PCB footprint name.
Can be a match or a simple match / wildcard *, or REGEX.
I cant find in the syntax helper or doco the description for the syntax for this, I cant seem to make it work.
Any suggestions / assistance much appreciated.
Specific instance is different types of connection to the copper zone are required. (relief, solid) and on different layers , based on match with a component designator or footprint name
you can match a reference designator, or multiple reference designators, with a condition clause like (condition "A.Reference =='R1'). There’s an example with wildcards:
(rule "Distance between test points"
(constraint courtyard_clearance (min 1.5mm))
(condition "A.Reference =='TP*' && B.Reference == 'TP*"))
However this applies the rule to the footprint, whereas it sounds like you want to apply the rule to the pads of the footprint.
For that you could use the memberOfFootprint() function, which would be a condition clause like this: (condition A.memberOfFootprint('R1')). This function is new in v8. There are ways to achieve this in v7, too, but it’s a little harder.
Ah, you’re reading the 7.0 documentation but you should be reading the 8.0 documentation (currently called “master” but that will change when 8.0 is fully released). Change the little 7.0 dropdown in the top right of the documentation to master.
I just checked, it’s in the syntax help too, towards the bottom of the the “expression functions” section. I hope we can do some reformatting of that dialog for v9 - it’s getting pretty long.
The custom constraints were brand spanking new in KiCad V6. About 3 years of development went into KiCad V6. It was a huge leap forward, but also a long wait for a lot of users. After that it was decided to switch to a (roughly) yearly release cycle.
There is also a tradition to create a “Post Vx new featers and development news” thread each year, in which features are posted when they get added to KiCad-Nightly Vx.99. It’s a nice log to see the development speed in KiCad, and to have an overview for when you update your own KiCad version.
thanks for that.
I might end up with 20 pages of custom constraints. I will write some sort of Python based WX tool ( I write in WX for Python for my PnP processes) to break up the rules into sections. Otherwise, chaos reigns. I found the dru file.
OK, so can someone please help with with this one.
The 1st rule worked, the 2nd rule did not. In the 2nd rule, I am trying to ensure that pads that connect to the zone are solid , always for this type of component. thanks !
OK, read the library link discussion, thanks.
So it doesnt work, (bug) or not the way I think it works ?
"Member of Footprint " for me means, it’s a pad of a footprint xyz.
This is essential for say, mounting holes that have a library namne “MH_M3WIDE” etc, without having to resort to designator specifically. Although I gather wildcards work (like MH* instead of MH1, MH2, MH3 etc) -g