See the API documentation, as well as pcbenv/playground.py and pcbenv/tests/ for examples.
Run pcbenv/data/boards/download.py to auto-fetch some boards for testing.
- Hold right mouse button to scroll
- Left click on pins to select a connection
- Left click on a pin of the selected connection to reverse the order
- Hold Ctrl to rectangle-select (for Autoroute and Unroute Selection)
- Hold Alt to add to rectangle selection
- Click Shift to activate manual routing tool
- Check dependencies section.
- git clone https://github.com/chrisbmr/PCBEnv.git
- cd PCBEnv
- pip install .
- cd PCBEnv/pcbenv/cxx
- mkdir build
- cd build
- cmake ../ -DENABLE_UI=[1|0]
- make -j$(nproc) install
- run your python scripts from the pcbenv directory with PYTHONPATH=$PYTHONPATH:/path/to/PCBEnv
Most of them (with the exception of CGAL) are hopefully already installed [on a development machine] or are fetched automatically by cmake. Only Python, Qt (optional), and SWIG are not fetched automatically.
- Python with C headers
- CGAL (Computational Geometry Algorithms C++ header library)
- rapidjson (C++ header library)
- swig (C++/Python interface generator)
Required by CGAL:
- boost (Boost C++ header libraries >= 1.74) Can be used by CGAL but are disabled by default:
- gmp (The GNU MP Bignum Library)
- mpfr (GNU multiple-precision floating-point computations)
- Qt6 with C++ headers
- OpenGL headers
NOTE: CGAL and Qt are free for academic and open source users, so if you read anything about getting a license: no, click elsewhere.
Install with, for example: pacman -S cgal swig rapidjson qt6-base qt6-tools
If you don't have root access and something has failed to install so far, please consider building manually.
For example, do ./configure --prefix=/your/home/... and edit CMakeLists.txt to look there by uncommenting the obvious bits at the top.
There is a python script to do this in the Dependencies folder but you really shouldn't need to.
cxx/C++ code (see code documentation for an overview).data/Example boards, settings file, JSON schemas, UI resources.util/Python class for the PCB JSON format and JSON to SVG converter.