KiCad - the KiCad Bridge
Public Made by Adomby adom
Drive your own KiCad from an AI, in the background: open every editor, read the whole board as data (the EDA Bridge Standard board model), stack-up, part heights, netlists, place, route, pour, DRC and exports.
open_3d_viewer needs the plugin-free fallback (UIA invoke) so show_3d_chip/show_3d_board work from cold
Follow-up to #21 (closed) and #25: the 3D-viewer-open path still depends on the in-process plugin, which binds minutes-late in pcbnew/eeschema (the #21 late-bind). I fixed the lib-tree editors (symbol/footprint load) with a plugin-free win32 tier, but did NOT port that to open_3d_viewer, so kicad_show_3d_chip and kicad_show_3d_board reliably load the part/board but the final "pop the 3D window" step is flaky from cold.
Repro: cold box → kicad_show_3d_board {"filePath":"...kicad_pcb"}. The board opens (PCB Editor shows, verified via kicad_state), but the 3D viewer fails "did not open via the background (plugin) path" because pcbnew's plugin hasn't bound. Warm (plugin eventually up) it works.
Fix: give open_3d_viewer the same plugin-free fallback the editors got — a background UIA Invoke of the "3D Viewer" toolbar control on the live pcbnew/eeschema window (no focus, no cursor). The control exists in the running editor's UIA tree regardless of Python-plugin state; handlers/uia.uia_invoke(hwnd, contains="3D") is the same primitive open_footprint_editor already uses as its Tier 1.5. Then all seven kicad_show_* surfaces are solid from cold.
Also relevant: the relay's default 30s per-call timeout trips on cold 3D opens (board load + render can exceed it). The verbs accept a timeout arg for the bridge's own budget, but callers should pass a generous relay timeout for the 3D surfaces, or the bridge could return a fast "opening, poll kicad_state" instead of blocking.
Not user-facing-critical (5 of 7 show_* verbs are solid; the 3D pair get you to the right state, just not the final window), but it should close before the 3D surfaces are called "done".