-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCH/KICAD_PCB difference tools from kicad-tools #14
Comments
Hi @mdeweerd ! I completely fogot about it. The worst part is that the PCB part is already solved since may 2020. I already adapted @obra's idea in the KiCad PCB diff project. This tool is much better than calling KiAuto because it uses the Python API to plot the layers. It also implements a cache, very useful to avoid regenerating the files over and over when comparing using git. Today I adapted it to support KiCad 6 and I'm adding it to the kicad_auto image. |
Ok, and now it supports SCH files using KiAuto. |
Great! |
Hi @mdeweerd ! Notes:
|
I'ld love to start testing it but I still have too many other things to do. |
I updated the schematic and pcb difference tools from kicad-tools, where the maintainer indicated that he'ld be happy to see all functionnality implemented on top of KiBot and archive kicad-tools.
These scripts work in my setup if they are locally present in my repository.
Before going any further, I propose that we discuss how this could go into KiAuto (and later Kibot).
This is from the README_diffscripts.md:
Requirements:
Script that runs a command (parameters) in Docker image "setsoft/kicad_auto:dev"
TODO: change this call in the scripts (environment variable/...)
How this works:
setup_git.sh
Set up git repository so that git diff on *.kicad_pcb and *.sch calls the relevant scripts.
This script currently expects those scripts to be in the project directory.
git-diff-sch-local.sh
git diff *.kicad_sch"
, receives the git parameters.git-diff-sch.sh
in docker container.schematic-diff.sh
gen-schematic-img.sh
to generate the images for a schematic version.gen-schematic-img.sh
Generate images for a schematic
git-diff-pcb-local.sh
git diff *.kicad_sch"
, receives the git parameters.git-diff-pcb.sh
in docker container.pcb-diff.sh
gen-pcb-img.sh
to generate the images for a pcb version.gen-schematic-img.sh
Generate images for a pcb.
The list of layers is fixed in the script. Should be a configuration setting (environment variable/...).
Other thoughts:
The "difference" images are using a "stereo" method where the output is black if both sides are the same and red or magenta otherwise.
That is an interesting output, but it would also be interesting to generate a real difference file where the average sum of pixel values helps determine the differencE.
For the schematic difference, there is the "issue" of local schematic components. I guess that the methods already used for kibot/kiauto could improve that.
This could evolve to be cable to compare a current version to some golden version (precomputed images), usefull for kibot runs (preflight) to ensure nothing changed compared to the golden output by putting an upper limit on the pixel differences.
Temporary locations and cleanup needs improvement.
Possibly exporting to SVG and converting to PNG from SVG might avoid the requirement to install ghostscript if the output is good enough.
Could be transformed to "python" scripts (still using imagick tools).
The text was updated successfully, but these errors were encountered: