mohan-bee/rc-link-breakaway-panel
A four-layer RC link panel combining an STM32/E28 2.4‑GHz transmitter with USB-RP2040 socket and an STM32/E28 receiver providing six buffered PWM servo outputs, regulated 3.3‑V power, headers, controls, and protection/decoupling.
- Version
- 0.1.5
- License
- unset
- Stars
- 0
tools/render-panel.mjs
import { readFileSync, writeFileSync } from "node:fs";
import { convertCircuitJsonToPcbSvg } from "circuit-to-svg";
import { Resvg } from "@resvg/resvg-js";
const circuit = JSON.parse(readFileSync("dist/index/circuit.json", "utf8"));
// Hide pours only in this routing illustration; fabrication retains both planes.
const svg = convertCircuitJsonToPcbSvg(circuit.filter((item) => item.type !== "pcb_copper_pour"), {
width: 1400, height: 1200, includeVersion: false, showFabricationNotes: false,
shouldDrawErrors: true, shouldDrawRatsNest: false,
});
writeFileSync("panel-routed.svg", svg);
writeFileSync("panel-routed.png", new Resvg(svg).render().asPng());