pcb_copy_component_placement
Copies PCB placement (layer, X, Y, rotation) from source components to destination components via a designator mapping, replicating identical channel layouts and optionally cloning designator and comment text placement.
Instructions
Clone placement from source components onto destination components.
For each src -> dst pair, copy the source's PCB placement
(layer, X, Y, rotation) onto the destination. With the optional
flags also clone the designator-text placement (X/Y offset from
component centre, rotation, size, width, layer, on/off) and the
comment-text placement.
Real-world use: a board with N identical channels (filter / amp /
switching stages). Lay out channel 1 once, then call this tool
with a mapping like {"R1": "R11", "C1": "C11", "U1": "U2"}
and channel 2 picks up channel 1's layout instantly. Saves the
manual click-and-drag-drag-drag of replicating identical layouts.
Mapping-driven rather than relying on sort-order matching of selections -- the agent-callable equivalent of a manual replicate.
Args:
mapping: {source_designator: dest_designator}. Each
source must already be placed somewhere; each dest gets
overwritten with the source's placement.
include_designator: Also copy designator-text placement
(offset, rotation, size, layer, visibility). Default
True.
include_comment: Also copy comment-text placement. Default
True.
Returns:
Dict with:
- applied: pairs that succeeded
- failed: pairs that failed (src/dst missing or apply
exception)
- items: per-pair {src, dst, ok, error}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapping | Yes | ||
| include_comment | No | ||
| include_designator | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||