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.41
- License
- unset
- Stars
- 5
scripts/render-revision-pcb.ts
import { Resvg } from "@resvg/resvg-js";
import { convertCircuitJsonToPcbSvg } from "circuit-to-svg";
const dir = process.argv[2] ?? "dist/placement";
const json = await Bun.file(`${dir}/circuit.json`).json();
for (const layer of ["top","bottom"] as const) {
const svg = convertCircuitJsonToPcbSvg(json,{layer,width:1600,height:1600});
await Bun.write(`${dir}/${layer}.svg`,svg);
await Bun.write(`${dir}/${layer}.png`,new Resvg(svg).render().asPng());
}