(version 1)
#----------------------------------------------------------------------------------------------------
# AISLER custom DRC rules.
# Make Hardware less Hard. 
#----------------------------------------------------------------------------------------------------
# We created these custom rules to warn you if your design hits our manufacturing bounderies. 
# You can disable the custom rules by commenting them out, though we advise against it.  
# These rules are valid as of February 2023 please check for updated ones on our forum.
# Please also note that these rules do not catch every single manufacturing limit. 
# If you are not certain please check the documentation on our website. 
#----------------------------------------------------------------------------------------------------

# As our tooling is finite we only support certain trough hole sizes. 
# Please keep the plated trough holes below 5.65mm in diameter. 
# We provide a community post for more details: 
# https://community.aisler.net/t/plated-and-non-plated-holes/50

(rule "Max Drill Hole Size PTH"
    (constraint hole_size (max 5.655mm))
    (condition "A.Pad_Type == 'Through-hole'"))

#----------------------------------------------------------------------------------------------------
# We dont support micro or buried vias

(rule "Disallow buried via"
   (constraint disallow buried_via))

(rule "Disallow micro via"
   (constraint disallow micro_via))

#----------------------------------------------------------------------------------------------------
# The Soldermask is pulled back by a bit to account for slight missalignment during manufacturing. 
# We do this on our own, please keep the soldermask margin set to 0. 
 
(rule "Disallow solder mask margin overrides"
    (constraint assertion "A.Soldermask_Margin_Override == 0mm")
    (condition "A.Type == 'Pad'"))

#----------------------------------------------------------------------------------------------------

#Its is important to keep a safe distance between the Vias. 
#This even applies to vias of the same net. 

(rule "Distance between Vias"
    (constraint hole_to_hole (min 0.55mm))
    (condition "A.Type == 'Via' && B.Type == 'Via'"))
