https://github.com/snhobbs/kicad-parts-placer
Auto place components into pcbnew from a centroid file. Useful for maintaining a common board form factor.
https://github.com/snhobbs/kicad-parts-placer
eda electronics kicad kicad-plugin layout manufacturing pcb pcb-design pcb-footprints pcb-layout pcb-manufacturing pcba python tools
Last synced: about 2 months ago
JSON representation
Auto place components into pcbnew from a centroid file. Useful for maintaining a common board form factor.
- Host: GitHub
- URL: https://github.com/snhobbs/kicad-parts-placer
- Owner: snhobbs
- License: lgpl-3.0
- Created: 2022-11-17T14:30:49.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-07-09T04:11:44.000Z (3 months ago)
- Last Synced: 2025-07-09T05:24:39.465Z (3 months ago)
- Topics: eda, electronics, kicad, kicad-plugin, layout, manufacturing, pcb, pcb-design, pcb-footprints, pcb-layout, pcb-manufacturing, pcba, python, tools
- Language: Python
- Homepage:
- Size: 237 KB
- Stars: 27
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
README
# kicad-parts-placer
**Tool for precise, batch placement of components in a KiCad PCB layout.**+ [Blog Post](https://maskset.net/kicad-parts-placer.html)
## Features
+ Exact batch placement of components in a layout
+ Groups the components allowing them to be moved and positioned as a group, easily ensuring exact alignment
+ Useful for:
+ Creating bed of nails tester
+ Positioning mechanically important parts
+ Maintaining a form factor across different designs
+ Similar in function to this [Altium feature](https://www.altium.com/documentation/altium-designer/pcb-cmd-placecomponentsfromfileplacecomponentsfromfile-ad)## Example Use: Pogo pin & test pad placement
An example is provided at [example/example-placement](example/example-placement).
This example starts from a centroid file generated from an existing design, which is edited to serve as the input configuration:
A schematic is drawn up with matching reference designators:

The schematic is exported to a PCB which will look like this:

Running the script on this board with this command exports the following board with the components exactly aligned ready for layout. The group can be treated as a footprint, placed where ever is useful. During layout you only have to deal with a single coordinate as the position within the group is locked.
```{python}
kicad-parts-placer --pcb example-placement.kicad_pcb --config centroid-all-pos.csv --out example-placement_placed.kicad_pcb --drill_center
```
## Uses
+ Critical component placement: Exact placement of mounting holes, sensors, connectors, etc
+ Maintaining a form factor: Use the spreadsheet representation to either start a new project of a certain form factor or to ensure no parts have moved during layout
+ Reusing a bed-of-nails: Place the board outline and test pads the exact same way between versions to ensure the same jig can be used.
## Notes
+ Place parts in pcb layout from a configuration table.
+ Allows writing a config script which fully defines the parts
+ Connections are made either by updating from a schematic or passing a netlist
+ Use example of schematic to pcb placement
+ All parts are grouped together, locking their relative placement
+ Internal configuration is a dataframe with ref des, label/value, footprint, position x, position y. Notes fields can be added for documentation generation.
+ A separate config object can be that could pull in a board outline, stackup, etc describing the board.
+ Position, rotation, & ref des are available in the centroid file, that avoids requiring the source board be kicad.## Installation
### PyPi
```
pip install kicad-parts-placer
```### From Source
```
git clone https://github.com/snhobbs/kicad-parts-placer
cd kicad-parts-placer
pip install .
```### KiCad Plugin
This tool is also available as a plugin via KiCad’s Plugin and Content Manager (PCM).## References
+ [OpenFixture: Manual KiCad Location Export](https://tinylabs.io/openfixture-kicad-export)
+ [KiCad Schematic-to-PCB Position Plugin by Ian Ross](https://github.com/ian-ross/kicad-plugins)