Giter Site home page Giter Site logo

kicad-diff's Introduction

KiCad-Diff

This is a python program with a Tk interface for comparing KiCad PCB revisions.

The diffing strategy has been changed for this version and SVGs are generated directly rather than doing renderings in ImageMagick as in previous versions. This has made the rendering possible for all layers in a few seconds (compared to 20-60s+ depending on resolution and number of layers selected in previous version). The SVG images are layered together with a different feColorMatrix filter applied to each diff. This highlights areas where features have been added or removed.

The output is presented as a gallery of images of each layer. Each layer pair can be compared and the combined view highlights clearly where the layers differ from each other.

The diff output can be scrolled and zoomed in and out for closer inspection. The pair of 'before and after' views will also pan and zoom together. I have looked at linking all three windows together but this makes for a very confusing and unsatisfactory effect.

Instructions

Dependencies

  • Ensure that you have Python3 installed. Why? https://www.pythonclock.org
  • Python Libraries from Kicad 5.*
  • For python dependencies check the requitements.txt

To install KiCad-Diff dependencies:

cd KiCad-Diff
pip3 install -r requirements.txt

Usage

Make sure you have SCMs (Git, Fossil and/or SVN) available throught the PATH variable. Add the script path to your PATH too so the kidiff and kiplotpcb will be available. This can be done easely with:

cd KiCad-Diff
source env.sh

The terminal should give you some useful information on progress. Please include a copy of the terminal output if you have any issues.

Comandline help

โžœ ./kidiff -h
usage: kidiff [-h] [-a COMMIT1] [-b COMMIT2] [-g] [-s SCM] [-d DISPLAY] [-p PORT] [-w] [-v] [PCB_PATH]

Kicad PCB visual diffs.

positional arguments:
  PCB_PATH              Kicad PCB path

optional arguments:
  -h, --help            show this help message and exit
  -a COMMIT1, --commit1 COMMIT1
                        Commit 1
  -b COMMIT2, --commit2 COMMIT2
                        Commit 2
  -g, --gui             Use gui
  -s SCM, --scm SCM     Select SCM (git, svn, fossil)
  -d DISPLAY, --display DISPLAY
                        Set DISPLAY value, default :1.0
  -p PORT, --port PORT  Set webserver port
  -w, --webserver-disable
                        Does not execute webserver (just generate images)
  -v, --verbose         Increase verbosity (-vvv)

Usage example

# Forcing an specific SCM when both are available (Precedence: Git > Fossil > SVN)
kidiff ../scms-samples/led-board-git-fossil/led_test.kicad_pcb --scm fossil

# With a Git repo
kidiff ../scms-samples/led-board-git/led_test.kicad_pcb             

# With a Git repo, passing Commit 1 and 2 on the command line
kidiff ../scms-samples/led-board-svn/led_test.kicad_pcb -a r1 -b r3

Debugging

There should be some output in the launch terminal. Please copy this and include it in any issues posted. If the program is not working, please check that you can run the plotPCB.py routine directly by invoking it from the command line and passing it two arguments (1) The name of a *.kicad_pcb file and (2) a test directory for the plots to end up in;

plotPCB.py board.kicad_pcb output_folder

Screenshots

GUI

gui

Main View

main1

main2

Overlaped Diff

fab layer diff

Side-by-Side View

fab layer side by side

F_Cu Layer

Cu difference view

F_Cu Layer 3 Pane View

Cu layer - 3 pane view

Attributes Diff

Text Diff

kicad-diff's People

Contributors

ajwahab avatar chuckwagoncomputing avatar gasman2014 avatar jnavila avatar leoheck avatar sunwukonga 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.