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.
This commit is contained in:
parent
aff36a4dca
commit
9e36d7e21d
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue