First thanks for releasing V9, it’s definitely a huge leap forward ! You’ve done an awesome job
I’m exploring the rule zone feature since yesterday, but I’m facing an issue I can’t figure out. When drawing a rule zone, to assign a netclass “DGND”, nets inside the zone do correctly get “DGND” net assignation, but they do keep “Default” class as well.
My question is simple: how to remove “Default” netclass assignment to the nets inside my rule zone ?
Having Default assigned seems to be breaking my custom DRC rules that I’ve created under V8.0.
My naive question is which class has priority ?
If default has to stay, and I have let say a “high_voltage” class, that requires clearance of 2mm, while default is 0.2mm, how do I know which one is applied to the net ?
Since the update this kind of simple custom rules is no longer enforced by the DRC as it seems…
(rule VIHigh_DGND
# Set clearance for IBus tracks to digital
(constraint clearance (min 1mm))
(condition "A.NetClass == 'IBUS' && B.NetClass == 'DGND'"))
``
So there are two parts to this… For the first part (Default netclass being present) - this will always be the case if you have some elements of the required netclass undefined. As there can be multiple netclasses assigned to a net, the resulting netclass takes a given field’s value from the highest priority netclass on which it is defined. These values are always defined on the Default netclass, so it’s being used to fill in the gaps. Note that the netclass settings table has some hidden columns, depending on whether you open it from the schematic or pcb editor. You can always right-click on the column headings to enable the others. This isn’t great UI, and we are thinking of ways to improve it.
For your second point, the condition "A.NetClass == 'IBUS' matches the full netclass name of object A (likewise for object B in your example). As you have the Default netclass included implicitly, the full name is actually IBUS,Default. Much better in v9 is to use the condition A.hasNetclass('IBUS'), as this will test all netclasses assigned to an object.
Thanks for the details, I understand better now
Thanks for pointing me out the hasNetclass function, I’ll update my custom rules with it.
Last question from my side on this new netclass system :
Is there a smart way to sort out all nets that are “only” default ?
In V8 I used to check that I correctly assigned all my nets so that they are not “Default” anymore.
And for that I used the hide/show option in the side panel in “nets” tab. But this method no longer works with the new netclass system.
It works for me to show and hide ratsnest lines. In v8 did it show / hide tracks? I’m not quite sure what your use-case is (a video / images of your v8 workflow would be useful to know if this is a regression).
So why is the default netclass still there and why does it use the 0.2mm from default as clearance and the 0.125 from USB as trace width, although “usb” has a higher priority? I assigned the 0.125mm also to the DP spacing/trace width.
@Knochi : unrelated to your netclass issue: the example project shows a strange behaviour and provokes crashes on my kicad installation. May I use it as example for a bug report?
@JamesJ : regarding the netclass-clearance issue I think it could be a bug. But I’m not 100% sure in this area, so it would be good if you could look into the example project.
It looks like composite netclasses that are constructed from pattern matching assignments don’t get an implicit DRC rule created. So, the DRC engine doesn’t find a matching DRC clearance rule for the composide netclass USB,Default, so the engine falls back to the Default netclass value.