Python Forum

Full Version: Understanding GerbMerge code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have set myself a challenge of trying to understand the python code in this Open source project

https://github.com/kkunzelm/gerbmerge

The python files are in the Gerbmerge directory and the application is invoked by typing gerbmerge into a command prompt.

I am struggling to understand the overall structure and flow and how the different files play a part. As a strategy i'm going to try to understand the code in gerbmerge.py but I don't know if this is the best way to go about it.

I am a complete python newby so if anyone can help me to get an overview that would be great.Thanks.



PS Gerber and Excellon files consist of lines of ASCII text with X and Y co-ordinates and commands understood by CNC machines for printed circuit board manufacture.
The gerbmerg package was updated by Oleg Artamonov in Feb 2016, and maintained up until Feb 2017.
I don't see any activity after this date. The original that your url points to has an older update date (Dec 2016).
Both appear to be abandoned since the 2017 date. The newer was created as Oleg stated:
Quote:So I looked for some tool that can help me and found... nothing... $699... "call us to get a quote"... $1899... GerbMerge! GerbMerge is a python script, GPL, totally free to use and modify, created specifically for this job — merging a lot of gerbers and drill files into a single set.

Unfortunately, it didn't work. GerbMerge seemed to be maintained by different — unrelated — people, with years-long unmantained periods, so the most recent version: a) doesn't install, b) doesn't work with metric units; c) doesn't work with Cygwin... there're some patches to fix some errors, but they are made by different people, do not aligned with each other... some of them doesn't even work.

So I had no choice but to fix it.

Here is the result: https://github.com/unwireddevices/gerbmerge
Either way, it looks like a very ambitious package to tackle as a beginner. I won't advise against it unless you get frustrated easily, but beware of the challenge. If you are successful, you certainly will know a lot more about python when finished.

I would suggest that there are easier ways, great tutorials, etc.