summaryrefslogtreecommitdiff
path: root/gerber
diff options
context:
space:
mode:
Diffstat (limited to 'gerber')
-rw-r--r--gerber/rs274x.py8
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):