Why do my custom design rules override the minimum clearance from the constraints section?

Based on the Configuring Design Rules/Constraints Section in the KiCAD docs it says,

Any minimum value set here is an absolute minimum and cannot be overridden with a more specific design rule. For example, if you need the copper clearance on part of a board to be 0.2mm and in the rest 0.3mm, you must enter 0.2mm for the minimum copper clearance in the Constraints section and use a net class or custom rule to set the larger 0.3mm clearance.

It gives an example for having a rule that specifies larger clearance, but this doesn’t seem to be the case for a rule that specifies smaller clearance. I’ve pasted some screenshots below to show this.

First two screenshots here show the constraints and net class settings, last image is the custom rules setting.



Even from these screenshots, shouldn’t the DRC flag an error since the constraints setting is 0.2mm and that isn’t? Looking at the custom design rules, shows that I have set a clearance rule of 0.1mm and it gives no errors in the DRC. However, once I change it to match the 0.2mm in the other settings, the DRC does show the errors.


I may be setting these values up completely wrong, so please feel free to let me know if it’s the case. For me it seems like the custom rules override the supposedly absolute minimum set by the constraints. There was another post about this last year as well. Am I misunderstanding something? Thank you for your time!

1 Like

You should be able to attach images now, please modify your first message.

Indeed the general constraint board setting shouldn’t be overridden by custom rules, it’s often the physical limit of the manufacturer, the absolute minimum. Maybe this is a bug.

Thanks for your reply. I’ll edit my answer now. Should I report it then?

As far as I know this is the intended behaviour that custom rules can override nthe generic board constraints.

I personally don’t like this, because it’s easy to violate manufacturer requirements with false written rules. And this can’t be detected later on.

There is a open gitlab issue which requests a solution for this: Design Rules: establish definitive technology constraints (#6030) · Issues · KiCad / KiCad Source Code / kicad · GitLab

The documentation says the exact opposite thing. Will the docs and the UI tooltip change or will the rules heirarchy change? I also agree that it should be changed so that the constraints have the highest priority. Will this fix be done? It’s already been 4 years since the ticket. It also seems to be a really important bug for it to lie dormant for 4 years.

I think this is not a bug, but a deliberately made design decision (again, in my opinion unlucky).
I think the docu is not correct.

The open gitlab issue is tagged as a wishlist item, not as a bug. It would require a new functionality. Maybe upvote the wishlist, increasing the chance it might get implemented sometime in the future.

Would I have to open an issue to fix the docs and UI tooltip then?

I vaguely remember being told by a developer that custom rules wouldn’t override the board settings constraints. By I may remember incorrectly.

To be honest I have also only vagelue memories about this topic, reading/writing on some gitlab issue.

I try to summon someone with more knowledge, maybe @JeffYoung can give some advice.

I will open another issue about all of what’s discussed here (constraints, design rules, docs) to try and get some more developer attention on it because it seems like a very fundamental issue, at least to me.

Here’s the issue on GitLab

2 Likes