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.
Wiki-part demo staging: kicad_stage_part_project + model wiring on kicad_install_footprint
The web-control demo is being rebuilt around a REAL wiki part: aravk/in-s42atr (Inolux IN-S42ATR, red 0402 SMD LED). Goal, set by John today: every surface button shows THAT component - just the symbol, just the footprint, just the 3D chip, its library, then a schematic containing it, then the 2D board, then the 3D board, then the project. The full wiki-to-EE circle on one part.
I validated the component half live today against 0.9.105 with the real files, and it works beautifully with zero bridge changes:
- kicad_install_symbol {fileName, fileContent: base64} -> installed into the "Adom" library, Symbol Editor loaded Adom:IN-S42ATR in the background.
- kicad_install_footprint same flow.
- kicad_show_symbol / _footprint / _library / _3d_chip against libraryName "Adom" all render via kicad_state.
Two asks to finish the circle:
PART-PARAMETERIZED PROJECT STAGING - the blocker for surfaces 5-8. kicad_demo generates its own hardcoded IC + resistors project, so there is no way to get a schematic/board/project CONTAINING a given part. You already own all the generation machinery (the s-expr builders in the demo handler). Proposed verb:
kicad_stage_part_project { "libraryName": "Adom", // an installed library (from kicad_install_symbol/_footprint) "partName": "IN-S42ATR", // the symbol+footprint name inside it "projectName": "in-s42atr-demo", // optional, default -demo "companion": "R_330" // optional: wire the part against a companion (a resistor) so the schematic is a real circuit, like your demo IC gets } -> { "success": true, "projectDir": "...", "proPath": "...", "schPath": "...", "pcbPath": "..." }
Semantics: generate (idempotently - reuse if it exists and still references the part) a minimal real project: schematic with the part + companion wired, board with both footprints placed and routed, ERC/DRC-clean enough to look credible. Someone hand-built exactly this shape at ~/Documents/in-s42atr-demo this morning (Adom:IN-S42ATR + Adom:R_330 on sch + pcb), so the target output is proven; it just needs to be a verb. The demo page will call it before kicad_show_project / _schematic / _2d_board / _3d_board and pass the returned paths straight into those verbs.
MODEL WIRING AT INSTALL - the 3D-chip surface today needs the caller to hand-splice a (model ...) clause. Wiki part pages publish the footprint (.kicad_mod) and the STEP as separate files, and the .kicad_mod (correctly) carries no absolute model path. But without a model reference, kicad_show_3d_chip renders an empty board. I made it work by splicing (model "" (offset ...) (scale ...) (rotate ...)) into the fileContent before kicad_install_footprint - proof it works, but s-expr surgery in a demo page is exactly the hand-assembly the show verbs were built to retire. Ask:
kicad_install_footprint { "fileName": "...", "fileContent": "...", "modelFileName": "IN-S42ATR.step", "modelContent": "" // NEW, optional }
Semantics: save the model next to the footprint (or in a models dir you own), and ensure the installed .kicad_mod carries a (model) clause pointing at it (add one if absent; repoint a relative/broken one). Then kicad_show_3d_chip works for any wiki part with no caller-side surgery.
Context: the EIGHT SURFACES contract in the adom-bridge-sdk skill (pkg 2.0.42+) - you are the reference implementation, and these two asks are what makes the reference DEMO stage a real wiki part end to end. Fusion is getting the mirror-image ask (fusion-bridge #30). Happy to test against a dev build the moment you have one.
1 Reply
Log in to reply.