circuit-json-to-gerber
Convert a Circuit JSON to Gerber/Excellon files.
Installation
npm install -g circuit-json-to-gerber
CLI Usage
Convert a circuit JSON file to Gerber/Excellon files:
circuit-to-gerber input.circuit.json
circuit-to-gerber input.circuit.json -o output.zip
The output ZIP file will contain:
- Gerber files (*.gbr) for each layer
- Plated drill file (plated.drl)
- Unplated drill file (unplated.drl)
Library Usage
import {
convertSoupToGerberCommands,
stringifyGerberCommandLayers,
} from "circuit-json-to-gerber"
import {
convertSoupToExcellonDrillCommands,
stringifyExcellonDrill,
} from "circuit-json-to-gerber"
const gerberCommands = convertSoupToGerberCommands(circuitJson)
const gerberOutput = stringifyGerberCommandLayers(gerberCommands)
const platedDrillCommands = convertSoupToExcellonDrillCommands({
circuitJson,
is_plated: true,
})
const unplatedDrillCommands = convertSoupToExcellonDrillCommands({
circuitJson,
is_plated: false,
})
const platedDrillOutput = stringifyExcellonDrill(platedDrillCommands)
const unplatedDrillOutput = stringifyExcellonDrill(unplatedDrillCommands)
References