fxkr / eagle-diff Goto Github PK
View Code? Open in Web Editor NEWShow differences between Cadsoft Eagle PCB layouts
License: BSD 3-Clause "New" or "Revised" License
Show differences between Cadsoft Eagle PCB layouts
License: BSD 3-Clause "New" or "Revised" License
Hi
First of all thanks for the project. It's awesome.
After finding #5 I've quickly configured it to do a diff of my last changes. But one thing is bothering me as during image export Eagle shows me a bunch of "Unknown layer: X" messages. The unknown layers are: 2, 3, 14, 15, 2, 3, 14, 15 for each file opened - this is the order of error messages. I don't have the layers on my project and I've never had as I'm working with the Eagle's defaults. Is there a way to exclude some layers from the diff without modyfying the python script? I've seen the LAYER_NAMES dict in the script.
I'm working on OSX 10.9, Eagle 6.6.0.
PB
There's already --eagle
to handle cases where eagle isn't called 'eagle', but we in cases where passing --eagle
would have been necessary there is no useful error message:
Traceback (most recent call last):
File "./eagle-diff", line 256, in <module>
main(sys.argv)
File "./eagle-diff", line 243, in main
run(args.file1, args.file2, temp_dir, args.output, args.dpi, args.eagle)
File "./eagle-diff", line 123, in run
subprocess.call([eagle, "-C", ";".join(flat + ["quit"]), file])
File "/usr/lib64/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib64/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Hello,
I've been trying out eagle-diff on Eagle 8.6.3 using on Xubuntu 16.04 (Xubuntu 16.04 Vagrant box) and experienced a funny issue.
I've used https://github.com/fxkr/eagle-diff/blob/master/test/diff-test.sh script and it runs correctly, first generates the schematic diff but when it comes to generating the brd it throws a bunch of popups about missing layers and that "RATNEST" and "RIPUP" commands can be only executed in design view. The thing is that what I see on screen is the correct window on top which is the board view.
After clicking through all of the popup windows I end up with diffs from schematic named as both sheet-*
and layer-*
diffs. Apparently Eagle doesn't use the proper context for exporting images but I'm not sure how to change that. Not really an expert on Eagle scripting and couldn't find a reference on it.
Did someone by chance experience a similar thing or know a way to fix it?
Maybe even with Github integration. Could be very useful.
Though I'll have to think about legal issues. But Cadsoft has made provisions for fabs and the like, so it shouldn't be a problem.
Command line switches won't cut it much longer.
Thanks for writing this utility, it is really useful. I found an issue in that I had Eagle defaulting to a white palette, in which case the diff doesn't work. The following patch forces the palette to black before generating the images
diff --git a/eagle-diff b/eagle-diff
index 3a74474..74a5385 100755
--- a/eagle-diff
+++ b/eagle-diff
@@ -62,6 +62,7 @@ class View(object):
def get_commands(self, directory, index, available_layers):
commands = [
+ "set palette black",
"disp none " + " ".join(str(LAYER_NUMBERS[layer]) for layer in self.layers if layer.lower() in available_layers),
"rats;" if self.rats else "rip @;",
"export image %s %i" % (self.get_path(directory, index), self.dpi),
Unfortunately, it seems that we can't set parameters for eagle-diff-git in .gitconfig. Check if that's really the case. If it isn't, maybe implement command line options for eagle-diff-git?
Maybe we should implement config file support for eagle-diff??
Sometimes, the red/green diff views can be really confusing.
There should be a view in which all changes (both additions + deletions) are painted yellow. Maybe in a semitransparent yellow. And maybe the yellow should be a little bit larger than the changes, and with blurry edges. Of course it should all be configurable.
Depends on #6 obviously.
Shouldn't be too hard since we know the DPI anyway.
Currently image alignment is done graphically by determining a bounding box on the dimension layer.
However, it might be possible to have the user specify a component, get that components position from the XML data and align by that. The hard part is probably converting component positions to pixel coordinates (which unit? where is the origin?). Renamed components may or may not be a problem too.
This would allow useful diffs when the entire ciruit has been moved around on the board.
See #27
Dimension layer looks clean in EAGLE.
Seems to work in EAGLE 6 (I didn't test it myself though, but the contributor in that PR would have noticed).
Add some kind of frontend, because with the growing number of views it's already getting somewhat confusing.
The relations between the individual views should be integrated into the UI. For example, it should be easy to switch between old and new views, turn change hilighting (when implemented) on and off, turn red/green diff on and off, turn the background on/off, turn poly fills on/off, turn poly fill style fixing on/off, show multiple layers at once etc.
Maybe this could be done as a web UI. That might come in handy later on.
Of course there'll be the question of what to pre-render and what to render on demand.
Right now, diffing two git versions of the same file is really cumbersome (git show $rev1:./foo.brd > old.brd ; git show $rev2:./foo.brd > new.brd ; eagle-diff old.brd new.brd).
Too bad there's no easy (as in: clean one-liner) way to find a .desktop file and get the Exec=
line.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.