Auto-Generated Diagrams
SpiceBook can generate a schematic diagram from any SPICE cell. Click the Schematic button in the cell toolbar, and the backend parses the netlist into a circuit diagram rendered as an inline SVG.
How It Works
Section titled “How It Works”The schematic generator:
- Parses the netlist to identify components (resistors, capacitors, inductors, voltage sources, current sources) and their node connections
- Determines layout by walking the circuit graph and positioning components to minimize wire crossings
- Renders SVG with standard electrical engineering symbols — IEEE zigzag for resistors, parallel plates for capacitors, coil for inductors, ± symbols for sources
- Labels components with their reference designator (
R1,C1,V1) and value
The result is a clean, readable diagram that matches what you’d draw by hand.
Supported Components
Section titled “Supported Components”| Component | Netlist Prefix | Symbol |
|---|---|---|
| Resistor | R | IEEE zigzag (with optional color bands) |
| Capacitor | C | Parallel plates |
| Inductor | L | Coil |
| Voltage source | V | Circle with ± |
| Current source | I | Circle with arrow |
| Ground | node 0 | Standard ground symbol |
Component Map
Section titled “Component Map”The schematic endpoint returns a component_map alongside the SVG, listing each component and its type:
{ "svg": "<svg ...>...</svg>", "success": true, "component_map": { "R1": "resistor", "V1": "voltage_source", "C1": "capacitor" }}This is useful for programmatic tools that need to know what’s in the circuit without parsing the SVG.
API Access
Section titled “API Access”Generate schematics programmatically:
curl -X POST https://spicebook.warehack.ing/api/notebooks/{id}/cells/{cell_id}/schematicThe cell must be type spice. No request body is needed — the cell’s source netlist is used directly. See the Waveforms & Schematics API reference for the full response format.