add_copper_balance#

Rules.add_copper_balance(name: str, max_percent: int, layers: list[str]) Rules#

Append a copper density balance rule.

Parameters:
namestr

Rule identifier for reporting.

max_percentint

Maximum allowed imbalance percentage (e.g., 15 for 15%).

layerslist of str

Layer names to check for balance.

Returns:
Rules

Self for method chaining.

Examples

>>> rules = Rules().add_copper_balance("top_bal", max_percent=10, layers=["TOP"])
>>> rules.copper_balance[0].max_percent
10