Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pcb-export

pcb export schematic — writes a hierarchical KiCad 9/10 schematic for a Zener board.

curl -fsSL https://raw.githubusercontent.com/AlecDusheck/pcb-export/main/install.sh | sh
pcb export schematic board.zen --check

pcb forwards unknown subcommands to pcb-<name> on PATH, so this needs no fork.

The installer takes the latest release for your platform, puts it in ~/.local/bin, and clears the macOS quarantine attribute — the binaries are unsigned, and Gatekeeper otherwise refuses to run them. PCB_EXPORT_BIN_DIR and PCB_EXPORT_VERSION override the directory and the tag — through a pipe they belong on the sh, not on the curl, and a directory you do not own needs sudo there too:

curl -fsSL https://raw.githubusercontent.com/AlecDusheck/pcb-export/main/install.sh \
  | PCB_EXPORT_BIN_DIR=~/bin sh

Prebuilt binaries cover Apple silicon macOS, x86-64 Linux and x86-64 Windows; anywhere else, build from source:

cargo install --git https://github.com/AlecDusheck/pcb-export
Flag
-o, --out <DIR> output directory, default schematic/ beside the entrypoint
--netlist <FILE> read a pcb build --netlist JSON instead of evaluating the design
--flatten <N> draw modules of at most N components on their parent's sheet (default 1)
--labels-only global label on power nets instead of a flag symbol
--show <FIELD> draw a component field under its value; repeatable
--check re-derive the netlist with kicad-cli and diff it against the design

One sheet per module, one symbol per component, and a global label, power flag or no-connect on every pin. No wires: a label anchored on a bare pin connects in KiCad without one, and Zener net names are already unique across a design, so nothing needs sheet pins or junctions.

Every component carries Footprint, Datasheet, Description, Manufacturer and Mpn as hidden fields. --show promotes one to drawn text, stacked under the value in the order the flags are given:

pcb export schematic board.zen --show Description --show Mpn

The name is matched case-insensitively, and a name nothing carries is reported rather than silently dropped. Drawn text is collapsed to one line and cut at 48 characters — a vendor description runs to a couple of hundred, which is wider than an A2 sheet — and a field is skipped where it only repeats the reference or the value, which is how most passives store their description.

--check is the point of the tool. It exports a netlist from the generated schematic and asserts KiCad reads back the same net-to-pin partition the design declares, which turns the schematic from a drawing into evidence. It needs kicad-cli on PATH; generating does not.

About

Export schematics from Diode Computers PCB tooling

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages