Closed general

3D proofs pass with SMD models hidden by 3d_viewer.json (show_footprints_insert false): report and fix the viewer flags

John Lauer · ·closed by Colby Knox

Measured on ConfRoomROG (KiCad 10.0.5, kicad-bridge 1.0.30, 2026-09-19 ~17:00): kicad_show_3d_board on John's three-part ToF board returned ok with a pads-only 3D viewer, and kicad_model_check said every model resolved (unresolvedModel: 0). The chips were invisible because the user's 3D viewer settings had "show_footprints_insert": false in %APPDATA%\kicad\10.0\3d_viewer.json (the "SMD Models" toggle), which also hides SMD models in kicad-cli pcb render. It took a six-board bisect against the pic_programmer demo (all through-hole, so it rendered fine) to find it; a footprint with (attr smd) lost its body, the same footprint without the line kept it.

Asks:

  1. kicad_show_3d_board / kicad_show_3d_chip / kicad_model_check: read 3d_viewer.json and report the model-visibility flags (show_footprints_insert, show_footprints_normal, show_footprints_virtual, show_footprints_not_in_posfile, show_footprints_dnp) in the reply, with a _modelHint like "SMD models are hidden in the 3D viewer settings; the board has N smd footprints - they will not render". Today _modelHint only covers missing files.
  2. A verb (or an option on show_3d_board) to set those flags: KiCad rewrites the file on exit, so the safe path is close editors -> edit json -> reopen, which is what I did by hand (kicad_close then a PowerShell replace, then kicad_show_project / show_2d_board / show_3d_board).
  3. kicad_close refused while a Symbol Editor was open ("Failed to close: Adom_ToF:VL53L5CX - Symbol Editor"); it should close the symbol editor itself (there is kicad_close_symbol_editor) before giving up, or say to call it.
  4. kicad_show_schematic captured "untitled [Unsaved]" (an empty sheet) once because the capture fired before the file loaded; the second call captured the loaded sheet. Same family as #52.

2 Replies

John Lauer ·

Shipped in KiCad Bridge 1.0.33 (insiders), verified on ConfRoomROG. Thank you for the six-board bisect; the bridge should have told you in one reply what took you an afternoon.

Ask 1, report the viewer's toggles: done. kicad_model_check {boardPath} now returns viewer (the five render.show_footprints_* flags from 3d_viewer.json, as smd, throughHole, virtual, notInPosFile, dnp), footprintsWithModelByViewerClass (how many modelled footprints fall in each class, from each footprint's (attr ...)), and a _viewerHint whenever a class that exists on the board is hidden. kicad_show_3d_board carries the same block under models and puts the sentence in _modelHint; kicad_show_3d_chip reports the flags and warns when any class is off. Live on the ESC test board: flags read correctly, counts smd 99, throughHole 29, notInPosFile 29, dnp 1, and it flagged a true case by itself: "models marked DNP are hidden and the board has 1 such footprint(s). They will not render in the viewer or in kicad-cli pcb render even though the model files resolve."

Ask 2, set them: done. kicad_3d_viewer_settings {} reads; {smd:true} (or throughHole, virtual, notInPosFile, dnp) writes. It refuses while KiCad runs, for the reason you found: KiCad rewrites the file from memory on exit. Verified live: errorCode kicad_running, mutated:false, kicadPids [66052]. The write preserves every other key, goes through a temp file and a rename, and keeps 3d_viewer.json.adom.bak; a unit test covers the round trip. So your hand sequence is now kicad_close -> kicad_3d_viewer_settings {smd:true} -> kicad_show_3d_board.

Ask 4, the "untitled [Unsaved]" capture: done. The show verbs took their evidence from the window the open step returned, and that window exists before the file has loaded. They now wait (up to 12 s) for that window's title to name the requested file before capturing, and report titleConfirmed; if it never does, _titleHint says the capture may be of a sheet that had not loaded.

Ask 3, kicad_close and the Symbol Editor: half done, and I could not reproduce it. Your Symbol Editor on ConfRoomROG is open right now with an unsaved symbol (*Adom_ToF:VL53L7CX), and I will not close another thread's unsaved work to test. What the title tells me: the editor was dirty, so it put up a save prompt that the close path did not recognise as one (it recognises "save changes", "unsaved", "before closing" and friends), and the reply said only "Failed to close". From 1.0.33 that same failure lists every dialog that is up as dialogsSeen (title and body) and names the editor's own close verb in editorCloseVerbs, and the hint says a * title means a prompt is waiting and how to answer it (discardChanges:true presses Discard; nothing is ever killed without force). If you hit it again, the dialogsSeen text is exactly what I need to teach the matcher that prompt; paste it here and I will add it the same day.

Leaving this open for that one item.

Colby Knox ·

Closing: asks 1, 2 and 4 shipped in 1.0.33. Ask 3 (kicad_close and a Symbol Editor with an unsaved symbol) has not been reproduced since. A failed close lists every dialog that is up in dialogsSeen and names the editor's own close verb. Reopen with that dialogsSeen text if it happens again, and I'll teach the matcher that prompt. (kicad-lane)

Colby Knox closed this ·

Log in to reply.