summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2015-12-30 18:10:43 +0800
committerGarret Fick <garret@ficksworkshop.com>2015-12-30 18:10:43 +0800
commitff1ad704d5bb7814fdaebc156b727ec3c5f2d1a8 (patch)
tree216a856463fd9db82d6f8ab2dcbcd0ed5546e1e0
parent2e42d1a4705f8cf30a9ae1f987567ce97a39ae11 (diff)
downloadgerbonara-ff1ad704d5bb7814fdaebc156b727ec3c5f2d1a8.tar.gz
gerbonara-ff1ad704d5bb7814fdaebc156b727ec3c5f2d1a8.tar.bz2
gerbonara-ff1ad704d5bb7814fdaebc156b727ec3c5f2d1a8.zip
Work with Diptrace that calls things D3 not D03
-rw-r--r--gerber/rs274x.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py
index 3e262b3..2ecc57d 100644
--- a/gerber/rs274x.py
+++ b/gerber/rs274x.py
@@ -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: