diff options
author | Paulo Henrique Silva <ph.silva@gmail.com> | 2015-01-15 05:01:40 -0200 |
---|---|---|
committer | Paulo Henrique Silva <ph.silva@gmail.com> | 2015-01-15 05:01:40 -0200 |
commit | 0f36084aadc85670b96ca63a8258d18db4b18cf8 (patch) | |
tree | 118ff300cc6819283759b883126673c32981d7db /gerber/excellon.py | |
parent | 137c73f3e42281de67bde8f1c0b16938f5b8aeeb (diff) | |
download | gerbonara-0f36084aadc85670b96ca63a8258d18db4b18cf8.tar.gz gerbonara-0f36084aadc85670b96ca63a8258d18db4b18cf8.tar.bz2 gerbonara-0f36084aadc85670b96ca63a8258d18db4b18cf8.zip |
Add Repeat Hole Stmt and fix UnitStmt parsing
* Repeat hole support (with no real parsing, just a copy)
* Fix UnitStmt to works even when a ,TZ or ,LZ information is not provided.
Diffstat (limited to 'gerber/excellon.py')
-rwxr-xr-x | gerber/excellon.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gerber/excellon.py b/gerber/excellon.py index ee38367..17b870a 100755 --- a/gerber/excellon.py +++ b/gerber/excellon.py @@ -204,8 +204,7 @@ class ExcellonParser(object): self.statements.append(DrillModeStmt())
self.state = 'DRILL'
- elif (('INCH' in line or 'METRIC' in line) and
- ('LZ' in line or 'TZ' in line)):
+ elif 'INCH' in line or 'METRIC' in line:
stmt = UnitStmt.from_excellon(line)
self.units = stmt.units
self.zero_suppression = stmt.zero_suppression
@@ -244,6 +243,10 @@ class ExcellonParser(object): self.active_tool = self.tools[stmt.tool]
self.statements.append(stmt)
+ elif line[0] == 'R' and self.state != 'HEADER':
+ stmt = RepeatHoleStmt.from_excellon(line, self._settings())
+ self.statements.append(stmt)
+
elif line[0] in ['X', 'Y']:
stmt = CoordinateStmt.from_excellon(line, self._settings())
x = stmt.x
|