summaryrefslogtreecommitdiff
path: root/gerber/excellon_statements.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2015-12-19 11:44:12 +0800
committerGarret Fick <garret@ficksworkshop.com>2015-12-19 11:44:12 +0800
commit4e838df32ac6d283429e30d2a3151b7d7e8e82b2 (patch)
treed9aa04ae862f9d694de4aebd3f9440a9d0681cac /gerber/excellon_statements.py
parent206f4c57ab66f8a6753015340315991b40178c9b (diff)
downloadgerbonara-4e838df32ac6d283429e30d2a3151b7d7e8e82b2.tar.gz
gerbonara-4e838df32ac6d283429e30d2a3151b7d7e8e82b2.tar.bz2
gerbonara-4e838df32ac6d283429e30d2a3151b7d7e8e82b2.zip
Parse misc nc drill files
Diffstat (limited to 'gerber/excellon_statements.py')
-rw-r--r--gerber/excellon_statements.py26
1 files changed, 24 insertions, 2 deletions
diff --git a/gerber/excellon_statements.py b/gerber/excellon_statements.py
index 2be7a05..9499c51 100644
--- a/gerber/excellon_statements.py
+++ b/gerber/excellon_statements.py
@@ -36,7 +36,8 @@ __all__ = ['ExcellonTool', 'ToolSelectionStmt', 'CoordinateStmt',
'ExcellonStatement', 'ZAxisRoutPositionStmt',
'RetractWithClampingStmt', 'RetractWithoutClampingStmt',
'CutterCompensationOffStmt', 'CutterCompensationLeftStmt',
- 'CutterCompensationRightStmt', 'ZAxisInfeedRateStmt']
+ 'CutterCompensationRightStmt', 'ZAxisInfeedRateStmt',
+ 'NextToolSelectionStmt']
class ExcellonStatement(object):
@@ -267,7 +268,28 @@ class ToolSelectionStmt(ExcellonStatement):
if self.compensation_index is not None:
stmt += '%02d' % self.compensation_index
return stmt
-
+
+class NextToolSelectionStmt(ExcellonStatement):
+
+ # TODO the statement exists outside of the context of the file,
+ # so it is imposible to know that it is really the next tool
+
+ def __init__(self, cur_tool, next_tool, **kwargs):
+ """
+ Select the next tool in the wheel.
+ Parameters
+ ----------
+ cur_tool : the tool that is currently selected
+ next_tool : the that that is now selected
+ """
+ super(NextToolSelectionStmt, self).__init__(**kwargs)
+
+ self.cur_tool = cur_tool
+ self.next_tool = next_tool
+
+ def to_excellon(self, settings=None):
+ stmt = 'M00'
+ return stmt
class ZAxisInfeedRateStmt(ExcellonStatement):