DrcViolation
A single DRC violation.
Returned as part of a DrcResult after running run_drc(). Each violation
describes a specific rule failure, including the rule name, affected layer(s),
severity, and a bounding box around the offending geometry.
result = run_drc(cell, rules)
for v in result.violations:
print(f"[{v.severity}] {v.rule_type} on {v.layer}: {v.message}")Attributes
attributerule_namestr | NoneName of the rule that was violated, or None if the rule was not named.
attributemessagestrHuman-readable description of the violation.
attributeseveritystrSeverity level: "error" or "warning".
attributerule_typestrType of the DRC rule that was violated (e.g., "min_width", "min_spacing").
attributelayertuple[int, int]The (number, datatype) of the primary layer involved in the violation.
attributelayer2tuple[int, int] | NoneThe (number, datatype) of the second layer, for inter-layer rules (e.g.,
spacing, enclosure). None for single-layer rules.
attributebboxtuple[tuple[float, float], tuple[float, float]]Bounding box of the violation as ((min_x, min_y), (max_x, max_y)).