KB: Layer-specific design rules with through-hole pads and vias
Created: February 13, 2025 | Updated: February 13, 2025
You defined, e.g., layer-specific clearance rules, and you noticed that through-hole pads and vias are not treated as you expected. This may be because the pads or vias were not correctly specified in the clearance rule.
Solution Details Copy Link Copied
Vias and trough-hole pads are Multi-Layer objects and, therefore, when you define a rule with, e.g., the expression OnLayer('Top Layer')
in the scope, the Multi-Layer pads and vias are not returned with this query as their Layer property is not Top Layer. However, a through-hole pad or via exists on the Top Layer and can, therefore, be returned as an object by the check ExistsOnLayer('Top Layer')
.
Please see the documentation for the ExistsOnLayer and OnLayer membership checks.
The following example shows a clearance rule for NetA and NetB for the Top Layer with and without the ExistsOnLayer check: