summaryrefslogtreecommitdiff
path: root/gerber/rs274x.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-01-08 00:19:47 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-01-08 00:19:47 +0800
commit83ae0670d11b5f5ef8ba3a6c362b7129a9e31ab3 (patch)
treee52cf8fc36cedb570af80d39aae8a410e8bd42b5 /gerber/rs274x.py
parentf61eee807f87c329f6f88645ecdb48f01b887c52 (diff)
downloadgerbonara-83ae0670d11b5f5ef8ba3a6c362b7129a9e31ab3.tar.gz
gerbonara-83ae0670d11b5f5ef8ba3a6c362b7129a9e31ab3.tar.bz2
gerbonara-83ae0670d11b5f5ef8ba3a6c362b7129a9e31ab3.zip
More stability fixes for poorly constructed files
Diffstat (limited to 'gerber/rs274x.py')
-rw-r--r--gerber/rs274x.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py
index 2ecc57d..12400a1 100644
--- a/gerber/rs274x.py
+++ b/gerber/rs274x.py
@@ -80,8 +80,10 @@ class GerberFile(CamFile):
`bounds` is stored as ((min x, max x), (min y, max y))
"""
- def __init__(self, statements, settings, primitives, filename=None):
+ def __init__(self, statements, settings, primitives, apertures, filename=None):
super(GerberFile, self).__init__(statements, settings, primitives, filename)
+
+ self.apertures = apertures
@property
def comments(self):
@@ -227,7 +229,7 @@ class GerberParser(object):
for stmt in self.statements:
stmt.units = self.settings.units
- return GerberFile(self.statements, self.settings, self.primitives, filename)
+ return GerberFile(self.statements, self.settings, self.primitives, self.apertures.values(), filename)
def dump_json(self):
stmts = {"statements": [stmt.__dict__ for stmt in self.statements]}