From ff1ad704d5bb7814fdaebc156b727ec3c5f2d1a8 Mon Sep 17 00:00:00 2001 From: Garret Fick Date: Wed, 30 Dec 2015 18:10:43 +0800 Subject: Work with Diptrace that calls things D3 not D03 --- gerber/rs274x.py | 6 +++--- 1 file 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: -- cgit