A TypeScript library for converting circuit descriptions (soup) to SVG representations.
This library provides functionality to convert circuit descriptions, referred to as "soup", into SVG (Scalable Vector Graphics) representations. It supports both schematic and PCB (Printed Circuit Board) layouts.
- Convert schematic circuit descriptions to SVG
- Convert PCB layouts to SVG
- Support for various circuit elements:
- Components
- Traces
- Text labels
- Net labels
- PCB boards
- PCB components
- PCB traces
- PCB holes and pads
npm install circuit-to-svg
import { convertCircuitJsonToSchematicSvg, convertCircuitJsonToPcbSvg } from 'circuit-to-svg';
// For schematic circuits
const schematicCircuitJson = [...]; // Your schematic circuit description
const schematicSvg = convertCircuitJsonToSchematicSvg(schematicCircuitJson);
// For PCB layouts
const pcbCircuitJson = [...]; // Your PCB layout description
const pcbSvg = convertCircuitJsonToPcbSvg(pcbCircuitJson);
Converts a schematic circuit description to an SVG string.
Converts a PCB layout description to an SVG string.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.