This is a repository to hold example and utility code for scripting within kicad (currently limited to pcbnew)
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
basics another assumption in basics.py. check to see that U1 is actually there. Feb 16, 2017
dxf_stuff added checks to see if needed pythoon libraries are installed. Aug 28, 2018
gen_border restructured __init__ files to plugins are created in each directory Mar 30, 2018
gensvg Fix bug report Nov 15, 2017
instantiate_footprint restructured __init__ files to plugins are created in each directory Mar 30, 2018
menus_and_buttons LAYER_ID_COUNT -> PCB_LAYER_ID_COUNT May 22, 2017
place_by_sch fixed missing orientation error in place by schematic Aug 24, 2018
plantuml fixed up gen_boarder to do power and gnd instead of clk. Feb 15, 2017
python_usage_tracker added kicad_python_usage tracker, removed power ratsnest Sep 7, 2018
ratnest atnest - toggle power ratnets May 4, 2018
replicatelayout minor fix in replicate. zone code doesn't want floats. Dec 22, 2017
save_config added mounting hole plugin. mostly this required updates to the dialo… May 8, 2018
simpledialog added mounting hole plugin. mostly this required updates to the dialo… May 8, 2018
simplegui fixed up gen_boarder to do power and gnd instead of clk. Feb 15, 2017
svg2border fix a couple issues reported by https://github.com/TomWS1 Aug 30, 2018
toggle_visibility added kicad_python_usage tracker, removed power ratsnest Sep 7, 2018
utils some fixes to via fill May 11, 2018
zonebug added reproduce code for zone bug Mar 21, 2017
.gitignore added basics and plantuml spec Jan 30, 2017
LICENSE Initial commit Jan 30, 2017
README.md added checks to see if needed pythoon libraries are installed. Aug 28, 2018
__init__.py added kicad_python_usage tracker, removed power ratsnest Sep 7, 2018

README.md

kicad_mmccoo

Kicad's pcbnew has a built in python engine for automating tasks. Unfortunately, this scripting interface is not documented anywhere that I've been able to find.

This is a repository to hold example and utility code in the hopes that others can learn to write their own scripts.

I have a companion blog

If you get nothing else out of this repository, take a look at this UML diagram. It doesn't contain all available APIs; just the ones needed to do common tasks (the spec from which it was generated is in the plantuml subdirectory)

UML

plugins

This repo also contains a bunch of plugins, a description of which can be found in this youtube vide:

YouTube video about the plugins

plugin install

For linux... create a directory in your homedir called .kicad_plugins Inside of that directory either clone this repo or link to a clone of it.

additional python packages are needed

# To get the dxf related plugins to work on linux systems, you'll need something like this:
# Make sure pip is available
sudo python2.7 -m ensurepip --default-pip
#  or
sudo apt install python-pip

# then these 
sudo pip2 install --upgrade pip
sudo pip2 install dxfgrabber
sudo pip2 install numpy
sudo pip2 install scipy
sudo pip2 install shapely