jnicolson / gerbmerge Goto Github PK
View Code? Open in Web Editor NEWThis project forked from provideyourown/gerbmerge
GerbMerge - merge gerbers into a panel (Originally from RuggedCircuits.com)
License: GNU General Public License v3.0
This project forked from provideyourown/gerbmerge
GerbMerge - merge gerbers into a panel (Originally from RuggedCircuits.com)
License: GNU General Public License v3.0
Convert to run under Python 3
Reformat all code to adhere to PEP8 guidelines
What is the idea of this fork in terms of compatibility?
it looks like one of the arguments layoutfile --random-search --full-search is required
is different from some of the other forks - is this a feature or a bug?
debian@debian:~/gerbmerge.jnicolson/examples/hellen81-a$ python3 ../../gerbmerge --place-file=board_place.txt board.cfg
error: one of the arguments layoutfile --random-search --full-search is required
usage: gerbmerge [options] configfile [layoutfile]
gerbmerge is a utility to combine various gerber + excellon files into a single file
positional arguments:
configfile config file to read (see help for format)
layoutfile file containing layout of gerbers defined in config file (default: None)
optional arguments:
-h, --help show this help message and exit
--random-search Automatic placement using random search (default: False)
--full-search Automatic placement using exhaustive search (default: False)
A lot of functions look to be unnecessarily large and could be split into smaller, testable, single purpose functions
previous versions / other forks allow me to execute gerbmerge.py from other folders like for instance
https://github.com/rusefi/gerbmerge/blob/rusefi-tests/examples/hellen81-a/run.sh
I am not a Python power user and I am unable to launch this version:
rusefi@DESKTOP-57S88S8:~/gerbmerge.jnicolson$ python3 gerbmerge/gerbmerge.py
Traceback (most recent call last):
File "gerbmerge/gerbmerge.py", line 29, in <module>
from . import (aptable, config, drillcluster, fabdrawing, jobs, parselayout,
ImportError: attempted relative import with no known parent package
rusefi@DESKTOP-57S88S8:~/gerbmerge.jnicolson$
Is there a new requirement for gerbmerge.py to be located in current folder due to "from ."?
TL, DR: can we have https://github.com/rusefi/gerbmerge/tree/rusefi-tests/examples/hellen81-a work on this fork? in that folder there is full input and expected output. that test passes on https://github.com/rusefi/gerbmerge with based on all the random fixes we've picked from around and made ourselves.
Longer story: https://github.com/rusefi/rusefi is an open source project for internal combustion engine control unit. In order to facilitate plug-in boards for different vehicles/different connectors with reusable functional blocks @andreika-git has created https://github.com/andreika-git/hellen-one/ with is GerbMerge+PdfMerge+SomethingElseMerge+actual reusable modules to use
https://github.com/andreika-git/hellen81 would be a specific ECU which was developed using that framework
I believe that hellen81 specifically has only Altium Designer gerber files as opposed to other rusEFI boards which often use KiCAD 6.
Implement a proper command line library with arg parsing and checking
When I try to install with Python 3, I get the following error, which I think is a python 2/3 compatibility. I solved it using one of the suggestions here: https://stackoverflow.com/questions/43728431/relative-imports-modulenotfounderror-no-module-named-x - specifically adding sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
to gerbmerge.py before the imports, but this seems shady...
ERROR: Command errored out with exit status 1:
command: /home/ckemere/anaconda3/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/ckemere/Code/gerbmerge/setup.py'"'"'; __file__='"'"'/home/ckemere/Code/gerbmerge/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-xo3qj9t7
cwd: /home/ckemere/Code/gerbmerge/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/ckemere/Code/gerbmerge/setup.py", line 2, in <module>
from gerbmerge.gerbmerge import VERSION_MAJOR, VERSION_MINOR
File "/home/ckemere/Code/gerbmerge/gerbmerge/gerbmerge.py", line 29, in <module>
import aptable, config, drillcluster, fabdrawing
ModuleNotFoundError: No module named 'aptable'
At the moment https://github.com/jnicolson/gerbmerge/blob/master/README.md mentions Python 3 on top but also has a couple of references to python 2 below
Version 1.9 is mentioned but 18.exe is mentioned below.
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.