imrishabh18/rp2040-motor-controller

Bottom-side PCB silkscreen artwork implementing mirrored tsCircuit logos as embedded SVG paths, with via-clearance-aware placement and no active electronics.

Version
1.0.57
License
unset
Stars
5

scripts/capture-pg-routing.tsx

import { Circuit } from 'tscircuit';
import Board from '../index.circuit';
const circuit = new Circuit({ platform: { schematicDisabled: true } });
const algorithm = async (input: unknown) => {
  await Bun.write('dist/pg-sense/routing-input.json', JSON.stringify(input, null, 2));
  const handlers = new Map<string, Function>();
  return { on(n: string, f: Function) { handlers.set(n, f); }, stop() {}, start() { handlers.get('complete')?.({ traces: [] }); } };
};
circuit.add(<Board routingAlgorithm={algorithm as any} finalizeGroundPours={false} />);
await circuit.renderUntilSettled();
const json = circuit.getCircuitJson();
await Bun.write('dist/pg-sense/unrouted.json', JSON.stringify(json, null, 2));
console.log(JSON.stringify(json.filter(e => e.type.endsWith('_error')), null, 2));