Skip to content

dbeinder/Kikakuka

 
 

Repository files navigation

KiCad Workspace Manager & Interactive GUI Panelizer

Logo

Kikakuka (企画課, きかくか, Planning Section) (formerly Kikit-UI) is mainly built on top of KiKit, Shapely and PUI.

Features

  • Workspace Manager
  • Panelizer
    • Interactive arrangement, what you see is what you get
    • Freeform arrangement, not limited to M×N configuration
    • Multiple different PCB panelization
    • Auto/Manual tab creation
    • Auto V-cut/mousebites selection
    • Enable hole creation in panel substrate for extruded parts
    • Does not require coding skill

kkkk file

The .kkkk file saves workspace information in JSON format.

kikit_pnl file

The .kikit_pnl file saves panelization settings in JSON format, with PCB paths stored relative to the file's location.

Global Alignment

Global Alignment

Per-PCB Alignment

Per-PCB Alignment

Substrate Hole

Substrate Hole

Tight Frame + Auto Tab + V-Cuts or Mousebites

UI

Output

Output

3D Output

3D Output

Tight Frame + Auto Tab + V-Cuts and Mousebites

UI

Loose Frame + Auto Tab + Mousebites

UI

3D Output

3D Output

Auto Tab

Tab position candidates are determined by the PCB edge and max_tab_spacing, prioritized by divided edge length (smaller first), and skipped if there is a nearby candidate (distance < max_tab_spacing/3) with higher priority.

In the image below with debug mode on, small red dots are tab position candidates, larger red circles are selected candidates, and the two rectangles represent the two half-bridge tabs. Auto Tab

Manual Tab

Manual Tab

Run from source (Linux/macOS)

Make sure your python can import pcbnew

> python3 -c "import pcbnew; print(pcbnew._pcbnew)"
<module '_pcbnew' from '/usr/lib/python3/dist-packages/_pcbnew.so'>

On macOS, I have to use the python interpreter bundled with KiCAD

PYTHON=/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/Current/bin/python3

On Linux, you should be able to just use the your default python3

PYTHON=python3

Create a virtual environment and install dependencies

${PYTHON} -m venv --system-site-packages env
./env/bin/pip3 install -r requirements.txt

Run

./env/bin/python3 kikakuka.py

Run from source (Windows)

On Windows the Python interpreter is at C:\Program Files\KiCad\9.0\bin\python.exe. But however in my Windows environment venv is not working properly, here is how I run it with everything installed in the KiCad's environment.

"C:\Program Files\KiCad\9.0\bin\python.exe" -m pip install -r requirements.txt
"C:\Program Files\KiCad\9.0\bin\python.exe" kikakuka.py

CLI Usage

# Just open it
./env/bin/python3 kikakuka.py

# Start with PCB files
./env/bin/python3 kikakuka.py a.kicad_pcb b.kicad_pcb...

# Load file
./env/bin/python3 kikakuka.py a.kikit_pnl

# Headless export
./env/bin/python3 kikakuka.py a.kikit_pnl out.kicad_pcb

Contributors

  • @buganini
  • @dartrax

About

KiCad Workspace Manager & Interactive GUI Panelizer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%