A command-line PCB place & route tool.
Project description
Pardal PCB
A command-line PCB Place & Route tool.
Features
- 17 Commands: LOAD, SAVE, MOVE, ROTATE, FLIP, LOCK, UNLOCK, LIST (components/nets), SHOW BOARD, WHERE, UNDO, REDO, HISTORY, HELP, EXIT
- Autorouting: A* pathfinding with Z3 layer optimization for 2-layer boards, largely based on some of freerouting project features.
- CLI Modes: Interactive REPL, batch file execution (
--batch), single command execution (--exec) - File Formats: Reads KiCad netlist (.net), writes KiCad PCB (.kicad_pcb)
- SDK Workflow: Generate production-quality boards with library footprints, aiming at 0 DRC errors
- Grid Visualization: ASCII art board display with component positions and orientations
- Undo/Redo: Full command history with state management
Dependencies
Required
- Python 3.10+ with virtual environment
- KiCad 9.0+ installed (provides
pcbnewPython module andkicad-cli) - kicad-packages3d package for 3D model rendering in KiCad viewer
Install on Debian/Ubuntu:
sudo apt install kicad kicad-packages3d
For SDK Workflow (Recommended)
The SDK workflow uses KiCad's Python API directly (system Python, not venv):
python3 -c "import pcbnew; print(pcbnew.Version())"
Installation
No installation needed - uses virtual environment:
cd pardal-pcb
./venv/bin/python -m pcb_tool --help
Quick Start
Interactive Mode
./venv/bin/python -m pcb_tool
pcb> HELP
pcb> LOAD ../manual_temp_test/example.net
pcb> LIST COMPONENTS
pcb> MOVE U1 TO 10 20
pcb> AUTOROUTE ALL
pcb> SHOW BOARD
pcb> SAVE output.kicad_pcb
pcb> EXIT
Batch Mode
./venv/bin/python -m pcb_tool --batch placement.txt
Command Execution
./venv/bin/python -m pcb_tool --load example.net --exec "MOVE U1 TO 10 20" --exec "SAVE output.kicad_pcb"
DRC Validation
Important: The internal CHECK DRC command performs basic connectivity checks only. For full DRC validation matching KiCad's standards, use kicad-cli:
kicad-cli pcb drc --output drc_report.txt board.kicad_pcb
This runs KiCad's complete DRC engine including clearance, copper pour, footprint, and electrical rule checks.
SDK Workflow (Recommended)
For production-quality boards with proper footprints and 0 DRC errors, use the SDK-based workflow:
- Route board using pardal-pcb's autorouter
- Regenerate with SDK to get library footprints with full graphics/3D models
- Add zones for copper pours
- Validate with
kicad-cli pcb drc
See docs/SDK_WORKFLOW_GUIDE.md for complete instructions.
Documentation
- USAGE.md: Complete command reference with examples
- docs/AUTOROUTING_GUIDE.md: Autorouting system guide
- docs/SDK_WORKFLOW_GUIDE.md: SDK workflow for production boards
Testing
Run the full test suite:
./venv/bin/pytest tests/ -v
Architecture
- Command Pattern: All operations as reversible command objects
- Vertical Slices: End-to-end features over horizontal layers
- Clean Separation: Data model, commands, parsers, I/O handlers
Limitations
- 2-layer boards only: F.Cu and B.Cu layers supported
- Linux paths: Footprint library paths assume standard KiCad installation at
/usr/share/kicad/footprints/ - KiCad 9+: Requires KiCad 9.0 or newer for SDK compatibility
License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
See LICENSE for the full license text.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pardal-0.1.0.tar.gz.
File metadata
- Download URL: pardal-0.1.0.tar.gz
- Upload date:
- Size: 187.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56f0fc6b5695d828d6f768355ae4c6ff9ff95e73b4aad724e8d1d411063e31b1
|
|
| MD5 |
b3d1c38f79e1e87d1c860ef1b132bb0b
|
|
| BLAKE2b-256 |
7eb268dbcad93957abebc4361f97513802f9181253a2b323615695e826897101
|
File details
Details for the file pardal-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pardal-0.1.0-py3-none-any.whl
- Upload date:
- Size: 99.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f967bbc56884c1ab4e088c9a781e42c7f33d3cef96ba03c0fc325e8320148982
|
|
| MD5 |
fba08e5af60c786f7be93c8789adf573
|
|
| BLAKE2b-256 |
e1da85955cab17d2e2e4aff48a8258d0286105658cafb73b54ad86f8360662d5
|