summaryrefslogtreecommitdiff
path: root/gerber/rs274x.py
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2014-10-26 22:26:50 -0200
committerPaulo Henrique Silva <ph.silva@gmail.com>2014-10-26 22:26:50 -0200
commit3ffa9238c401cf0a872e1abae872a356d5f15f95 (patch)
treee7450acb0a14e9dd3d12622f4d3f473a5b557bab /gerber/rs274x.py
parent8f584d6396e82ad9929fe771d72b21b5303b9cd6 (diff)
downloadgerbonara-3ffa9238c401cf0a872e1abae872a356d5f15f95.tar.gz
gerbonara-3ffa9238c401cf0a872e1abae872a356d5f15f95.tar.bz2
gerbonara-3ffa9238c401cf0a872e1abae872a356d5f15f95.zip
Add simple hack to allow evaluation when gerber have macros and polygon
Diffstat (limited to 'gerber/rs274x.py')
-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):