summaryrefslogtreecommitdiff
path: root/gerber
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2015-11-18 11:26:20 +0800
committerGarret Fick <garret@ficksworkshop.com>2015-11-18 11:26:20 +0800
commitf2b075e338fcd103a7af6e20e27f3960e63d20e4 (patch)
tree55c0160e3e88c88b29da9709f8f8517325473e59 /gerber
parent6e29b9bcae8167dbb9c75e5a79e09886b952e988 (diff)
downloadgerbonara-f2b075e338fcd103a7af6e20e27f3960e63d20e4.tar.gz
gerbonara-f2b075e338fcd103a7af6e20e27f3960e63d20e4.tar.bz2
gerbonara-f2b075e338fcd103a7af6e20e27f3960e63d20e4.zip
Regions with arcs would crash if they occured before any command to set the aperture
Diffstat (limited to 'gerber')
-rw-r--r--gerber/rs274x.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py
index 9fd63da..96bd136 100644
--- a/gerber/rs274x.py
+++ b/gerber/rs274x.py
@@ -498,9 +498,9 @@ class GerberParser(object):
self.primitives.append(Arc(start, end, center, self.direction, self.apertures[self.aperture], level_polarity=self.level_polarity, units=self.settings.units))
else:
if self.current_region is None:
- self.current_region = [Arc(start, end, center, self.direction, self.apertures[self.aperture], level_polarity=self.level_polarity, units=self.settings.units),]
+ self.current_region = [Arc(start, end, center, self.direction, self.apertures.get(self.aperture, Circle((0,0), 0)), level_polarity=self.level_polarity, units=self.settings.units),]
else:
- self.current_region.append(Arc(start, end, center, self.direction, self.apertures[self.aperture], level_polarity=self.level_polarity, units=self.settings.units))
+ 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":
pass