summaryrefslogtreecommitdiff
path: root/gerber/__main__.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-07 22:44:08 -0400
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-07 22:44:08 -0400
commitaf97dcf2a8200d9319e20d2789dbb0baa0611ba5 (patch)
tree215eed772745010141b3d50a1962720caf3d0196 /gerber/__main__.py
parent5ff44efbcfca5316796a1ea0191b2a92894a59ee (diff)
downloadgerbonara-af97dcf2a8200d9319e20d2789dbb0baa0611ba5.tar.gz
gerbonara-af97dcf2a8200d9319e20d2789dbb0baa0611ba5.tar.bz2
gerbonara-af97dcf2a8200d9319e20d2789dbb0baa0611ba5.zip
fix excellon render
Diffstat (limited to 'gerber/__main__.py')
-rw-r--r--gerber/__main__.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/gerber/__main__.py b/gerber/__main__.py
index 31b70f8..26f36e1 100644
--- a/gerber/__main__.py
+++ b/gerber/__main__.py
@@ -16,21 +16,20 @@
# the License.
if __name__ == '__main__':
- from .gerber import GerberFile
- from .excellon import ExcellonParser
+ import gerber
+ import excellon
from .render import GerberSvgContext
#import sys
#
- #if len(sys.argv) < 2:
+ #if len(sys.argv) < 2:`
# print >> sys.stderr, "Usage: python -m gerber <filename> <filename>..."
# sys.exit(1)
#
##for filename in sys.argv[1]:
## print "parsing %s" % filename
ctx = GerberSvgContext()
- g = GerberFile.read('SCB.GTL')
+ g = gerber.read('examples/test.gtl')
g.render('test.svg', ctx)
- p = ExcellonParser(ctx)
- p.parse('ncdrill.txt')
- p.dump('testwithdrill.svg')
+ p = excellon.read('ncdrill.txt')
+ p.render('testwithdrill.svg', ctx)