Inspecting the enclosure
Standard pass (after every build)
- Checks. Run
checks.run_checks()with thefusion-buildrunner. It takes 3–8 min with the v2 fine lattice, which is longer than the MCP tool's timeout. So run the build alone through the MCP, then run the checks as a separate runner file withpython scripts/fmcp.py script <file>as a background Bash task (it has a 900 s timeout). If you call the MCP while the checks are still running, it just times out, so wait for them to finish. Scripts run on Fusion's UI thread. A timed-out call keeps running and later calls queue behind it. On 2026-10-04,pointContainmentscans in 0.01 mm steps hung Fusion until it had to be killed. Probe a few chosen points instead of scanning, and putadsk.doEvents()in long loops (wslib.clashesand the lattice cut already do). It checks for clashes between Enclosure and every board body plus the ghosts, Shell vs Cap, the frozen printed-shell volume, then the named gaps inchecks.GAPS. Designed-in interference (the pins gripping the standoffs) is listed inchecks.EXPECTEDand prints asexpected. Done when it printschecks PASS. OnCLASH/TIGHT, fix the geometry and rebuild. Loosen a gap limit only when the user agrees. - Look. Take at least one exterior view and one section:
- Exterior:
wslib.view(eye=(-90, 160, 60), target=(0, -20, 0), up=(0, 0, 1)), then the MCPscreenshotquery withdirection: "current", 1000×900. - Section:
wslib.section('XY')(cuts at z=0 through the USB plug) or'YZ', thenwslib.view(eye=(0, -20, 300), target=(0, -20, 0)). Callwslib.clear_sections()afterwards. - Rear/cap:
wslib.view(eye=(80, -200, 50), target=(0, -20, 0), up=(0, 0, 1)). Done when you've compared the screenshot againsttarget/and the intent of the change.
- Exterior:
Tools in wslib
bodies_of(top_component_name): root-context bodies underEnclosure,Refs, or the boardESP32-S3-TOUCH-AMOLED-1_75_ASM.clashes(A, B): overlap volumes in mm³. Uses a bbox prefilter plus temp-BRep intersection. Fusion'sanalyzeInterferencesilently returnsNoneon large body sets, so don't use it.min_distance(a, b): gap in mm.bbox_mm(entity).set_visible('Refs', False)hides the ghosts for clean screenshots. Always hide them before judging whether an opening is clear. Fusion draws the 40%-opacity ghosts over opaque faces, and in perspective a ghost sitting in a bore (e.g.UsbBarrelGhost) looks shifted and as if it blocks the hole. To check a bore, look straight down its axis with an orthographic camera, or test points withbody.pointContainment.
To inspect a feature that isn't on an origin plane (e.g. the snap fingers at 45°), add a temporary construction
plane with constructionPlanes.createInput().setByAngle(root.yConstructionAxis, '<angle> deg', root.xYConstructionPlane),
section on it, zoom with camera.setExtents(w_cm, h_cm), then delete the plane and the section.
To add a permanent clearance requirement (a new bought part, a cable path), add a ghost in enclosure.build_refs
and a row in checks.GAPS, so every later build checks it.