Graphical tool to help users compare gerber files, the output from EDA tools (PCB CAD software) such as KiCAD using pygerber 2.0.0.
- Install in editable format:
git clone https://github.com/ajw287/diffgerber.git
cd diffgerber
python3 -venv venv
source ./venv/bin/activate
pip install -r requirements.txt
pip install -e .
This project depends on python3, pillow, tkinter, difflib & pygerber. The following commands are recommended:
- Setup a python venv
python -m venv diffgerber source ./diffgerber/bin/activate
- Install dependencies
pip install tk pillow pygerber difflib
- Run the program:
python diffgerber.py
This is a basic tool to highlight differences in gerber files so that they can be compared. At this time two directories of gerber files can be opened, layers are matched based on filename and checked for similarity. If they are identical no differences will be expected, if there is more than 25% similarity, then a graphical "diff" is attempted.
Aug-23: Started on a V2.0 with only pygerber backend. The original 3 backends (pygerber 1.0, pcb-tools, gerbv) each had eccentricities and limitations, this meant developing and testing for each one and limited features.
-
Click "Browse" on the left-hand column, navigate to "./example/1/" click "OK". You should see two layers of gerbers
-
Click "Browse" on the right-hand column, navigate to "./example/2/" click "OK". You should see another two layers of gerbers
-
Because they have the same name, they are paired. Select a 'top.grb' file, the label will tell you that they are identical.
-
Select a 'bottom.grb' file, the label will tell you the similarity value. Can you see the difference?
-
Click the "Highlight Differences" button, the differences will be highlighted with an outliine.