summaryrefslogtreecommitdiff
path: root/gerber/gerber_statements.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-10 23:07:51 -0400
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-10 23:07:51 -0400
commitae3bbff8b0849e0b49dc139396d7f8c57334a7b8 (patch)
treedfe2de456d950f4f09c8d200b42fb21677e20a04 /gerber/gerber_statements.py
parent76c03a55c91addff71339d80cf17560926f1580b (diff)
downloadgerbonara-ae3bbff8b0849e0b49dc139396d7f8c57334a7b8.tar.gz
gerbonara-ae3bbff8b0849e0b49dc139396d7f8c57334a7b8.tar.bz2
gerbonara-ae3bbff8b0849e0b49dc139396d7f8c57334a7b8.zip
Added excellon format detection
Diffstat (limited to 'gerber/gerber_statements.py')
-rw-r--r--gerber/gerber_statements.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/gerber/gerber_statements.py b/gerber/gerber_statements.py
index a22eae2..218074f 100644
--- a/gerber/gerber_statements.py
+++ b/gerber/gerber_statements.py
@@ -133,7 +133,12 @@ class MOParamStmt(ParamStmt):
@classmethod
def from_dict(cls, stmt_dict):
param = stmt_dict.get('param')
- mo = 'inch' if stmt_dict.get('mo') == 'IN' else 'metric'
+ if stmt_dict.get('mo').lower() == 'in':
+ mo = 'inch'
+ elif stmt_dict.get('mo').lower() == 'mm':
+ mo = 'metric'
+ else:
+ mo = None
return cls(param, mo)
def __init__(self, param, mo):