app
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.
← Commit history
0.9.307: Tour verification (John: 'tool your bridge code to definitively know that the correct thing is showing'): every beat now MEASURES, after its raise, that its own window is the top of AD's z-order, that the live title carries the expected document, that the GL canvas is rendered (kicad_ui canvas probe) and that two captures 0.8 s apart are identical (settled). The result rides on the step and on progress as ; motion runs only on a verified window, otherwise the step says exactly which fact failed and which window was actually on top. Zoom discipline: 2D beats start and end on extents with two wheel clicks in and back out; 3D beats zoom one menu step in and out and end on Zoom to Fit while staying isometric.
1 file changed
+12−9
handlers/demo_motion.py+12−9@@ -157,14 +157,14 @@ def choreograph_3d_menu(hwnd: int, abort=None, log=None) -> dict | None: if not all(k in ids for k in ("rotx_cw", "rotz_cw", "zoom_in", "zoom_out")): return None rep = {"kind": "3d", "method": "menu", "gestures": 0, "aborted": None, "ids": ids}- plan = ([("fit", "fit", 1, 0.6)] if "fit" in ids else []) + [+ plan = ([("extents", "fit", 1, 0.6)] if "fit" in ids else []) + [ ("tilt", "rotx_cw", 3, 0.28), # ~30 degrees toward isometric ("turn", "rotz_cw", 4, 0.28), # ~40 degrees of yaw- ("zoom-in", "zoom_in", 2, 0.35),+ ("zoom-in", "zoom_in", 1, 0.5), # one measured step, never a close-up ("orbit", "rotz_cw", 6, 0.32), # a slow 60 degree orbit- ("zoom-out", "zoom_out", 2, 0.35),+ ("zoom-out", "zoom_out", 1, 0.5), ("orbit-back", "rotz_ccw" if "rotz_ccw" in ids else "rotz_cw", 4, 0.32),- ]+ ] + ([("extents-2", "fit", 1, 0.4)] if "fit" in ids else []) # end framed, still isometric for name, key, reps, dt in plan: for _ in range(reps): if abort and abort():@@ -224,15 +224,18 @@ def choreograph(hwnd: int, kind: str, abort=None, log=None) -> dict: ("orbit-3", lambda: drag("left", cx, cy, cx - yaw, cy, steps=30, dt=0.04)), ] else:+ # John, 2026-09-03: "your zooming is too close ... zoom extents, then be+ # smart about how close". Extents first, two wheel clicks in (about+ # 1.7x), a short pan, back out, and END on extents so the frame the+ # user is left with is the whole thing. plan = [- ("fit", lambda: key(VK_HOME)),- ("zoom-in", lambda: wheel(3, cx, cy)),+ ("extents", lambda: key(VK_HOME)),+ ("zoom-in", lambda: wheel(2, cx, cy)), ("pan-right", lambda: drag("middle", cx, cy, cx - dx, cy, steps=16)), ("pan-down", lambda: drag("middle", cx, cy, cx, cy - dy, steps=16)),- ("zoom-in-2", lambda: wheel(2, cx, cy)), ("pan-back", lambda: drag("middle", cx, cy, cx + dx, cy + dy, steps=16)),- ("zoom-out", lambda: wheel(-4, cx, cy)),- ("fit-2", lambda: key(VK_HOME)),+ ("zoom-out", lambda: wheel(-2, cx, cy)),+ ("extents-2", lambda: key(VK_HOME)), ] for name, fn in plan: if not gate(name):