Drilled hole too close to other hole | 𧨠KiCad Custom Rule
Intro
This series of short notes showing practical examples of using custom text-based rules forΒ KiCad EDA.
πΊ Issue Description
I have board with two battery connectors for different versions, so in one version it could be 18650 and in another 21700:
The problem is the holes located too close and KiCad show errors:
π§ Issue Fix
Open Board Setup -> Custom Rules and add following rule with specifying your net name (in my case it's -BATT and BAT_INPUT):
# Hole to hole clearance (rule "Distance between Holes of the same net" (condition "A.Type == 'Pad' && B.Type == 'Pad' && (A.NetName=='-BATT' || A.NetName=='/BAT_INPUT')"))
Click OK:
β Fixed
Rerun DRC again and now violations on all battery pins correctly excluded by custom rule:
π Related Article
![]() | Thermal relief for specified components | 𧨠KiCad Custom Rule |
![]() | How to write custom KiCad rule exception? Simple example of courtyard overlap resolve |
- Comments
Write a comment
No comments yet. Be the first to add a comment!





