shibosoftwaredev/f1c100s-linux-nema8-stepper-controller
Restores component part numbers and CAD models, removes test-point 3D bodies, and validates that solder paste exists only on top-side SMT pads without altering copper or DRC.
- Version
- 0.3.5
- License
- unset
- Stars
- 0
work/capture-board-routes.tsx
import { Circuit } from "tscircuit"
import { writeFile } from "node:fs/promises"
import Board from "../index.circuit"
const circuit = new Circuit()
let paths: unknown
circuit.on("autorouting:end", (event: any) => {
console.log("autorouting phase", event.componentDisplayName, event.pcbTracePaths?.length,
event.pcbTracePathsUnavailableReason ?? "")
if (event.pcbTracePaths?.length >= 50 && event.pcbTracePaths?.length < 100)
paths = event.pcbTracePaths
})
circuit.add(<Board />)
await circuit.renderUntilSettled()
if (!paths) throw new Error("The board autorouting phase did not export saved paths")
await writeFile("saved-board-paths.json", `${JSON.stringify(paths, null, 2)}\n`)
console.log(`saved ${(paths as any[]).length} board routes`)
