Is it possible to force zone to clearance lower than Netclass clearance?

Hi KiCaders,
Is it possible to force zone to clearance to value lower than its Netclass clearance?
I’m doing some RF and I use Coplanar waveguides, which require me to set certain clearance to ground plane.
However there are structures I need to approach with clearances tighter than calculated RF-to-GND distance (compact packages), using copper Zones (for smooth track width changes).
But if I set a general RF clearance which is needed for a coplanar waveguide, my RF zones are not filled. I have tried to set their clearance to lower values, but they stop on the netclass value.
Any workaround for this?

write a custom rule.
Maybe this project could help:
create_lines.zip (25.8 KB)

2 Likes

move to KIcad 8RC2, rules are much more sophisticated. No problem with specifying rules for CPW. I have done it. Just set a zone clearance rule for the netclass … easy Check the new doco for custom design rules :

(rule "zone clearance myCPW  "
(layer outer)
(condition " A.NetClass == 'myCPW' && B.Type=='zone'")
(constraint clearance (min 0.15mm)  (opt 0.15mm)  (max 2mm)))

you might need to add a rule area to that condition if you dont want it tight around component pads etc
or add a rule after it (higher priority) to apply to pads.
like

(rule "cpw  tracks"
(layer outer)
(condition " A.NetClass == 'HV' && B.Type=='zone' && A.Type=='Track'")
(constraint clearance (min 0.15mm)))

(rule "cpwnetclass  pads"
(layer outer)
(condition " A.NetClass == 'HV' && B.Type=='zone' && A.Type=='Pad'")
(constraint clearance (min 0.5mm)))
1 Like

Thanks, I’ve got my homework now to do :slight_smile:

So the easiest solution to me was to use a specific name for the “tight RF” Zones, and then create a name-based custom rule to override the clearance for the “TIGHTRF” named zones to my desired smaller value - exactly as in mf_ibeew example. Thank you @mf_ibfeew @glenenglish for pointing me to the right direction.
I have also noticed that I can re-use my Zone name for multiple indepenedent zones, actually using these Zone names as a sub-Netclass for my custom rule.

1 Like