From 9e36d7e21d2906e22c91350ea0fee0d989d58584 Mon Sep 17 00:00:00 2001 From: Paulo Henrique Silva Date: Thu, 21 May 2015 17:15:54 -0300 Subject: 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. --- gerber/rs274x.py | 6 ++++-- 1 file 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 -- cgit