lib_add_footprint_regions
Add solid polygon regions to a PCB footprint in one call, with required layers and exact units, to create paste windows or filled mechanical and overlay shapes.
Instructions
Add solid polygon regions to a PcbLib footprint in ONE call.
What a footprint needs beyond pads and lines: paste windows over an exposed pad (on TopPaste, with the pad's own paste closed by a negative paste_expansion in lib_add_footprint_pads), or any filled shape on a mechanical or overlay layer.
Args:
regions: list of {"layer": ..., "points": [[x, y], ...]},
three or more points each, relative to the footprint
origin. The layer is REQUIRED: there is no default,
because a solid shape defaulted onto copper is a short.
footprint_name: footprint to write into. Empty uses the
editor's current footprint; a name makes that footprint
current first and refuses if it cannot.
units: "mil" (default) or "mm", for every point, kept exact.
Returns:
Dict with added, failed, bad_points, unknown_layers, total. A
region refused here before sending is listed in
refused with the reason.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| units | No | mil | |
| regions | Yes | ||
| footprint_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||