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/render-system.tsx

import { mkdirSync, writeFileSync } from "node:fs";
import { convertCircuitJsonToSystemSvg } from "circuit-to-system-svg";
import { Circuit } from "tscircuit";
import { MotorControllerSystemDiagram } from "../schematic/MotorControllerSystemDiagram";

const circuit = new Circuit();
circuit.add(<MotorControllerSystemDiagram />);
await circuit.renderUntilSettled();

mkdirSync("dist/index", { recursive: true });
writeFileSync("dist/index/system.svg", convertCircuitJsonToSystemSvg(circuit.getCircuitJson()));