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-entry.tsx
import fs from 'node:fs'
import React from 'react'
import {Circuit} from 'tscircuit'
const entry=process.argv[2]??'enclosure-fit.circuit.tsx'
const output=process.argv[3]??'dist/enclosure-fit'
const {default:Entry}=await import(new URL(`../${entry}`,import.meta.url).href)
const c=new Circuit()
c.add(<Entry/>);await c.renderUntilSettled()
const json=c.getCircuitJson(),errors=json.filter((e:any)=>e.type.includes('error'))
fs.mkdirSync(output,{recursive:true})
fs.writeFileSync(`${output}/circuit.json`,JSON.stringify(json,null,2)+'\n')
fs.writeFileSync(`${output}/errors.json`,JSON.stringify(errors,null,2)+'\n')
console.log(JSON.stringify({entry,nativeErrors:errors.length,traces:json.filter((e:any)=>e.type==='pcb_trace').length}))
if(errors.length)process.exitCode=1