I want to increase zone clearance to a few NPTH in just the top layer. After searching I found that this is best achieved with a custom rule and found this one:
(rule "Mounting_holes_zone_clearance"
(layer F.Cu)
(condition "A.Type == 'Pad' && B.Type == 'Zone'")
(constraint clearance (min 1.0mm))
)
It took a while, but I finally found out that this works fine with SMD pads and PTH, but doesn’t work with NPTH.
According to the documentation the Type can be set to: One of “Bitmap”, “Dimension”, “Footprint”, “Graphic”, “Group”, “Leader”, “Pad”, “Target”, “Text”, “Text Box”, “Track”, “Via”, or “Zone”.
There doesn’t seem to be a better “Type” for NPTH pads.
Is this a bug that I should report, or is this by design?
I tried fixing it by setting A.Pad_Type == ‘NPTH, mechanical’, but that doesn’t work either.
(rule "Mounting_holes_zone_clearance"
(layer F.Cu)
(condition "A.Pad_Type == 'NPTH, mechanical' && B.Type == 'Zone'")
(constraint clearance (min 1.0mm))
)
If I change the NPTH to a SMD pad it works great with both A.Pad_Type == ‘SMD’ and A.Type == ‘Pad’
Edit: I’m using KiCad 8.0.6 on Windows. Cannot figure out a way to make this work with NPTH…