diff options
author | Garret Fick <garret@ficksworkshop.com> | 2016-01-08 00:19:47 +0800 |
---|---|---|
committer | Garret Fick <garret@ficksworkshop.com> | 2016-01-08 00:19:47 +0800 |
commit | 83ae0670d11b5f5ef8ba3a6c362b7129a9e31ab3 (patch) | |
tree | e52cf8fc36cedb570af80d39aae8a410e8bd42b5 /gerber/rs274x.py | |
parent | f61eee807f87c329f6f88645ecdb48f01b887c52 (diff) | |
download | gerbonara-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.py | 6 |
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]} |