Work with Diptrace that calls things D3 not D03

refactor
Garret Fick 2015-12-30 18:10:43 +08:00
rodzic 2e42d1a470
commit ff1ad704d5
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -474,7 +474,7 @@ class GerberParser(object):
# no implicit op allowed, force here if coord block doesn't have it
stmt.op = self.op
if self.op == "D01":
if self.op == "D01" or self.op == "D1":
start = (self.x, self.y)
end = (x, y)
@ -501,10 +501,10 @@ class GerberParser(object):
else:
self.current_region.append(Arc(start, end, center, self.direction, self.apertures.get(self.aperture, Circle((0,0), 0)), level_polarity=self.level_polarity, units=self.settings.units))
elif self.op == "D02":
elif self.op == "D02" or self.op == "D2":
pass
elif self.op == "D03":
elif self.op == "D03" or self.op == "D3":
primitive = copy.deepcopy(self.apertures[self.aperture])
# XXX: temporary fix because there are no primitives for Macros and Polygon
if primitive is not None: