Add simple hack to allow evaluation when gerber have macros and polygon

This commit is contained in:
Paulo Henrique Silva 2014-10-26 22:26:50 -02:00 committed by Hamilton Kibbe
parent 0a0331c5f3
commit f23c3cb00a

View file

@ -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):