PCBmodE /

Filename Size Date modified Message
22 B
9.9 KB
6.1 KB
0 B
10.0 KB
2.3 KB


A PCB design tool written in Python around json, SVG, and Inkscape


PCBmodE reads shape and placement information stored in json files to produce an SVG graphical representation of them. Routing is drawn with Inkscape, then extracted by PCBmodE and stored in an input json file that's used for the next board generation. A post-processor 'gerberises' the SVGs into "Extended Gerbers" (RS-274X) for manufacturing. PCBmodE uses the Inkscape XML namespace for layer information so that when viewed with Inkscape individual layers (copper, soldermask, silkscreen, etc.) can be shown or hidden. If no layer information is needed, any SVG viewer, such as a browser, can show the board.


PCBmodE was motivated by:

  • the desire to easily create arbitrary shapes on all PCB layers;
  • the need for version controlled primary source files written in open, free, and standardised formats;
  • the frustration with purpose-build GUI particularities, and the inability to easily define feature shapes and location in a precise manner; and finally,
  • my desire to create functional and artistic PCBs, not possible with any other software.

In the long term, PCBmodE will hopefully motivate:

  • an open, comprehensive, community-based repository of electronic components; and
  • a netlist-based design tool, from which both layout and schematics are generated (in contrast to existing development flows).


The project is in its very early stages, and won't yet be practically useful to most. As a proof-of-concept, PCBmodE highlights where it and other EDA tools can go using open and modern tools and development methodologies.

The goal for v1.0 was to be able to send a board for manufacturing. For that reason, the code wasn't written for performance, and is not the prettiest. These aspects of the project will improve as the software is packaged properly and the structure solidifies. Documentation is practically non-existent, and will be added as the software matures.


The 'mod' in PCBmodE has a double meaning. The first reflects my vision for PCBmodE to be 'modern' tool, in contrast to the tired ol' EDA tools we have today; the second is a play on the familiar 'modifications' or 'mods' we make to PCBs. The original codename was 'PCBmod', but that was taken, so I changed it to PCBmodE. Call it 'PCB mode' or 'PCB mod E', whichever you prefer.


For a list of available commands, use

python --help

Use the pieceof example project that's included in the repository to learn about the structure of the project until proper documentation exists. To 'compile' the board and generate Gerbers, use

python --board-name pieceof --make-board --gerberise

or in short form

python -b pieceof -m -g

PCBmodE can also generate PNGs of the board and its layers if Inkscape is installed. Use the -p or --make-pngs commands for that.

Routing and vias

PCBmodE does not currently have a netlist or a router, so routes must be drawn by hand with Inkscape. Until there's a PCBmodE plugin for Inkscape that would make routing and via placement more convenient, the following is the best interaction model I could come up with. It's a bit clunky, but it's good enough for now.


Once an SVG board with parts placed is generated, load it with Inkscape and press CTRL+SHIFT+L to open the layers pane. Expand the desired routing layer, and choose copper and then routing. (For example, for routing layer top, the top->copper->routing layer needs to be chosen.) Whichever path is drawn on this layer will be considered routing by the software -- the colour doesn't matter -- but it needs to be a filled SVG path (with the exclusion of arcs, as 'a' or 'A' path commands are not yet supported).

When routing is done, save the file and run PCBmodE, with the --extract-routing or -r commands:

python -b <board name> --extract-routing

Then regenerate the board with

python --b <board name> --make-board

Or alternatively, do it in a single command:

python -b <board name> -r -m

Then reopen the SVG in Inkscape or press ALT+F, V then to refresh. It's possible to add or modify routes and repeat the process.

I recommend to experiment with this process before doing a lot of routing, so the work isn't lost, as the files are overwritten with each iteration! Use revision control to check-in the routing file often.


In PCBmodE, vias are defined just like any other component, so any shape of pads, soldermask, silkscreen, etc are possible (drills need to be round, though multiple ones can be defined). In the parts library, create any type of via that's needed -- the name of the file is what is used as the via's identifier (for example, VIA.json)

To add a via, choose the top routing layer as above. Then choose the pencil tool (or press F6), go to via's location and click CTRL+LEFT-CLICK. This will place a dot of a particular diameter -- the size of the dot does not matter, only its centre. Right click on the dot and choose 'Object Properties', and in the Label field enter via: plus the via's identifier. So if the via file is called VIA.json, enter via:VIA. If the board's configuration file has a vias entry to define a default via,

  "default_via": "VIA"

then via: or via:default will instantiate that via type. This way you can use any number of types of vias on your board.

Now run the routing extraction and make commands as above, and a via will be placed where the dot was. To move or delete a via, simply move or delete the via's drill; there's no need to move or delete any other of the via's feature on any other layer. Remember to save, extract, and regenerate, though.


Contact or get updates at and @boldport.


PCBmodE is distributed under the Apache License Version 2.0