pcb_modify_polygon
Modify a PCB polygon pour's net, layer, hatch style, or copper-removal options; changes are recorded for the next repour, so run a repour afterward to update the board.
Instructions
Modify a polygon pour's properties and its pour options.
Changes net, layer, hatching style, or the three "remove" options
from the Polygon Pour dialog. Use pcb_get_polygons first to
find the polygon index.
NOTHING HERE REPOURS. The pour options and the hatch style decide
what the NEXT pour produces, so the board does not change until
pcb_repour_polygons runs. The reply carries repour_needed
for that reason: a change that has been recorded and not yet
poured is otherwise indistinguishable from one that did nothing.
Args:
index: Polygon index (from pcb_get_polygons output)
net: New net name to assign (optional, empty = no change). A
name that matches no net on the board is reported under
not_applied rather than ignored.
layer: New layer name (optional, empty = no change)
hatch_style: New hatch style (optional). Exactly four are
accepted, and anything else is reported rather than
silently dropped:
"Solid" - solid copper fill
"NoHatch" - outline only, no fill
"45Degree" - 45-degree crosshatch
"90Degree" - 90-degree crosshatch
remove_dead: Remove dead copper, the islands with no connection
to the polygon's net. None leaves it unchanged.
remove_narrow_necks: Remove necks narrower than the polygon's
threshold. None leaves it unchanged.
remove_islands_by_area: Remove islands below the polygon's area
threshold. None leaves it unchanged.
Returns:
{"modified": bool, "success": bool, "index": N, "name": ..., "changed": [field names], "not_applied": [{item, reason}], "repour_needed": bool, "note": ...}.
``modified`` reports whether anything actually changed, not
whether the call ran. ``changed`` names each field that took.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net | No | ||
| index | Yes | ||
| layer | No | ||
| hatch_style | No | ||
| remove_dead | No | ||
| remove_narrow_necks | No | ||
| remove_islands_by_area | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||