diff options
author | Paulo Henrique Silva <ph.silva@gmail.com> | 2015-03-18 03:38:52 -0300 |
---|---|---|
committer | Paulo Henrique Silva <ph.silva@gmail.com> | 2015-04-07 18:17:25 -0300 |
commit | b9b20a9644ca7b87493ca5786e2a25ecab132b75 (patch) | |
tree | bce7f467a120e86834872295305ba144ffd5ae8f /gerber/excellon.py | |
parent | 820d8aa9034fda56071f3ac2367b80eb0d1cb93a (diff) | |
download | gerbonara-b9b20a9644ca7b87493ca5786e2a25ecab132b75.tar.gz gerbonara-b9b20a9644ca7b87493ca5786e2a25ecab132b75.tar.bz2 gerbonara-b9b20a9644ca7b87493ca5786e2a25ecab132b75.zip |
Fix Excellon repeat command
Diffstat (limited to 'gerber/excellon.py')
-rwxr-xr-x | gerber/excellon.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gerber/excellon.py b/gerber/excellon.py index 900e2df..930b683 100755 --- a/gerber/excellon.py +++ b/gerber/excellon.py @@ -54,6 +54,8 @@ class ExcellonFile(CamFile): The ExcellonFile class represents a single excellon file.
+ http://www.excellon.com/manuals/program.htm
+
Parameters
----------
tools : list
@@ -305,8 +307,8 @@ class ExcellonParser(object): stmt = RepeatHoleStmt.from_excellon(line, self._settings())
self.statements.append(stmt)
for i in range(stmt.count):
- self.pos[0] += stmt.xdelta
- self.pos[1] += stmt.ydelta
+ self.pos[0] += stmt.xdelta if stmt.xdelta is not None else 0
+ self.pos[1] += stmt.ydelta if stmt.ydelta is not None else 0
self.hits.append((self.active_tool, tuple(self.pos)))
self.active_tool._hit()
|