ipc_add_zone
Add a copper zone with a solid fill on one net and one copper layer of the board in the PCB editor.
Instructions
Add a copper zone with a solid fill on one net and one copper layer of the board in the PCB editor.
The API gives no default zone settings: the settings are required arguments. When the user did not give them, ask the user. KiCad adds the zone in one undo step, with no fill: fill it with ipc_refill_zones. KiCad checks no clearance: the answer tells the user to run DRC. KiCad 10.0.6 must have the schematic editor closed (KiCad bug #24966). An outline that crosses itself, has the same point two times one after the other, or has no area gives an error.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"board_path": "<board_path>",
"net": "<net>",
"layer": "<layer>",
"outline": "<outline>",
"min_thickness_mm": "<min_thickness_mm>",
"connection": "<connection>",
"island_removal": "<island_removal>",
"priority": "<priority>",
"border_style": "<border_style>",
"border_pitch_mm": "<border_pitch_mm>",
"thermal_gap_mm": "<thermal_gap_mm>",
"thermal_spoke_width_mm": "<thermal_spoke_width_mm>"
},
"name": "ipc_add_zone"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net | Yes | The name of the net, for example "GND" (case-sensitive). | |
| name | No | The name of the zone (optional, not the name of an other zone). | |
| layer | Yes | A copper layer of the board, for example F.Cu. | |
| outline | Yes | The corners of the zone outline in mm (3 or more points, the first point not again at the end). | |
| priority | Yes | The zone priority (0 or more). | |
| board_path | Yes | The path of the .kicad_pcb file that is open in the PCB editor. | |
| connection | Yes | The connection of pads: "thermal" (thermal reliefs), "solid", "none", or "thermal_pth" (thermal reliefs for through-hole pads only). | |
| border_style | Yes | The border of the zone in the editor: "solid", "hatched_edge" or "hatched_full". | |
| clearance_mm | No | An own clearance of the zone, 0 to 100 mm: KiCad uses the larger of it and the current clearance of the netclass and the rules. Default: none (0), thus only the netclass and the rules apply. | |
| island_removal | Yes | Remove isolated islands of the fill: "always" or "never". (The mode with a minimum area is not possible: the API gives no unit for it.) | |
| thermal_gap_mm | Yes | The thermal relief gap (KiCad keeps it also for a solid connection: a pad can have its own thermal connection). | |
| border_pitch_mm | Yes | The pitch of the border hatch, 0.1 to 2 mm. | |
| min_thickness_mm | Yes | The minimum width of the fill, 0.025 mm or more. | |
| thermal_spoke_width_mm | Yes | The thermal spoke width, not smaller than min_thickness_mm. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |