seveibar/pd-dual-stepper-controller

Bottom-side PCB silkscreen artwork consisting of embedded mirrored TS Circuit SVG logos, with via-clearance-aware lower-board placement.

Version
0.1.0
License
unset
Stars
0

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());
}