summaryrefslogtreecommitdiff
path: root/gerber/rs274x.py
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2015-04-07 18:28:03 -0300
committerPaulo Henrique Silva <ph.silva@gmail.com>2015-04-07 18:28:03 -0300
commit1ea7e14ba593a6fff7b4f7895875a7e93a03b1c8 (patch)
treede500abbf667407f6229929bc808c8b47412f968 /gerber/rs274x.py
parent50c01d4635b3f86ce98b127308275a46adbeee80 (diff)
downloadgerbonara-1ea7e14ba593a6fff7b4f7895875a7e93a03b1c8.tar.gz
gerbonara-1ea7e14ba593a6fff7b4f7895875a7e93a03b1c8.tar.bz2
gerbonara-1ea7e14ba593a6fff7b4f7895875a7e93a03b1c8.zip
Fix CoordStmt with missing i/j offsets
Diffstat (limited to 'gerber/rs274x.py')
-rw-r--r--gerber/rs274x.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py
index fbedc77..9403517 100644
--- a/gerber/rs274x.py
+++ b/gerber/rs274x.py
@@ -461,11 +461,13 @@ class GerberParser(object):
else:
start = (self.x, self.y)
end = (x, y)
- #width = self.apertures[self.aperture].stroke_width
+
if self.interpolation == 'linear':
self.primitives.append(Line(start, end, self.apertures[self.aperture], level_polarity=self.level_polarity))
else:
- center = (start[0] + stmt.i, start[1] + stmt.j)
+ i = 0 if stmt.i is None else stmt.i
+ j = 0 if stmt.j is None else stmt.j
+ center = (start[0] + i, start[1] + j)
self.primitives.append(Arc(start, end, center, self.direction, self.apertures[self.aperture], level_polarity=self.level_polarity))
elif stmt.op == "D02":