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/publish-display-up-preview.mjs

import fs from 'node:fs'
import crypto from 'node:crypto'
import {gunzipSync} from 'node:zlib'
const sha=b=>crypto.createHash('sha256').update(b).digest('hex')
export function publishDisplayUpPreview(){
 const source='preview/display-up'
 const proof=JSON.parse(fs.readFileSync(`${source}/rotation-verification.json`,'utf8'))
 if(proof.status!=='PASS'||!proof.meshBuffersByteIdentical)throw Error('Unverified whole-model rotation')
 for(const [file,entry]of Object.entries(proof.manufacturingFiles)){
  if(file.startsWith('dist/'))continue // Cloud builds have fresh instance IDs.
  if(!entry.unchanged||sha(fs.readFileSync(file))!==entry.sha256)throw Error(`Manufacturing source changed: ${file}`)
 }
 if(fs.existsSync(`${source}/smartwatch-display-up.glb`)&&sha(fs.readFileSync(`${source}/smartwatch-display-up.glb`))!==proof.exportSha256)throw Error('Display-up model changed')
 if(sha(gunzipSync(fs.readFileSync(`${source}/smartwatch-display-up.glb.gz`)))!==proof.exportSha256)throw Error('Compressed transport changed the model')
 fs.mkdirSync('dist',{recursive:true})
 fs.rmSync('dist/smartwatch-display-up.glb',{force:true})
 for(const file of ['display-up.html','smartwatch-display-up.glb.gz','rotation-verification.json'])fs.copyFileSync(`${source}/${file}`,`dist/${file}`)
 console.log('Published complete display-up 3D viewer; native manufacturing files unchanged')
}