Skip to content
buganiniPublic

About

Kikakuka — KiCad Workspace, Panelization, Build Variants, Differ & FreeCAD PCB Bending and Assembly

Topics

Resources

Stars

82 stars

Watchers

2 watching

Forks

Repository files navigation

Kikakuka — KiCad Workspace, Panelization, Build Variants, Differ & FreeCAD PCB Bending and Assembly

Kikakuka FabPlanner Differ FreekiCAD CADhoc

Kikakuka (企画課, きかくか, Planning Section) creates a few more dimensions for KiCad:

  • Workspace and project management
  • Revision management
  • Build variants
  • Panelization
  • FreeCAD integration for flexible PCB bending and multi-board assembly

Quick links

Features

  • Kikakuka main program

    • Workspace Manager
      • Organize KiCad projects, FabPlans, FreeCAD documents, assemblies, and STEP files in .kkkk workspaces with relative paths and file descriptions
      • Open related schematic, PCB, and STEP files or launch Differ and FabPlan from the workspace
      • Inspect project-specific symbol and footprint libraries and convert their paths to ${KIPRJMOD}-relative references
    • Instance Manager UI
      • Inspect same-user KiCad and FreeCAD processes and known file paths, with one row per FreeCAD document, the matched KiCad IPC socket basename, automatic mesh-event updates, manual reconciliation, and Go to actions
    • Differ
    • Fabrication Planner
      • Panelizer
        • Interactive arrangement with real-time preview
        • Freeform placement not limited to M×N grid configurations
        • Support for multiple different PCBs in a single panel
        • Automatic or manual tab creation
        • Automatic V-cut/mousebites selection
        • Enable hole creation in panel substrate for extruded parts
        • Load KiKit multiboard files as multiple separate boards
        • No coding skills required
      • Build Variants
        • Single PCB without panelization can be done with frameless setting
        • Each PCB can have its own flag settings
      • Reproducible workflows
        • Create and edit fabrication plans interactively in the GUI.
        • Save configurations in a portable, JSON-based .kkkk_fab file.
        • Generate outputs from the saved plan using either the GUI or CLI.
    • Gerber handling
      • Available in the fabrication planner (panelizer)
      • Or direct conversion to .kicad_pcb
      • Compared with KiCad output
    • CLI - Convert saved fabrication plans (.kkkk_fab, or legacy .kikit_pnl) to KiCad files in one command
  • FreekiCAD (FreeCAD Addon)

    • Reloadable KiCad PCB Object
      • Optional copper and solder-mask import, with outer copper, inner copper, and mask controlled independently
      • Solid stiffeners from annotated F.Stiffener and B.Stiffener user-layer areas
      • Flex PCB bending driven by bend lines and parameters defined in KiCad
      • Automatic coupler-based PCB alignment using matching CouplerFixed and CouplerMoving footprints or an absolute CouplerAt, with coupler plane markers for inspection
      • A sketch is provided for real-time board outline editing in FreeCAD
      • Components moved in FreeCAD are synced to KiCad in real time
    • Reloadable STEP/STL Object
    • Import and export assembly manifests (.kkkk_asm)
    • CLI - Export saved assembly manifests (.kkkk_asm) to STEP or STL in one command
  • KiCad Plugin/Library

    • Coupler footprints for Automatic coupler-based PCB alignment

    • Plugin actions for previewing and hiding coupler helpers in the 3D Viewer

    • Populate scaled placeholder 3D models for footprints without a valid model, using SizeX, SizeY, and SizeZ properties

      • Tutorial Video

      Kikakuka - Placeholder 3D Models

  • CADhoc / Instance Manager

    • Seamless navigation among Kikakuka, KiCad, and FreeCAD across multiple instances and open documents

Workspace Manager

The .kkkk file saves workspace information in JSON format. Adding or dropping a .kicad_pcb or .kicad_sch records its sibling .kicad_pro project entry, even when that project file has not been created yet. A virtual project row omits the .kicad_pro suffix; an existing project file keeps it. Rows list only PCB/schematic files that currently exist. Opening a missing project row reports the missing project instead of launching KiCad. Workspace Manager

Differ

Schematics Differ

Schematics Differ

PCB Differ

PCB Differ

Fabrication Planner

The .kkkk_fab file saves panelization and build-variants settings in JSON format, with PCB paths stored relative to the file's location. Legacy .kikit_pnl files can still be opened or added; newly saved fabrication plans use .kkkk_fab.

Fabrication Planner - Build Variants

Example: samples/build_variant.kkkk_fab and samples/build_variant.kicad_pcb.

Set BUILDEXPR in footprints' properties. This can be done quickly with Symbol Fields Table using the current sheet only scope. Remember to sync them to PCB afterward.

BUILDEXPR-Prop

  • Kikakuka extracts build flags from BUILDEXPR. Selected flags are interpreted as true, and vice versa.
  • Footprints with the BUILDEXPR evaluated as false will be marked as DNP.
  • Footprints with unset or empty BUILDEXPR will be kept as is.

BUILDEXPR-Flags

BUILDEXPR

A boolean expression with operators:

  • ~ Not
  • & And
  • | Or

It can be as simple as a build name as shown in the image above or an expression like (A | ~B) & C.

Panelization with different build variants BUILDEXPR-Flags

Single PCB without panelization can be done with frameless setting BUILDEXPR-SinglePCB

Field Values Variants

Field#Flag or multiple flags like Field#FlagA#FlagB will set Field to the value where build flags contain all the flags. Variants-FieldValue Field#Opt=A, Field#Opt=B will be displayed as dropdown options.

Fabrication Planner - Panelizer

Tutorial Video

 Kikakuka/FabPlanner – Panelization

Substrate Hole

Substrate Hole

3D Output

Substrate Hole 3D Output

FreekiCAD (FreeCAD Addon)

Requires FreeCAD 1.0 or later, KiCad 9.0 or later, psutil>=7.2.2, kicad-python>=0.8,<0.9, and shapely>=2.0.7. FreeCAD Addon Manager may not automatically install packages where its allowed-package list excludes them; install them manually inside FreeCAD if necessary. Installing FreekiCAD from Kikakuka's Integration tab installs all three Python packages.

Note

FreeCAD installed through Snap is not supported. Snap confinement isolates the filesystem and local sockets, preventing FreekiCAD from connecting to KiCad's IPC endpoint. Selecting the Snap executable manually does not remove this isolation; use a non-Snap FreeCAD installation or the official AppImage.

FreekiCAD and Kikakuka discover each other on demand through local Unix sockets or Windows named pipes. FreeCAD can manage KiCad instances without the Workspace Manager running. No board, assembly, or usage data is sent to third parties.

When opening a FreeCAD file, Kikakuka first looks for an already open document or reuses a responding FreeCAD instance; see CADhoc for details.

KiCad .kicad_pcb boards and STEP models remain external files referenced by path. When saved as .FCStd, the FreeCAD document caches their generated objects and geometry, but the links remain reloadable from the source files. A .kkkk_asm manifest stores source paths, settings, placements, and an optional structured 3D viewport camera; it never contains cached objects or geometry. Source paths are stored relative to the manifest whenever possible and resolved from its directory on import, when every external source is loaded fresh. The camera is restored field by field in FreeCAD's GUI, skipping unsupported or invalid fields, and ignored by headless STEP/STL export. AutoReload is enabled by default on both object types, so changing either source file reloads its linked FreeCAD object. The option can be disabled independently for each object.

Tip

You can use Kikakuka's Integration tab to install, update, or uninstall the bundled KiCad plugin, KiCad library, and FreekiCAD addon. Close all instances of the affected application before using an install or uninstall button. Release builds already contain the addon packages. When running Kikakuka from source, generate them first with python3 build-tools/build_addon_archives.py (or make archive-zips); the GUI loads the resulting runtime packages from build/addons/.

For a standalone FreekiCAD deployment without Kikakuka, follow the FreekiCAD manual installation instructions.

  • Activate Preferences -> Plugins -> Enable KiCad API. Kikakuka or FreekiCAD can reuse a running matching KiCad editor or start one on demand.
  • FreekiCAD (FreeCAD Addon)
    • Add PCB
      • Drag and drop / Open / Import
        • Drag a .kicad_pcb file into FreeCAD, or use FreeCAD's Open or Import command; switching workbenches is not required.
      • FreekiCAD menu
        • Switch to the FreekiCAD workbench.
        • Menubar -> FreekiCAD -> Add KiCad PCB.
      • All of these entry points create the same linked PCB object.
      • The selected .kicad_pcb remains an external file and is represented by a linked PcbObject. Its AutoReload property defaults to enabled.
    • Add STEP
      • Menubar -> FreekiCAD -> Add STEP
      • The selected STEP model remains an external file. Its AutoReload property defaults to enabled, and its Placement is preserved when the source file is manually or automatically reloaded.
    • Position and assemble linked objects
      • Linked objects work with the Assembly and Manipulator workbenches, as well as FreeCAD's built-in transform tool.
      • FreeCAD Assembly can place PcbObject Links, but currently cannot resolve their child component or connector faces for joints. Use the Manipulator workbench to align those faces.
    • Reload PCB
      • Right-click on the board object -> Reload KiCad PCB
    • Export or import an assembly manifest
      • Use FreeCAD's standard Export command to write .kkkk_asm, or its Import command to read .kkkk_asm; select FreekiCAD Assembly (*.kkkk_asm) as the file type.
      • The JSON stores each external PCB or STEP source path, editable FreekiCAD settings, its placement, and—when exported from the GUI—the active 3D viewport camera. It contains no cached objects or generated geometry, and every external source is loaded fresh during import. Export prefers paths relative to the manifest and falls back to absolute paths only when necessary; relative paths are resolved from the manifest's directory. FreeCAD regenerates object names and labels during import. GUI import restores each available camera field independently after recomputation and skips fields that are invalid or unsupported; headless STEP/STL export ignores the camera.
      • Selecting an original PcbObject or StepObject exports its own Placement. Selecting one or more App::Link instances exports each linked source at that instance's final global placement. Selecting an Assembly::AssemblyObject recursively expands its direct and nested Links, including multiple instances of the same source.
      • Assembly and Link exports are flattened placement snapshots; .kkkk_asm does not store Links, joints, constraints, remaining degrees of freedom, or the Assembly hierarchy. A linked PCB snapshot is exported with SnapToCoupler disabled in the manifest so coupler alignment cannot overwrite its solved Assembly placement; the source PcbObject in the current FreeCAD document is not modified.
      • When original PCB source objects are selected directly, Placement is omitted for a CouplerMoving board if the same export contains its matching CouplerFixed board; coupler alignment recalculates that placement after import.
      • Headless STEP export: freecadcmd scripts/kkkk_export.py input.kkkk_asm output.step; the input may also be a single .kicad_pcb. See Headless STEP and STL Export for platform-specific paths and requirements.
    • Edit Board Shape
      • Expand the object's children.
      • Open the sketch with the _Outline suffix.
    • Inspect Copper Layers
      • FreekiCAD imports tracks, filled zones, pads, vias, and copper-layer graphics as separate F.Cu, In*.Cu, and B.Cu child objects.
      • ImportOuterCopper independently controls F.Cu and B.Cu; ImportInnerCopper controls In*.Cu. Both default to off.
      • Inner layers use their physical stackup Z and are normally hidden by the board body; hide the board or make it transparent to inspect them.
      • Copper is rendered as one unioned zero-thickness face per layer, eliminating overlap between tracks, pads, vias, and zones. Each face retains its physical stackup Z, so inner layers follow the correct bend radius.
      • The substrate remains one body. Imported outer copper reserves its physical stackup thickness at the body boundary; inner copper does not create expensive internal body cavities. Finished board thickness and component/coupler Z never change.
    • Inspect Solder Mask
      • ImportSolderMask imports translucent F.Mask and B.Mask child objects, with pad/via openings computed by KiCad plus explicit mask-layer graphics. It defaults to off.
      • The resulting F/B mask-opening geometry is also subtracted from stiffener solids on the matching side.
      • With mask import enabled, the board body uses the configured dielectric stackup colors and KiCad opacity, or white with KiCad's default board-body opacity when no color is available. Mask opacity likewise follows its KiCad stackup color. Both display opacities are scaled to 70% in FreeCAD. With mask import disabled, the original opaque board color is preserved.
      • Mask is a zero-thickness face at the finished outer surface. Imported mask reserves its physical outer stackup thickness in the single substrate body; when mask import is disabled, the body fills that thickness.
    • Inspect Silkscreen
      • ImportSilkscreen imports board- and footprint-level graphics, references, values, fields, and free text from F.SilkS and B.SilkS. It defaults to off.
      • Silkscreen is a zero-thickness face on the finished board surface. A Coin3D polygon offset resolves viewport z-fighting without moving the geometry, so measurements, bounds, and exports retain the exact finished dimensions.
    • Flexible PCB Stiffener
      • Import annotated stiffener solids automatically from F.Stiffener and B.Stiffener user layers.
    • Coupler-Based PCB Alignment
      • Place a CouplerFixed footprint on the reference PCB and a CouplerMoving footprint on the PCB to be aligned. Couplers are matched by their KiCad reference.
      • Alternatively, place one CouplerAt on a PCB to align it with a virtual CouplerFixed at the absolute FreeCAD world coordinates given by its TargetX, TargetY, and TargetZ properties. All three default to 0 mm. Usually place CouplerAt on B.Cu so the PCB bottom surface is positioned at TargetZ; use F.Cu only when the top surface should be the reference. A PCB may contain only one positioning source: one CouplerMoving or one CouplerAt.
      • After any linked PCB reloads, positioning is recalculated for every linked PCB in dependency order. A concurrently reloading PCB is skipped until its fresh poses and bent markers are available; its completion triggers another full pass. A PCB with SnapToCoupler enabled (the default) is moved as a whole so that its moving coupler plane meets the matching fixed coupler plane face-to-face; disabling it excludes that PCB from automatic positioning. Alignment uses each plane's position after flex-PCB bending. Each coupler is also available as a child object in FreeCAD; its plane marker is hidden by default and can be shown for inspection.
      • FreekiCAD checks the saved coupler list against KiCad's live document every second, including unsaved position, side, rotation, Z, Offset, Tilt, and CouplerAt target edits. A changed pose updates its marker and recalculates linked-board positioning. The coupler child object's footprint position and local-plane properties are editable in FreeCAD; edits update the marker and linked-board positioning immediately and are written back to the live KiCad footprint. Y is shown using FreeCAD's axis convention. Older footprints without an Offset field load as 0 mm; editing Offset in FreeCAD creates the missing hidden KiCad field automatically. Adding, removing, or changing the identity of couplers takes effect on the next PCB reload, which rebuilds the saved list.
      • The kicad-addon/library directory provides CouplerFixed, CouplerMoving, and CouplerAt.
      • Alignment example boards: assembly-power.kicad_pcb, assembly-mcu.kicad_pcb, assembly-led.kicad_pcb, and assembly-mezzanine.kicad_pcb.
      • The coupler plane is defined by the footprint position, side, rotation, and these custom footprint properties:
        • CouplerFixed and CouplerMoving use Z to move the plane origin along the PCB surface normal. It defaults to 0 mm; the origin starts at the PCB surface, including the board thickness on F.Cu, and the direction is reversed on B.Cu.
        • Offset moves the plane origin on the PCB surface in the direction indicated by the footprint triangle. It defaults to 0 mm. Z and Offset accept values without a unit as millimetres and support mm, cm, in, mil (0.001 in), and um.
        • Tilt tilts the plane around the footprint's local X axis. It is specified in degrees and defaults to 0.
        • CouplerAt uses TargetX, TargetY, and TargetZ as its absolute FreeCAD world target and does not have a local Z property. The target properties default to 0 mm; the same length units are supported. B.Cu is recommended for the usual bottom-surface placement at TargetZ; use F.Cu only to reference the top surface.
      • Placement applies the footprint position and rotation, then Offset, Z, and Tilt. Tilt rotates around the footprint's local X axis at the offset origin; it does not redirect either displacement. The footprint's normal KiCad rotation supplies the rotation around its local Z axis.
    • Flex PCB Bending
      • Name a KiCad graphical layer FreekiCAD (case-insensitive) and draw bend lines on it as line segments.
      • Panel export maps every source PCB's FreekiCAD drawings to one collision-free User layer and preserves the freekicad layer name, even when source boards use different User.x layers.
      • Add bend parameters as text on the same FreekiCAD layer near a bend line endpoint, for example a=-70 r=0.5 or a=-70 s=0.61.
        • The text anchor must be within 0.1 mm of a bend line endpoint.
        • a is bend angle in degrees.
        • r is bend radius. s is the full bend span and is used to derive r when r is omitted, using the board thickness from stackup.
        • Both lengths accept mm, cm, um (also µm/μm), in, and mil; omitted units mean mm. Unit suffixes are case-insensitive. Unsupported units are rejected.
        • Parameters may appear in any order, with whitespace around = and before units: r = 5 mm a = 60 is equivalent to a=60 r=5mm. If both r and s are present, r takes precedence.
      • After loading the board in FreeCAD, each bend line appears as a child object with Angle, Radius, and Active properties.
      • The linked PCB object also has an EnableBending property to toggle the deformation on or off.
      • Imported copper and solder mask are cut with the same board pieces. Rigid display faces follow each piece, while faces in a bend band are rebuilt with the wedge's curved point mapping.
      • If no bend text is provided, the bend line still loads and can be configured directly in FreeCAD.

Coupler-Based PCB Alignment

Tutorial Video

Kikakuka/FreekiCAD – STL/STEP and KiCad PCB Assembly

Positioning Arguments

Coupler-Arguments

Coupler Pair

FreekiCAD-Coupler FreekiCAD-Coupler-Assembly

Changing Z and Tilt

FreekiCAD-Coupler-Z-Tilt FreekiCAD-Coupler-Z-Tilt-Assembly

Coupler plane markers are available as child objects in FreeCAD and are hidden by default.

Flexible PCB Stiffener

FreekiCAD-Stiffener

Rename KiCad user layers to F.Stiffener and/or B.Stiffener (case-insensitive). Each closed rectangle, circle, polygon, or connected line/arc outline is imported automatically as one stiffener area; the KiCad display fill may be on or off. Put one text annotation inside each area and separate properties with / or newlines:

Name=Tail reinforcement
Material=Polyimide
Color=#C87518
Opacity=0.65
Thickness=25 um

Material and Thickness are required. Name, Color, and Opacity are optional and property names are case-insensitive. A non-empty Name becomes the suffix of the FreeCAD child name and label (F_Stiffener_<Name> or B_Stiffener_<Name>) and is included in bend-overlap warnings. Thickness accepts mm, cm, in, mil (0.001 in), and um; a unitless value is interpreted as millimetres.

Invalid annotations, annotations outside an area, and areas with multiple annotations are reported as errors and skipped. Unannotated areas are skipped with a warning.

Material Default color Default opacity
FR4 #C8B45A 0.90
Polyimide #C87518 0.65
Stainless_Steel #A7ADB4 1.00
3M468 #F2E3BD 0.28
tesa8854 #EEE8D8 0.45
3M9077 #DDE8EE 0.30

Other material names are accepted with a warning. When Color or Opacity is omitted for an unlisted material, the corresponding Polyimide default is used.

Front stiffeners extend outward from the front silkscreen plane; back stiffeners extend outward from the back silkscreen plane. They remain rigid during flex bending. Pad, via, and explicit mask-graphic openings on F.Mask are cut through front stiffeners; B.Mask openings are cut through back stiffeners. This happens even when ImportSolderMask is disabled. If a stiffener overlaps the full bend band, FreekiCAD prints a warning containing the stiffener name, bend name, and overlap area.

Stiffener thickness is additive outside the finished PCB and is never counted in or subtracted from the board body.

Flexible PCB Bending

Tutorial Video

Kikakuka/FreekiCAD – Flexible PCB Bending

Manual bending checks are currently done with these sample boards:

For the implementation details of the bending pipeline, see FreekiCAD/ARCHITECTURE.md.

Bending + Assembly

FreekiCAD-Bending-Assembly

Kikakuka Library

The KiCad library is stored under kicad-addon/library. You can install it from Kikakuka's Integration tab. For a manual installation, add kicad-addon/library/footprints/Kikakuka.pretty to KiCad's footprint library table (for example, as Kikakuka). Its Kikakuka.3dshapes directory contains the unit-cube placeholder and optional coupler helper models.

  • Variable displays its Value on the board. In the Kikakuka Fabrication Planner, use build-variant fields such as Value#Flag or Value#Option=Choice to show a value selected by the active build flags or options.
  • StringTemplate formats its Value during Kikakuka Fabrication Planner export. Braced placeholders are replaced with matching footprint properties or build options after build-variant fields have been applied.
  • CouplerFixed and CouplerMoving define matching planes for coupler-based PCB alignment. Give a pair the same reference and use their Z, Offset, and Tilt properties as needed.
  • CouplerAt aligns its PCB to absolute FreeCAD world TargetX, TargetY, and TargetZ coordinates, all defaulting to zero. Place it on B.Cu for the usual behavior, where the PCB bottom surface is positioned at TargetZ; use F.Cu only to reference the top surface.

For coupler length properties (Z, Offset, TargetX, TargetY, and TargetZ), unitless values are millimetres; supported suffixes are mm, cm, in, mil, and um/µm. Tilt is in degrees and may optionally use deg or °.

All three coupler footprints use the Unspecified type, placing their helper models under Virtual Models in KiCad's 3D Viewer.

The separate Kikakuka Tools IPC plugin provides Coupler 3D Viewer and Hide Couplers actions. Coupler 3D Viewer applies each coupler's Z, Tilt, and Offset to its helper model and opens KiCad's 3D Viewer; Hide Couplers marks these models hidden without removing them and also opens the Viewer. Populate Placeholder 3D Models likewise opens the Viewer after populating models. To omit couplers from STEP export, enable Ignore 'Unspecified' components.

Technical Background and Evolution

Kikakuka is mainly built on top of KiKit, Shapely, modified pcb-tools, OpenCV, pypdfium2 and PUI.

Its FreeCAD integration is inspired by KiCadStepUp and KiConnect.

Kikakuka, formerly Kikit-UI, began as an interactive GUI for KiKit and later expanded to include a workspace manager. File-to-instance tracking was introduced to make navigation from the workspace manager to KiCad reliable, with the workspace manager initially serving as the central orchestrator. After FreekiCAD was introduced, that mechanism evolved into CADhoc, a mesh of peer nodes running in Kikakuka and FreekiCAD without a permanent central orchestrator. The mesh also includes a client-only node in the KiCad add-on. CADhoc maintains a shared view of KiCad and FreeCAD instances and their open documents, so navigation no longer depends on the workspace manager.

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

On Debian/Ubuntu, PySide6's X11 platform plugin also needs these system libraries:

sudo apt install libxcb-cursor0 libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1

Kikakuka uses opencv-python-headless for image processing and PySide6 for its windows. If an existing environment has opencv-python installed, replace it before reinstalling requirements (both packages provide the same cv2 module):

./env/bin/pip3 uninstall opencv-python
./env/bin/pip3 install -r requirements.txt

Update submodule

git submodule update --init --recursive

Run

./env/bin/python3 -m kikakuka
# Equivalent directory entry point:
./env/bin/python3 kikakuka/

Run from source (Windows)

On Windows the Python interpreter is at C:\Program Files\KiCad\10.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.

# Powershell
# Initialize bundled submodules after cloning
git submodule update --init --recursive

# Git for Windows may check symlinks out as text files containing their target
# paths. Replace all tracked symlinks with physical files/directories so the
# source tree can run without Windows symlink support.
& .\tools\materialize-symlinks.ps1

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

The materialization only changes the working tree; Git still tracks those paths as symlinks. Re-running the script refreshes the physical copies. If PowerShell blocks local scripts, run powershell -ExecutionPolicy Bypass -File .\tools\materialize-symlinks.ps1.

CLI Usage

# Just open it
./env/bin/python3 -m kikakuka

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

# Open KiCad files through the instance manager
./env/bin/python3 -m kikakuka --open a.kicad_pcb

# Run a foreground CADhoc node with request/mapping logs
./env/bin/python3 -m cadhoc
# The equivalent directory entry point is: ./env/bin/python3 cadhoc

# Open or focus a PCB and reload it from disk once its IPC API is ready
./env/bin/python3 -m kikakuka --open --fresh a.kicad_pcb
# In a mixed list, --fresh affects only .kicad_pcb files; schematics and
# projects are opened normally.

# Stop all same-user KiCad and FreeCAD GUI instances (not FreeCADCmd)
# Warning: unsaved work may be lost.
./env/bin/python3 -m kikakuka --killall

# Stop only one application (case-insensitive)
./env/bin/python3 -m kikakuka --killall freecad
./env/bin/python3 -m kikakuka --killall kicad

# Export a FreekiCAD assembly through the detected FreeCADCmd and bundled exporter
./env/bin/python3 -m kikakuka input.kkkk_asm output.step
./env/bin/python3 -m kikakuka input.kkkk_asm output.stp
./env/bin/python3 -m kikakuka input.kkkk_asm output.stl

# Run the detected FreeCADCmd with pass-through arguments
./env/bin/python3 -m kikakuka --freecadcmd FreekiCAD/scripts/kkkk_export.py input.kkkk_asm output.step

# Load file (.kkkk, .kkkk_fab, or legacy .kikit_pnl)
./env/bin/python3 -m kikakuka a.kkkk_fab

# Headless export for panelization or build variants
./env/bin/python3 -m kikakuka a.kkkk_fab out.kicad_pcb

# Differ
./env/bin/python3 -m kikakuka --differ a.kicad_sch b.kicad_sch
./env/bin/python3 -m kikakuka --differ a.kicad_pcb gerber_folder
./env/bin/python3 -m kikakuka --differ gerber.zip b.kicad_pcb

# Gerber to KiCAD Conversion
./env/bin/python3 -m kikakuka gerber.gbr out.kicad_pcb
./env/bin/python3 -m kikakuka gerber_folder out.kicad_pcb # BOM/CPL will be detected if they are in the folder
./env/bin/python3 -m kikakuka gerber.zip out.kicad_pcb
./env/bin/python3 -m kikakuka gerber.zip out.kicad_pcb bom_or_cpl_1.csv bom_or_cpl_2.csv # BOM/CPL files are determined by filename regardless of argument order

Reverse-Engineering Notes for KiCAD Gerber

  • Convert Gerber to .kicad_pcb with BOM/CPL using Kikakuka
  • Footprint names are also exported, so Tools -> Update Footprints from Library can bring back the footprint if the name matches
  • Lock the footprint, clean up with quick selection and deletion, unlock the footprint (you will need to set the Selection Filter)

About

Kikakuka — KiCad Workspace, Panelization, Build Variants, Differ & FreeCAD PCB Bending and Assembly

Topics

Resources

Stars

82 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages