Support KiCad format statement where FMAT,2 is 2:4 with inch

This commit is contained in:
Garret Fick 2015-12-30 16:11:25 +08:00
parent 96692b2221
commit 2e42d1a470
2 changed files with 5 additions and 0 deletions

View file

@ -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())

View file

@ -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):