abse/gameboy-advance

Validates and exports a four-layer Game Boy–style PCB assembly with RP2350 MCU, 32MB flash, USB-C, LCD and speaker connectors, battery buck-boost power, buttons, and verified routing, connectivity, clearances, CAD models, and physical DRC.

Version
0.0.39
License
unset
Stars
0

checks/route-transition-check.ts

PCBPCB preview for checks/route-transition-check.ts
SchematicSchematic preview for checks/route-transition-check.ts
import {readFileSync} from 'node:fs'
import {checkTracesAreContiguous} from '@tscircuit/checks'
const c=JSON.parse(readFileSync('converted-circuit.json','utf8'))
for(const t of c.filter((x:any)=>x.type==='pcb_trace'))for(const q of t.route)if(q.route_type==='via'){q.from_layer='top';q.to_layer='bottom'}
const r=await checkTracesAreContiguous(c);console.log(r.length,JSON.stringify(r.slice(0,2)))