diff options
author | Garret Fick <garret@ficksworkshop.com> | 2016-06-06 22:26:06 +0800 |
---|---|---|
committer | Garret Fick <garret@ficksworkshop.com> | 2016-06-06 22:26:06 +0800 |
commit | 8f4b439efcc4dccd327a8fb95ce3bbb6d16adbcf (patch) | |
tree | 06e2276b3851bbfda038a7b8289c6e26cbffc8cc | |
parent | 9e6d813c1f95c1e1373276565039a43abb064de8 (diff) | |
download | gerbonara-8f4b439efcc4dccd327a8fb95ce3bbb6d16adbcf.tar.gz gerbonara-8f4b439efcc4dccd327a8fb95ce3bbb6d16adbcf.tar.bz2 gerbonara-8f4b439efcc4dccd327a8fb95ce3bbb6d16adbcf.zip |
Rout mode doesn't need to specify G01 every time
-rwxr-xr-x | gerber/excellon.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gerber/excellon.py b/gerber/excellon.py index 9a69042..a0a639e 100755 --- a/gerber/excellon.py +++ b/gerber/excellon.py @@ -498,7 +498,7 @@ class ExcellonParser(object): stmt = CoordinateStmt.from_excellon(line[3:], self._settings())
stmt.mode = self.state
- # The start position is where we were before the rout command
+ # The start position is where we were before the rout command
start = (self.pos[0], self.pos[1])
x = stmt.x
@@ -647,6 +647,10 @@ class ExcellonParser(object): self.active_tool._hit()
else:
stmt = CoordinateStmt.from_excellon(line, self._settings())
+
+ # We need this in case we are in rout mode
+ start = (self.pos[0], self.pos[1])
+
x = stmt.x
y = stmt.y
self.statements.append(stmt)
@@ -667,6 +671,13 @@ class ExcellonParser(object): self.hits.append(DrillHit(self.active_tool, tuple(self.pos)))
self.active_tool._hit()
+
+ elif self.state == 'LINEAR' and self.drill_down:
+ if not self.active_tool:
+ self.active_tool = self._get_tool(1)
+
+ self.hits.append(DrillSlot(self.active_tool, start, tuple(self.pos), DrillSlot.TYPE_ROUT))
+
else:
self.statements.append(UnknownStmt.from_excellon(line))
|