summaryrefslogtreecommitdiff
path: root/gerber/rs274x.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2015-05-16 09:45:34 -0400
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2015-05-16 09:45:34 -0400
commit8ec3077be988681bbbafcef18ea3a2f84dd61b2b (patch)
tree97b108fe6ca1d128420f58360f9976a3ca0ee0f0 /gerber/rs274x.py
parent21d963d244cbc762a736527b25cd8e82ff147f25 (diff)
downloadgerbonara-8ec3077be988681bbbafcef18ea3a2f84dd61b2b.tar.gz
gerbonara-8ec3077be988681bbbafcef18ea3a2f84dd61b2b.tar.bz2
gerbonara-8ec3077be988681bbbafcef18ea3a2f84dd61b2b.zip
Add checks to ensure statement unit conversions are idempotent
Diffstat (limited to 'gerber/rs274x.py')
-rw-r--r--gerber/rs274x.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py
index 3dcddb4..20baaa7 100644
--- a/gerber/rs274x.py
+++ b/gerber/rs274x.py
@@ -214,6 +214,10 @@ class GerberParser(object):
self.evaluate(stmt)
self.statements.append(stmt)
+ # Initialize statement units
+ for stmt in self.statements:
+ stmt.units = self.settings.units
+
return GerberFile(self.statements, self.settings, self.primitives, filename)
def dump_json(self):