pcb_replicate_layout
Copy a routed channel's tracks, arcs, vias, polygons and fills onto matching channels, remapping each net to the destination. Automates the multi-channel PCB replicate workflow end to end.
Instructions
Replicate a routed channel's ROUTING onto a matching channel.
Where pcb_copy_component_placement only relocates components,
this copies the source group's routing -- tracks, arcs, vias,
polygons, regions, fills -- onto the destination group and remaps
each copy's net from the source net to the corresponding
destination net. The classic multi-channel "lay out channel 1,
replicate to channels 2..N" workflow, end to end.
Positioning: one rigid transform is derived from the FIRST mapping
pair (the anchor) -- the copied routing is rotated by
dstRot - srcRot about the source anchor, then translated by
dstAnchor - srcAnchor, so it lands on the destination
components where they already sit. The destination components are
left in place unless move_components=True.
Which routing is copied (naming-agnostic): routing on nets
INTERNAL to the source group -- every component pad on the net
belongs to a mapped source component. Nets that escape the group
(a shared GND / power pour) are deliberately left alone. Pass an
explicit nets list to override and copy exactly those.
Preconditions: the destination components must already be placed
congruently with the source (e.g. run
pcb_copy_component_placement first, or pass
move_components=True). congruence_warnings in the result
counts destination parts that do not match the anchor transform --
their routing may not line up.
Args:
mapping: {source_designator: dest_designator}. The first
pair is the transform anchor; include every component in
the channel so its internal nets are recognised.
nets: Optional explicit source net names to copy, instead of
the internal-net auto-detection.
move_components: Also relocate the destination components onto
the rigid transform, guaranteeing the routing aligns.
Default False (destination stays where it is).
Returns:
Dict with:
- copied: routing primitives replicated
- net_assigned: copies given a destination net
- internal_nets: source nets selected for copying
- shared_nets_skipped: group nets left alone (escape the
group)
- congruence_warnings: destination parts off the anchor
transform (routing may not align)
- notes: any caveats
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nets | No | ||
| mapping | Yes | ||
| move_components | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||