← Commit history

Publish 1.0.12

John Lauer ·9af472af41 ·3mo ago ·parent 0bad62a
4 files changed +40−8
README.md−6
@@ -23,12 +23,6 @@ KiCad is the user's **host app**. The bridge *detects* an existing KiCad and, if  **▶ [Watch the demo](https://wiki.adom.inc/blob/app/adom-desktop-kicad-bridge/kicad-bridge-demo.mp4)** (48s, 🔊 narrated) — the bridge driving real KiCad on a Windows VM: **select** a footprint and **zoom** the copper in the PCB editor, **rotate** the assembled board in 3D, then tour the schematic, symbol, and footprint editors. Genuine screen recording of the live windows (zoom / select / 3D rotation), narrated section by section — not animated stills. -## Demo #2 — 5 basic parts, from the wiki into KiCad--[![Adom KiCad Bridge — 5 basic parts, live in KiCad](https://wiki.adom.inc/blob/app/adom-desktop-kicad-bridge/kicad-bridge-parts-demo-poster.png)](https://wiki.adom.inc/blob/app/adom-desktop-kicad-bridge/kicad-bridge-parts-demo.mp4)--**▶ [Watch demo #2](https://wiki.adom.inc/blob/app/adom-desktop-kicad-bridge/kicad-bridge-parts-demo.mp4)** (88s, 🔊 narrated) — five Adom basic parts (ESP32‑S3, AD7124 ADC, BME688, SAMD51, INA226) taken from the wiki straight into KiCad 10: each **schematic symbol** (carrying its 3D‑chip vector), its **footprint**, and its **laser‑etched 3D chip** — the manufacturer part number is real B‑rep geometry embossed onto the chip's top face, rendered *live* in KiCad's 3D viewer. Then three of them are placed on a **brand‑new board** — schematic, 2D layout, and a live 3D render. All of it headless on a GPU‑less cloud Windows VM (KiCad's 3D viewer software‑rendered via Mesa).- ---  ## How it fits together
package.json+1−1
@@ -1,6 +1,6 @@ {   "slug": "adom-desktop-kicad-bridge",-  "version": "1.0.11",+  "version": "1.0.12",   "type": "app",   "description": "KiCad bridge for Adom Desktop.",   "tags": [
page.json+1−1
@@ -4,7 +4,7 @@   "slug": "adom-desktop-kicad-bridge",   "title": "Adom Desktop - KiCad Bridge",   "brief": "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.",-  "version": "1.0.11",+  "version": "1.0.12",   "tags": [     "kicad",     "pcb",
skills/kicad-bridge-dev/SKILL.md+38
@@ -119,3 +119,41 @@ subprocess (like kicad-cli) — NOT AD's gated `run_script`. ## Testing on a fresh AD / VM  `refresh_bridges {name:kicad}` pulls the new cache; the RUNNING instance keeps its old code until it dies — `bridge_kill {name:kicad}` forces a fresh spawn that loads the new version and re-detects. The first verb after a kill returns a `bridge_starting` envelope — retry. Confirm the running version via `bridge_log_read` ("starting v0.9.xx").++## Hard-won field notes (winvm full-battery, 2026-07)++**Headless / GPU-less VM 3D rendering — deploy Mesa llvmpipe.** KiCad's 3D viewer needs+OpenGL ≥ 1.5; a bare Azure/cloud Windows VM only has the GDI generic GL 1.1, so the 3D+viewer shows a black canvas + *"Your OpenGL version is not supported."* Fix: drop the Mesa+software-GL DLLs next to `pcbnew.exe` (its dir wins the DLL search order). Get+`mesa3d-<ver>-release-msvc.7z` from `pal1000/mesa-dist-win`, extract the **x64** DLLs and copy+`opengl32.dll` + `libgallium_wgl.dll` (the ~60 MB llvmpipe renderer) + `dxil.dll` ++`libGLESv2.dll` into KiCad's `bin`. KiCad 10 via winget installs **per-user**+(`%LOCALAPPDATA%/Programs/KiCad/10.0/bin`, writable without admin), not Program Files. After+that, full board 3D renders live and stably (software-rendered).++**Menu-command ids DRIFT across KiCad builds — resolve them live.** The PCB "3D Viewer" id was+20563 on one build, **20568** on KiCad 10 as shipped to winvm. Never hardcode: use+`bridge_client.resolve_menu_id_via_bridge(exe, contains="3D Viewer", frame_index=…)`+(get_menu_ids + text match) with the constant only as a last-ditch fallback.++**The Footprint Editor is a FRAME inside the pcbnew process** (KiCad 10), so the reverse-bridge+plugin can drive its 3D viewer with NO focus steal: `resolve_frame_index_via_bridge("pcbnew",+"Footprint Editor")` → `wm_command{frame_index, menu_id}`. `wm_command` honors frame_index even+though `get_menu_ids` currently only reports frame 0. This replaced the old Alt+3 keystroke+path (needed foreground + raised `UnboundLocalError` on a shadowed `VK_MENU`).++**Legacy `(module …)` footprints** (KiCad ≤5 / EAGLE-imported / most chip-fetcher parts) are+rejected by a v9 board parser. `place_footprint` now normalizes `(module`→`(footprint` + quotes+the top-level `(layer X)`; that splices into a preview board and KiCad loads it. (pcbnew's GUI is+stricter than `kicad-cli lint` — a footprint can lint clean yet the GUI aborts with "Open+canceled by user"; when that happens, screenshot the `#32770` error dialog to see why.)++**`kicad_click` is RELATIVE by default** — `x`/`y` are fractions 0.0–1.0 of the window, NOT+pixels. Passing pixels with the default clicks far off-screen (can hit another window's close+box and crash KiCad). v0.9.59 guards this, but always pass fractions or `{"relative": false}`.++**Capture without a round-trip:** AD-core `desktop_screenshot_window {hwnd}` returns a+container-local path in `localFullPath` (already pulled) — Read it directly, no `pull_file`+needed. It's also background-safe (PrintWindow), unlike `kicad_screenshot_all` which can time+out capturing every window.