I donât believe it works like this in Altium. Frankly I have to go back and look because I canât remember ever running into this kind of a collision of settings in 20+ years of using it. But thatâs a different matter.
No, design rules should be like the single canonical specification document that everything is checked against. Whatâs the use of defining a bunch of rules if they can get screwed-up locally by individual items?
In this specification I am literally saying: âI am OK with copper-to-copper clearance being 0.2 mm anywhere in this designâ. And yet, I got DRC errors for clearances that were more than twice that distance.
Yes, of course, I re-poured everything. Not my first PCB design rodeo. And, yes, of course, I know the zone dialog settings are not global.
Ultimately this is what cleared all the errors:
import pcbnew
board = pcbnew.GetBoard()
items = board.AllConnectedItems()
zones = []
for item in items:
if isinstance(item, pcbnew.ZONE):
zones.append(item)
for zone in zones:
zone.SetLocalClearance(int(0.2 * 1e6))
filler = pcbnew.ZONE_FILLER(board)
filler.Fill(board.Zones())
pcbnew.Refresh()
Ran a DRC after this and all zone and zone-to-track errors are gone. Zone priority level is 0 for all zones, so, in this case, it didnât matter.
What might be lost in this conversation is that there were no real copper-to-copper violations ever, despite the DRC errors. By ârealâ, I mean, you have to redo your run of 500 boards because of the error.
Anyhow, no big deal. I fixed it. I do not agree with the way this works, but I can get used to it. If it can be fixed with a little code, Iâm happy.
Thanks for pointing out where this â0.508 mmâ setting was hiding.
EDIT:
I should add: If someone is drawing overlapping copper pours, well, then things take a different turn. Frankly, I donât remember ever doing that in 20+ years. I always define them exactly the way they have to be drawn, precisely because software will shaft you if you let it.