CLI tool
yaqwsx/PcbDraw avatar
yaqwsx/PcbDraw

PcbDraw for KiCad SVG diagrams and population manuals

Convert your KiCAD board into a nicely looking 2D drawing suitable for pinout diagrams

1,444 stars100 forksPythonMIT

At a glance

What is it?
PcbDraw converts `.kicad_pcb` files into 2D SVG board drawings, with related tooling for HTML or Markdown population manuals and programmatic 3D previews. It suits KiCad 9 and 10 users who need readable documentation assets without requiring KiCad's `pcbnew` Python module.
Who is it for?
PcbDraw is appropriate for KiCad 9 or 10 projects that publish pinout diagrams, population manuals, or CI-generated board previews. It is a poor fit for KiCad 8 and earlier, workflows that require direct `pcbnew` access, or environments without Inkscape 1 or librsvg.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 14 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

PcbDraw's KiCad documentation workflow

PcbDraw addresses a specific documentation problem: a physical board photograph does not expose its component labels clearly, while a full KiCad design is usually too detailed for a pinout page. The project reads a KiCad board from a `.kicad_pcb` file and produces a 2D drawing as SVG. That output is intended for pinout diagrams and other board documentation where component positions, references, and board geometry need to remain visible.

The intended users are KiCad project maintainers, hardware documentation writers, and teams that want to regenerate board illustrations as their designs change. The separate Populate utility targets a related job: maintaining HTML or Markdown population manuals. According to the README, PcbDraw can also obtain 3D-rendered board previews programmatically, including through CI. That feature is useful when documentation needs several kinds of board assets, although the README does not state the exact command or rendering options in its main text.

This is a document generation tool, not an editor for `.kicad_pcb` files. Its value depends on the source board already containing the references and labels that should appear in the generated drawing. The repository does not claim that PcbDraw can recover missing component data or simplify an undocumented design.

Inside the board-to-SVG processing path

The repository is a Python package named `pcbdraw`, with its implementation under `pcbdraw/` and documentation under `doc/`. The declared dependencies indicate that board data is parsed and transformed through `lxml`, while `svgpathtools` handles SVG path geometry. `Pillow` supports image operations, and `numpy` is available for numerical work. The exact internal call graph is not documented in the README, so those library roles should not be treated as a complete architecture description.

A more concrete boundary is visible in the installation requirements. PcbDraw supports KiCad 9 and 10 through the stable `kicad-cli` interface. It does not depend on KiCad's Python `pcbnew` module. This matters for automation: the repository is designed around an external command-line interface rather than importing KiCad's Python bindings. Documentation builds or CI jobs therefore need access to a compatible KiCad installation as well as the Python package.

The output path is documented clearly. Input is `.kicad_pcb`, and the main board illustration is SVG. Additional repository documentation covers `doc/pcbdraw.md`, Populate through `doc/populate.md`, library management through `doc/library.md`, and the board annotations interface through `doc/annotations.md`. The presence of an `examples/resources` directory and a `examples/readme.md` indicates that examples exist, but the repository listing does not establish which KiCad features or board constructs each example covers.

Installing pcbdraw and locating the first command

The package requires Python 3.9 or later. `setup.py` declares the runtime dependencies `numpy`, `lxml`, `mistune>=3.0`, `pybars3`, `pyyaml`, `svgpathtools==1.4.1`, `Pillow>=9.0`, and `click>=7.1`. The SVG workflow also needs either Inkscape 1 or `librsvg`, as stated in the README. The project directs users to `doc/installation.md` for fuller platform instructions rather than providing platform-specific steps in the main README.

The package exposes a console entry point named `pcbdraw`. Running the command without options reaches the CLI entry point, but the README does not include the command's required arguments or available flags. Those details must come from `doc/pcbdraw.md`; inventing a conversion flag here would be misleading.

bash
pcbdraw

The repository Makefile provides this local installation workflow. It first builds distribution files, then installs the generated wheel with `--no-deps --force`, which means package dependencies must already be available in the target environment.

bash
make package
pip3 install --no-deps --force dist/*.whl

For a first conversion, locate the documented command and file arguments in `doc/pcbdraw.md`, run it against a `.kicad_pcb` file, and inspect the resulting SVG. The README confirms SVG output but does not promise specific output filenames or command-line flags.

Populate and board annotation boundaries

Populate is the companion utility for HTML or Markdown population manuals. Its inclusion changes the scope of PcbDraw from a single-purpose board renderer into a small documentation toolchain. The repository also documents library management and a board annotations API, but the README does not reproduce their configuration formats or call signatures. Those pages are necessary to evaluate whether existing content can be reused without rewriting it.

HTML and Markdown output is especially relevant to projects that publish component lists beside a board image. However, the available documentation does not define whether Populate supports a particular Markdown dialect, how tables are ordered, or which annotation fields are mandatory. It would therefore be premature to claim that its generated manuals match a specific publishing system. An engineer should compare `doc/populate.md` and the board annotation documentation against one required manual page before selecting the workflow.

The examples can provide a starting point for understanding the intended data files. They should not be treated as a compatibility matrix. The repository listing confirms that examples and resources exist, but it does not show which KiCad symbols, footprints, custom drawings, or template conventions they exercise.

Rendering dependencies and operational limits

The clearest limitation is the supported KiCad generation. The README states that PcbDraw supports KiCad 9 and 10. It does not claim support for earlier formats or versions, so using it with an older `.kicad_pcb` file would require checking the dedicated documentation rather than assuming backward compatibility.

A second constraint is the external rendering stack. PcbDraw uses `kicad-cli` and requires Inkscape 1 or `librsvg`. This avoids a direct dependency on KiCad's `pcbnew` Python module, but it does not make the tool self-contained. A workstation needs the compatible CLI and rendering software, while a CI image must install or preserve them across runs. The README gives no container image, so teams should not assume that an existing generic CI image contains the required binaries.

There is also a format boundary. The primary documented output is SVG. The README mentions 3D-rendered previews, but it does not state their file format, renderer configuration, or fidelity guarantees. PNG or other raster output may depend on Inkscape or `librsvg`, but no such workflow should be inferred without reading `doc/pcbdraw.md`.

For organizations that need editable CAD views, manufacturing inspection data, or direct manipulation through `pcbnew`, PcbDraw is the wrong abstraction. It generates documentation graphics from a board rather than replacing the board editor.

Maintenance, releases, and MIT package handling

The repository is not archived. Its last push was on 2026-10-09, and recent releases include `v1.3.0` on 2026-08-07 and `v1.2.0` on 2026-04-12. These dates show recent project activity, but they do not by themselves establish the compatibility of every KiCad feature. Version selection should still be checked against the KiCad version and rendering tools used by the deployment environment.

The project is licensed under MIT. The `setup.py` package metadata also identifies the license as `License :: OSI Approved :: MIT License`. This permits use, modification, distribution, and sublicensing under the license's stated conditions, including preservation of its copyright and license notice. The repository's `LICENSE` file is the authoritative text, and redistribution should retain the required notice. This is a licensing note rather than legal advice.

Upgrading has a measurable dependency cost. `svgpathtools` is pinned to `1.4.1`, several other packages have minimum versions, and the rendering tools are external. A deployment should preserve those constraints and check the release-specific documentation before replacing a working environment. The Makefile's development test command runs `pytest` and `mypy`, while `setup.py` exposes a `dev` extra containing `pytest`, `types-pillow`, `types-click`, and `types-PyYAML`.

Editorial conclusion

PcbDraw is appropriate for KiCad 9 or 10 projects that publish pinout diagrams, population manuals, or CI-generated board previews. It is a poor fit for KiCad 8 and earlier, workflows that require direct `pcbnew` access, or environments without Inkscape 1 or librsvg. Before adoption, verify the conversion of one representative board, review `doc/pcbdraw.md` for the intended command and options, and confirm that your CI image can provide `kicad-cli`, Inkscape 1 or librsvg, and Python 3.9 or later.

Frequently asked questions

Which KiCad versions does PcbDraw support?

PcbDraw supports KiCad 9 and 10 and uses the stable `kicad-cli` interface. It does not depend on KiCad's Python `pcbnew` module.

What does PcbDraw need to generate an SVG?

PcbDraw requires Python 3.9 or later, a `.kicad_pcb` input, and either Inkscape 1 or `librsvg`. It also uses `kicad-cli` for its KiCad interface.

Can PcbDraw create population manuals and 3D previews?

The Populate utility can create or maintain HTML and Markdown population manuals. PcbDraw can also obtain 3D-rendered previews programmatically, including in CI, but the main README does not specify the commands or output formats for that feature.

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. Releases
  5. yaqwsx/PcbDraw on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/yaqwsx-pcbdraw.svg)](https://hysenlabs.com/projects/yaqwsx-pcbdraw)

Was this useful?