Loading files…
[!NOTE] This is a community-maintained fork of MitjaNemec/ReplicateLayout, updated to work with KiCad 10. The original author retired the plugin at KiCad 10 (KiCad now ships native multichannel layout), so this fork keeps it running for hierarchical-sheet driven replication. All credit for the plugin goes to doc.dr. Mitja Nemec; it remains GPL-2.0.
Changes in this fork:
- KiCad 10 support (issue #87): KiCad 10 removed
pcbnew.ID_V_TOOLBAR, which the dialog used for positioning, so the plugin raised on every run. Fixed with a fallback that still works on KiCad 9.- Grouped-destination crash (issue #86): the destination-group precheck compared a
PCB_GROUPobject to a string and aborted whenever a destination footprint was already grouped. Fixed.- A working, headless test-suite (the upstream one referenced absent folders) that verifies geometric correctness and byte-for-byte parity with KiCad 9.
The replication core is unchanged — verified to reproduce the KiCad 9 behaviour exactly (see Testing).
The repository includes code for KiCad Action plugin which replicates part of the PCB layout.
Replicate the PCB layout of one hierarchical sheet to other hierarchical sheets. This replication is based upon hierarchical sheets in Eeschema. The basic requirement for replication is that the section to be replicated (source) is completely contained within a single hierarchical sheet, and replicated sections (destination) are just copies of the same sheet. Complex hierarchies are supported and the replicated sheet can contain subsheets. The plugin replicates footprints, zones, tracks, text and drawings.
After the section for replication (source section) has been laid out (footprints, tracks, text objects and zones placed) you need to:
By default, only objects which are fully contained in the bounding box constituted by all the footprints in the section will be replicated. You can select to also replicate zones and tracks which intersect this bounding box. Additionally, tracks, text and zones which are already laid out in the replicated bounding boxes can be removed (useful when updating). Note that bounding boxes are squares aligned with the x and y axis, regardless of section orientation.
The preferred way to install the plugin is via KiCad's Plugin and Content Manager (PCM). Installation on non-networked devices can be done by downloading the latest release and installing in the PCM using the Install from file option.
The plugin ships with a headless, GUI-free test-suite driven entirely through the
pcbnew scripting API (test_replicate_layout.py). It runs a number of replication
scenarios (inner/outer hierarchy levels, flipped anchors, "contained" vs.
"intersecting" selection, removal of existing copper, grouping and footprint-text
replication) and checks each result two ways:
test_refs/), so a
passing run proves the KiCad 10 output matches KiCad 9 exactly.Run it with the Python interpreter bundled with KiCad, for example on macOS:
/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/bin/python3.9 test_replicate_layout.py
To recapture the reference signatures from a particular KiCad version, run the same
command with --gen-refs.
Author : doc.dr. Mitja Nemec KiCad 10 port : 2026 Date : 2025
No comments yet. Be the first to ask about this board.