diff options
author | Hamilton Kibbe <ham@hamiltonkib.be> | 2015-02-12 11:28:50 -0500 |
---|---|---|
committer | Hamilton Kibbe <ham@hamiltonkib.be> | 2015-02-12 11:28:50 -0500 |
commit | 8f69c1dfa281b6486c8fce16c1d58acef70c7ae7 (patch) | |
tree | 2dec25cbe731e5bf218dc508cdd082286f446edf /gerber/rs274x.py | |
parent | 41f9475b132001d52064392057e376c6423c33dc (diff) | |
download | gerbonara-8f69c1dfa281b6486c8fce16c1d58acef70c7ae7.tar.gz gerbonara-8f69c1dfa281b6486c8fce16c1d58acef70c7ae7.tar.bz2 gerbonara-8f69c1dfa281b6486c8fce16c1d58acef70c7ae7.zip |
Update line primitive to take aperture parameter
This fixes the exception referenced in #12. Still need to add rendering
code for rectangle aperture lines and arcs.
Rectangle strokes will be drawn as polygons by the rendering backends.
Diffstat (limited to 'gerber/rs274x.py')
-rw-r--r-- | gerber/rs274x.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py index abd7366..71ca111 100644 --- a/gerber/rs274x.py +++ b/gerber/rs274x.py @@ -416,12 +416,12 @@ class GerberParser(object): else: start = (self.x, self.y) end = (x, y) - width = self.apertures[self.aperture].stroke_width + #width = self.apertures[self.aperture].stroke_width if self.interpolation == 'linear': - self.primitives.append(Line(start, end, width, level_polarity=self.level_polarity)) + 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) - self.primitives.append(Arc(start, end, center, self.direction, width, level_polarity=self.level_polarity)) + self.primitives.append(Arc(start, end, center, self.direction, self.apertures[self.aperture], level_polarity=self.level_polarity)) elif stmt.op == "D02": pass |