diff options
author | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-05-16 09:45:34 -0400 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2015-05-16 09:45:34 -0400 |
commit | 8ec3077be988681bbbafcef18ea3a2f84dd61b2b (patch) | |
tree | 97b108fe6ca1d128420f58360f9976a3ca0ee0f0 /gerber/rs274x.py | |
parent | 21d963d244cbc762a736527b25cd8e82ff147f25 (diff) | |
download | gerbonara-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.py | 4 |
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): |