imrishabh18/corne-keyboard
The code defines and renders two surface-mount chip components with SMT pads, silkscreen outlines, and 3D CAD models (OBJ and STEP) for PCB assembly.
- Version
- 2.0.21
- License
- unset
- Stars
- 1
scripts/finish-left-other-trace.ts
import fs from 'node:fs'
import * as C from '@tscircuit/checks'
const base=JSON.parse(fs.readFileSync('../left-clean.circuit.json','utf8'))
for(const indices of [[3,4,5,6],[2,3,4,5,6,7],[3,4,5],[4,5,6]]){
const c=structuredClone(base);const t=c.find((x:any)=>x.type==='pcb_trace'&&x.pcb_trace_id==='source_trace_2__source_trace_3_mst5_0');for(const i of indices)t.route[i].y-=.04
const e=C.dedupePcbDrcErrors([...(await C.runAllRoutingChecks(c)),...C.checkCopperToBoardEdgeClearance(c),...C.checkPcbCopperOverKeepout(c)])
console.log(indices,e.length,e.map((x:any)=>x.message));if(!e.length){fs.writeFileSync('../left-clean.circuit.json',JSON.stringify(c,null,2));fs.writeFileSync('../left-clean.errors.json','[]');break}
}