summaryrefslogtreecommitdiff
path: root/gerber
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2015-12-30 16:11:25 +0800
committerGarret Fick <garret@ficksworkshop.com>2015-12-30 16:11:25 +0800
commit2e42d1a4705f8cf30a9ae1f987567ce97a39ae11 (patch)
treeb8ff5ba903e4c50e6c5b3b9a38f777a203a50422 /gerber
parent96692b22216fdfe11f2ded104ac0bdba3b7866a5 (diff)
downloadgerbonara-2e42d1a4705f8cf30a9ae1f987567ce97a39ae11.tar.gz
gerbonara-2e42d1a4705f8cf30a9ae1f987567ce97a39ae11.tar.bz2
gerbonara-2e42d1a4705f8cf30a9ae1f987567ce97a39ae11.zip
Support KiCad format statement where FMAT,2 is 2:4 with inch
Diffstat (limited to 'gerber')
-rwxr-xr-xgerber/excellon.py1
-rw-r--r--gerber/excellon_statements.py4
2 files changed, 5 insertions, 0 deletions
diff --git a/gerber/excellon.py b/gerber/excellon.py
index 3fb813f..cdd6d8d 100755
--- a/gerber/excellon.py
+++ b/gerber/excellon.py
@@ -480,6 +480,7 @@ class ExcellonParser(object):
elif line[:4] == 'FMAT':
stmt = FormatStmt.from_excellon(line)
self.statements.append(stmt)
+ self.format = stmt.format_tuple
elif line[:3] == 'G40':
self.statements.append(CutterCompensationOffStmt())
diff --git a/gerber/excellon_statements.py b/gerber/excellon_statements.py
index 9499c51..e10308a 100644
--- a/gerber/excellon_statements.py
+++ b/gerber/excellon_statements.py
@@ -670,6 +670,10 @@ class FormatStmt(ExcellonStatement):
def to_excellon(self, settings=None):
return 'FMAT,%d' % self.format
+
+ @property
+ def format_tuple(self):
+ return (self.format, 6 - self.format)
class LinkToolStmt(ExcellonStatement):