abse/museair-usb
USB-C–powered ESP32-C3 controller board with AP63203 buck conversion, AP2112K 3.3V regulation, I²C SEN62 sensor interface, status LED, buttons, UART/I²C headers, and extensive decoupling.
- Version
- 0.5.7
- License
- unset
- Stars
- 0
mechanical/NATIVE-ASSEMBLY.md
# Native MuseAir board and assembly
`index.circuit.tsx` remains the real electrical/PCB source. `assembly.circuit.tsx` imports that same `Board` and adds native `assembly.part` siblings for the sensor, holder, fasteners, cables, display, speaker, button and enclosure. No exported PCB GLTF/GLB is used by this assembly. The default project 3D preview and standalone site select the assembly; PCB and schematic data remain the reviewed real circuit.
The main board retains its 65 imported PCB component CAD models and actual board substrate/copper/artwork. The assembly suppresses only U3's separate bare-board sensor/holder presentation through `sensorCadEnabled={false}` and adds the current sensor and holder exactly once as mechanical parts. The bare circuit keeps its original U3 CAD by default. Mechanical parts create no PCB footprints or pads and do not enter the PCB placement list.
## Coordinates and visibility
The real PCB keeps its original electrical coordinate system. Existing mechanical geometry is transformed by the inverse of its former PCB pose: rotation Z=-90 degrees, then translation (0, 2.5, -37.8) mm. Part dimensions and relative fit are unchanged. `REMOVABLE_TOP_LID`, `ENCLOSURE_BASE`, `ASK_BUTTON_CAP` and other parts remain independently hideable by the viewer's context menu.
## Reproducible build and fabrication protection
The pinned native SDK is tscircuit 0.0.2834. `bun run build` and the hosted `buildCommand` execute `scripts/hosted-build.mjs`. The build evaluates both source entrypoints with routing temporarily disabled, then `compose-native-assembly.mjs` checks exact pads, holes, source trace connectivity and component positions against `routing/reviewed-index.json`. That file is the already-reviewed real circuit JSON, including all PCB records, imported CAD, traces, vias and pours—not a mesh export.
A SHA-256 manifest binds every electrical component/import/model source and the reviewed circuit. Reusing reviewed copper after a source change fails the build. The final bare-board circuit JSON remains byte-equivalent as parsed data to the previous reviewed circuit; the assembly uses the same circuit records, omits only the duplicate U3 CAD record, and appends mechanical source/CAD records under distinct IDs. Temporary unrouted SDK diagnostics are not promoted as fabrication artifacts; the final circuit is the unchanged reviewed circuit. A new electrical revision requires a fresh routing/fabrication review and a deliberate checkpoint/manifest update.
Small content-addressed mechanical GLBs are published separately for efficient loading. They are not PCB geometry snapshots. The site browser runtime is pinned to the tested SDK rather than floating to a newer CDN release.
The assembly change does not resolve previously documented physical qualification items: full factory speaker-lead routing, exact sensor harness procurement, snap-fit tolerances/strength, seals and real hardware fit. No physical assembly, airflow, thermal or RF test is implied by successful CAD rendering.