Giter Club home page Giter Club logo

kiff's Introduction

Kiff, the Kicad diff

Graphically compare layout changes between two git versions of a PCB.

If -c is not given, compares the local working copy against the latest version on git. This is useful to verify board changes before committing them.

If a git commit-id is given in -c, will compare the local version against this commit. This is useful to compare changes between 2 commits.

A useful shortcut for the commit-id is HEAD~1, which means the previous one.

Elements which have been added in the local version are colored green, removed ones red. Note that this may look inverted for features on copper fills.

Requires

  • poppler-utils to convert the Kicad .pdf plots to bitmaps
  • python-pil and python-numpy for image manipulations
  • kiff.py needs to be in your path

Tested to work with Python 2 and 3. To enable scripting with Python 3, Kicad needs to be compiled with -DKICAD_SCRIPTING_PYTHON3=TRUE.

Usage example

Compare the current version against the one from 3 commits ago:

$ cd <kicad_project>
$ kiff.py my_pcb.kicad_pcb -c HEAD~3

This will generate diffs/<layer_name>.png for each layer.

diff example

It works by using plot_layers.py to make Kicad plot each layer of each version as .pdf into 2 temporary directories. Then pdftoppm is called to crop the pdfs and convert them to bitmap. Bitmap data is read by PIL over stdin and the diff image is created in python using numpy arrays.

kiff's People

Contributors

michael-betz avatar ldoolitt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.