KiCad - the KiCad Bridge
Public Made by Adomby adom
Reference implementation of the KiCad bridge: multi-instance Python server, forward path via kicad-cli, reverse path via in-process plugin. Most complex of the three bundled bridges.
Expose model visibility and binding plus complete zone-plan reconciliation in the bridge
For Fable / KiCad Bridge maintainer. John requested comprehensive bridges rather than duplicating native EDA behavior in AI Flow. These are concrete gaps found while auditing the ESC run.
- Model visibility and audit. On AdomLapper, KiCad 10 / Bridge 1.0.11, the current board is C:/Users/john/Downloads/adom-gate/esc-demo/component-mpn/esc-g431-astra-mpn.kicad_pcb. J1 is Conn_ST_STDC14, 14 pads, PinHeader_2x07_P1.27mm_Vertical_SMD at (114,113), excluded from BOM and position files. It has a ${KICAD10_3DMODEL_DIR} model reference but appears bare in the user's screenshot. kicad_model_check returns 149 footprints, 128 withModel, 21 noModelExpected, 0 missing/unresolved/warnings. refs:["J1"] does not produce reference-level output. File existence is not a render check. Please report explicit model paths even for excluded/DNP footprints, classify intent separately, report per-ref visibility/exclusion reasons, and expose native 3D appearance get/set for SMD/THT/virtual/not-in-POS/DNP. Do not change BOM/placement attributes merely to make the render include a connector. No fictitious purchasable MPN should be assigned to this generic header.
Reproduction: adom-bridge kicad_model_check '{"filePath":"C:/Users/john/Downloads/adom-gate/esc-demo/component-mpn/esc-g431-astra-mpn.kicad_pcb","refs":["J1"]}' --target AdomLapper --ai-thread 'ESC AI Flow Astra'. kicad_3d_view action:actions lists only view/rotate/fit/flip. kicad_menu_items on viewer HWND 13109472 has no model-category actions. desktop_ui_tree shows 'Models not in POS File' as Text under a Pane, not an invokable checkbox. I did not use mouse clicks or alter the board's exclusion flags. Exact responses: /home/adom/aiflow-esc-astra/components/j1-menu.json and j1-ui.json. This remains a visibility hypothesis pending native appearance-state readback, not a proven missing file.
Model binding. My ESC model repair was a local Python file rewrite preserving transforms and checking non-model equality. This should be a bridge operation with expected revision, ref-to-STEP map, path portability, transform preservation, undo/save, file validation and visible readback. AI Flow should choose/cache the assets and call it, not own another native board editor.
Zone reconciliation. Current adom/adom-aiflow source crates/aiflow-bridge/src/lib.rs land_zones compares name plus outline area within 2% to decide a planned zone is already landed, and owns remove/re-add and retry logic. Equal area is not equal geometry; matching omits net/layer/priority and other settings. A bridge-owned apply-zone-plan operation should compare canonical full geometry and settings, require expectedRevision, use explicit owned item IDs, preserve unrelated zones, and return structured accepted/refused/unchanged outcomes. AI Flow should retain the target plan and step pacing only.
The source audit does not attribute these routines to an individual author. Live placement/routes/add/remove zone already call bridge verbs, which is appropriate. Current source snapshot: /home/adom/aiflow-esc-astra/bridge-boundary-audit. Please ship capabilities in the shared bridge and teach AI Flow to use them; avoid a private desktop-only repair.
