abse/smartwatch-flex-top-only

Three-panel flex smartwatch with two parallel R3.9 bends, all components flat-top, low-profile JST connector harnesses, split heartbeat optical windows and screw-retained PCB mounting. Modeled 39 × 50.5 × 14.5mm prototype; 100% routing, zero native DRC and shorts. Hardware qualification pending.

Version
0.2.20
License
unset
Stars
0

scripts/prepare-mount-review.py

"""Inspection cutaway of the actual case, cradle, backing and hardware."""
from pathlib import Path
import numpy as np
import trimesh
from trimesh.visual.material import PBRMaterial

root=Path(__file__).resolve().parent.parent
scene=trimesh.Scene()
# Same native glTF axes as the full emitted watch: X mirrored, Z up -> Y up.
frame=np.array([[-1,0,0,0],[0,0,1,0],[0,1,0,0],[0,0,0,1]],float)
def add(mesh,name,color):
    mesh=mesh.copy();mesh.apply_transform(frame)
    mesh.visual=trimesh.visual.TextureVisuals(material=PBRMaterial(baseColorFactor=color,roughnessFactor=.65))
    scene.add_geometry(mesh,geom_name=name,node_name=name)
case=trimesh.load(root/'mechanical/mounted-enclosure.stl')
# The visual cut removes walls above the floor only; fabrication STL unchanged.
region=trimesh.creation.box(extents=[45,55,.82],transform=trimesh.transformations.translation_matrix([0,0,-9.01]))
floor=trimesh.boolean.intersection([case,region],engine='manifold')
add(floor,'CASE_FLOOR_CUTAWAY',[205,212,222,255])
for file,color in [('pcb-supports',[75,85,105,255]),('pcb-cradle',[65,145,170,255]),('pcb-retainers',[95,115,195,255]),('pcb-mount-screws',[185,185,190,255])]:
    s=trimesh.load(root/f'mechanical/{file}.glb',force='scene')
    for n in s.graph.nodes_geometry:
        T,k=s.graph[n];m=s.geometry[k].copy();m.apply_transform(T);add(m,n,color)
s=trimesh.load(root/'mechanical/upright-pcb.glb',force='scene')
T,k=s.graph['pcb_stiffener_0'];backing=s.geometry[k].copy();backing.apply_transform(T)
add(backing,'ACTUAL_MAIN_FR4_BACKING',[70,145,90,255])
scene.export(root/'mechanical/mount-review.glb')