summaryrefslogtreecommitdiff
path: root/gerber/excellon.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-03-27 14:24:11 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-03-27 14:24:11 +0800
commit288f49955ecc1a811752aa4b1e713f9954e3033b (patch)
tree5617650d75b731bb4ecf79e14bfcd777a452cd73 /gerber/excellon.py
parent25515b8ec7016698431b74e5beac8ff2d6691f0b (diff)
downloadgerbonara-288f49955ecc1a811752aa4b1e713f9954e3033b.tar.gz
gerbonara-288f49955ecc1a811752aa4b1e713f9954e3033b.tar.bz2
gerbonara-288f49955ecc1a811752aa4b1e713f9954e3033b.zip
Actually fix the rout rendering to be correct
Diffstat (limited to 'gerber/excellon.py')
-rwxr-xr-xgerber/excellon.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/gerber/excellon.py b/gerber/excellon.py
index 02709fd..72cf75c 100755
--- a/gerber/excellon.py
+++ b/gerber/excellon.py
@@ -111,10 +111,14 @@ class DrillSlot(object):
A slot is created between two points. The way the slot is created depends on the statement used to create it
"""
- def __init__(self, tool, start, end):
+ TYPE_ROUT = 1
+ TYPE_G85 = 2
+
+ def __init__(self, tool, start, end, slot_type):
self.tool = tool
self.start = start
self.end = end
+ self.slot_type = slot_type
def to_inch(self):
if self.tool.units == 'metric':
@@ -520,7 +524,7 @@ class ExcellonParser(object):
if not self.active_tool:
self.active_tool = self._get_tool(1)
- self.hits.append(DrillSlot(self.active_tool, start, end))
+ self.hits.append(DrillSlot(self.active_tool, start, end, DrillSlot.TYPE_ROUT))
self.active_tool._hit()
elif line[:3] == 'G05':
@@ -641,7 +645,7 @@ class ExcellonParser(object):
if not self.active_tool:
self.active_tool = self._get_tool(1)
- self.hits.append(DrillSlot(self.active_tool, (stmt.x_start, stmt.y_start), (stmt.x_end, stmt.y_end)))
+ self.hits.append(DrillSlot(self.active_tool, (stmt.x_start, stmt.y_start), (stmt.x_end, stmt.y_end), DrillSlot.TYPE_G85))
self.active_tool._hit()
else:
stmt = CoordinateStmt.from_excellon(line, self._settings())