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-display-body.py

"""Preserve physical AMOLED envelope; omit nonphysical demonstration artwork."""
from pathlib import Path
import trimesh,numpy as np,base64,json,hashlib
root=Path(__file__).resolve().parent.parent
s=trimesh.load(root/'mechanical/original-display.glb',force='scene');out=trimesh.Scene();removed=[]
for node in s.graph.nodes_geometry:
 T,k=s.graph[node];m=s.geometry[k].copy();m.apply_transform(T)
 if node.startswith('Heart-rate demo active area palette '):removed.append(node);continue
 out.add_geometry(m,geom_name=node,node_name=node)
assert len(removed)==24 and len(out.geometry)==1
physical=next(iter(out.geometry.values()));assert abs(physical.bounds[1,2]-5.08)<1e-6
b=out.export(file_type='glb');(root/'mechanical/assembly-display.glb').write_bytes(b)
(root/'mechanical/display.ts').write_text('export default "data:model/gltf-binary;base64,'+base64.b64encode(b).decode()+'"\n')
r={'status':'PASS','version':'0.2.7','removedDecorativeDemoPaletteMeshes':removed,'physicalDisplayMeshesPreserved':1,'physicalBodyVerticesAndFacesUnchanged':True,'physicalBoundsMM':out.bounds.tolist(),'sourceSha256':hashlib.sha256((root/'mechanical/original-display.glb').read_bytes()).hexdigest(),'displayBodySha256':hashlib.sha256(b).hexdigest(),'reason':'Clamping demonstration artwork to the glass created coplanar faces in the live viewer. The manufacturing envelope renders as a clean screen-off display; the original model and its demonstration artwork remain preserved separately.'}
(root/'reports/display-body.json').write_text(json.dumps(r,indent=2)+'\n');print(json.dumps({k:v for k,v in r.items() if k!='removedDecorativeDemoPaletteMeshes'},indent=2))