Custom rule hole to copper

Hi, I’m still struggling to create new custom design rules for the PCB editor.
Here is what I would like to implement:
I would like to check the distance from plated thru holes to tracks depending on hole diameter.
If the hole diameter is <0.5mm the minimum allowed spacing is 0.2mm, for bigger holes the minimum spacing is 0.28mm.
Can someone help with this, please?

This probably can be done, but is it really needed? Is your board so dense that you can’t spare 80um for small holes?

A PCB is always a compromise between various constraints, and I always strive to use as few “special cases”. as possible.

My board is VERY dense. Yes. I need to implement this.

@paulvdh I frequently see you reply to people asking questions with a suggestion that they should not be doing the thing they are trying to do instead of answering their question. Doing this, especially when it’s the first reply a poster gets, can be discouraging. I recommend holding back such “do you really need to do the thing you’re trying to do” posts unless you are more certain that the user is in a situation where a different approach would be better (the XY problem).

@tom_iphi what have you tried so far? What you describe is pretty straightforward, but note that you’ll need to implement it as two rules with different conditions. The way the custom rule system works, you can’t write a single rule that has two different clearance values based on something. In your example, I would make one rule that has as part of its condition “hole size less than 0.5mm” and a second rule that has “hole size greater than or equal to 0.5mm”

2 Likes