PCB rule system and full list of rule words , and How To?

Where is the full list of what can be in the custom rules ?
The documentation does not seem to have all the listed words and rules.
Can someone maybe point me to the source code location to look at it? I could even do some doco…

I have a zone of copper that is GND top and bottom layer
I have two components R1 and R2 and R3 , thru hole parts they have different footprints

I want to have THERMAL RELIEF for pads of designator R3 for bottom layer copper zone but direct connect for top layer copper zone.
I want to have a DIRECT connection for pads of footprint “AXIAL4” for top layer copper ZONE and bottom layer copper zone.

… and the R3 rule to have precedence, so it goes last.

I could not find how to drive the rules to do this ? how to specify designator and footprint to refer to a component for a rule match ???
thanks, glen

This folder gets you close:

I never looked much at KiCad’s source code. Just went to KiCad on gitlab, and chose the most logical sub directory starting from the top of the source tree. The drc_rule.h file has an enum with a list of constraints.

1 Like

thanks
. anyway else have information on this, and how to implement ?

The documentation for this is very thorough: PCB Editor | 7.0 | English | Documentation | KiCad

(switch the doc version from 7.0 to nightly if you’re using v8)

Of course, thorough documentation does not mean it’s trivial to write your first rules :slight_smile: There are some examples there that might help you get started.

Some more examples:
(Including a big fat arrow to the “Syntax Helper” :slight_smile: )

I dont think Syntax helper is up to date. But that’s something I can go through the code and fix.
I do understand that if I really dont like something or need something, then I can code it… that’s the positive. I’m not really used to working in a big dev group, but I can learn.

The syntax help doesn’t have everything (it’s missing a few classes of objects), but what’s there should be accurate. If it’s not, please file a bug.

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