pcb_create_pour
Create a copper pour region on a PCB for a specified net, layer, and polygon, with optional priority, fill method, and island preservation.
Instructions
Create a copper pour region on the PCB. Two upstream EDA bugs to note: (1) pours reflow using the design-rule snapshot taken when the document was opened, so rules written via the API do not affect reflow until the PCB document is closed and reopened (pro-api-sdk issue #34); reopen before rebuilding pours after rule changes. (2) Rebuilding a pour does not cut internal-plane anti-pads for different-net vias created after plane generation (issue #32); regenerate the plane instead. Coordinates are PCB canvas coordinates in mil (1 mil = 0.001 inch), relative to the canvas origin: +X = rightward, +Y = upward. Lengths (widths, diameters) are also in mil. Use pcb_canvas_origin to read/set the origin offset and pcb_convert_coordinates to convert between canvas and data coordinates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net | Yes | Net name for the pour | |
| layer | Yes | Layer name (e.g. "TopLayer", "BottomLayer", "Inner1".."Inner30", "Multi") or numeric EPCB_LayerId (1=Top, 2=Bottom, 12=Multi). Names are converted to the numeric id EasyEDA requires. | |
| polygon | Yes | Either an ergonomic point array [{x, y}, ...] (minimum 3 points; the ring is closed automatically and converted to L-mode), or a raw EasyEDA L-mode source array [x1, y1, "L", x2, y2, ..., x1, y1] — coordinates of the first point, then the "L" token, then the remaining points (closed: last point repeats the first) | |
| document | Yes | Target document UUID — auto-switches to this document before executing. Get UUIDs from list_instances or editor_get_open_tabs. | |
| pourName | No | Name for the pour region | |
| lineWidth | No | Line width | |
| instance_id | No | Target EasyEDA instance ID (8-char hex). Required when multiple instances are connected. Omit when only one instance is connected (auto-selected). Use list_instances to see connected instances. | |
| pourPriority | No | Pour priority (higher = poured first) | |
| preserveSilos | No | Whether to preserve copper islands | |
| pourFillMethod | No | Fill method |