summaryrefslogtreecommitdiff
path: root/gerber
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2015-05-21 17:15:54 -0300
committerPaulo Henrique Silva <ph.silva@gmail.com>2015-05-21 17:15:54 -0300
commit9e36d7e21d2906e22c91350ea0fee0d989d58584 (patch)
treeb1932e151356fd17968dd7f7bdcaa9c4dbaf26ff /gerber
parentaff36a4dca0d2d06b00c5f1e1a0703400fbe3b6b (diff)
downloadgerbonara-9e36d7e21d2906e22c91350ea0fee0d989d58584.tar.gz
gerbonara-9e36d7e21d2906e22c91350ea0fee0d989d58584.tar.bz2
gerbonara-9e36d7e21d2906e22c91350ea0fee0d989d58584.zip
G70/G71 are now interpreted as MOParamStmt.
Got a bunch of metric files with no MOMM but only G71, this should be pretty mush harmless.
Diffstat (limited to 'gerber')
-rw-r--r--gerber/rs274x.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gerber/rs274x.py b/gerber/rs274x.py
index 2af3ed6..b4963d1 100644
--- a/gerber/rs274x.py
+++ b/gerber/rs274x.py
@@ -341,10 +341,12 @@ class GerberParser(object):
line = r
continue
- # deprecated codes (parsed but ignored)
+ # deprecated codes
(deprecated_unit, r) = _match_one(self.DEPRECATED_UNIT, line)
if deprecated_unit:
- yield DeprecatedStmt.from_gerber(line)
+ stmt = MOParamStmt(param="MO", mo="inch" if "G70" in deprecated_unit["mode"] else "metric")
+ self.settings.units = stmt.mode
+ yield stmt
line = r
did_something = True
continue