No Width DRC for NetClass

It seems, that KiCad v8 does not check the minimum width of a net class. Here the NetClass “GND” is mapped to the nets “GND” and “led”. So both nets are required to have 2mm minimum width.

In the Layout, the net “led” has 0,5mm with and the net “GND” has 1mm and 2mm.
Clearly the DRC should bring up an error, but it doesn’t:

The Violation Sensitivity is set to “Error”:

So is here a bug in the program or do I understand something wrong?

Regards
Marko

First, the netclass GND isn’t probably applied to the net “led” unless it’s a global label. Check out what the panel “Nets matching GND” says for the “led” row. If you have used a local label, you should prepend the name in the list with ‘/’ or use a wildcard.

Then for the minimum width. You can select a track segment which belongs to a net and use Inspect → Constraints Resolution. It will show which rule is effective. I tested this, and the netclass width isn’t actually “minimum” width, it’s “optimal”. Whether that’s the only good interpretation can be debated. But it’s quite normal to use a width which is “minimum where possible” while going under it if necessary, for example in tight places. Notice also that the netclass widths aren’t manufacturing constraints strictly speaking. Design Rules → Constraints, on the other hand, are hard minimum values which come from the manufacturing capabilities.

If you want to force the value as minimum you can set up a Custom Rule.

(rule GND_minimumwidth
	(condition "A.Type == 'Track' && A.NetClass == 'GND'")
	(constraint track_width (min 0.5mm)))

catches this.

The netclass is applied, since everything works fine for the distances which are defined in the netclass.

If I define a minimum width for a net class, I also expect it to be checked by the DRC.

So it looks like there is still a bug in KiCad.
I also found this ticket, which might be based on the same bug:

This isn’t a bug. As per previous answers, the track width specified on the netclass isn’t a minimum, it’s the optimum. The correct way to check for a minimum track width is per the answer @eelik has given above.

(Note that A.hasNetclass('x') is a v8.99 feature - @eelik syntax is spot on for v8.0).

I just learned that I have to add the version number before starting to create custom rules.

Once added things work fine:

Thanks a lot!

PS:
This is my first contact with KiCad and the forum. Is going good so far - I’m very pleased and impressed!

2 Likes

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