diff options
author | Paulo Henrique Silva <ph.silva@gmail.com> | 2014-10-26 22:26:50 -0200 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2014-10-26 22:36:47 -0400 |
commit | f23c3cb00a8966e1bdc177348c980bd40be4c522 (patch) | |
tree | c0108e3339ebc9aebc429689ca0bbf57a997f876 /gerber | |
parent | 0a0331c5f389c4a6574d42e7c2ad9811fdc6f443 (diff) | |
download | gerbonara-f23c3cb00a8966e1bdc177348c980bd40be4c522.tar.gz gerbonara-f23c3cb00a8966e1bdc177348c980bd40be4c522.tar.bz2 gerbonara-f23c3cb00a8966e1bdc177348c980bd40be4c522.zip |
Add simple hack to allow evaluation when gerber have macros and polygon
Diffstat (limited to 'gerber')
-rw-r--r-- | gerber/rs274x.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py index 08c492a..c01f027 100644 --- a/gerber/rs274x.py +++ b/gerber/rs274x.py @@ -412,9 +412,11 @@ class GerberParser(object): elif stmt.op == "D03": primitive = copy.deepcopy(self.apertures[self.aperture]) - primitive.position = (x, y) - primitive.level_polarity = self.level_polarity - self.primitives.append(primitive) + # XXX: temporary fix because there are no primitives for Macros and Polygon + if primitive is not None: + primitive.position = (x, y) + primitive.level_polarity = self.level_polarity + self.primitives.append(primitive) self.x, self.y = x, y def _evaluate_aperture(self, stmt): |