diff options
-rwxr-xr-x | gerber/excellon.py | 1 | ||||
-rw-r--r-- | gerber/excellon_statements.py | 4 |
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): |