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.22
- License
- unset
- Stars
- 0
scripts/build-final.tsx
import fs from 'node:fs'
import React from 'react'
import {Circuit} from 'tscircuit'
import Board from '../index'
const output=process.argv[2]??'dist/final'
const circuit=new Circuit()
circuit.add(<Board bendAngle={process.argv[3]==='flat'?0:-180}/>)
await circuit.renderUntilSettled()
fs.mkdirSync(output,{recursive:true})
const json=circuit.getCircuitJson(),errors=json.filter((e:any)=>e.type.includes('error'))
fs.writeFileSync(`${output}/circuit.json`,JSON.stringify(json,null,2))
fs.writeFileSync(`${output}/errors.json`,JSON.stringify(errors,null,2))
console.log('Project entry replay:',json.filter((e:any)=>e.type==='pcb_trace').length,'traces;',errors.length,'native errors')
if(errors.length)process.exitCode=1