From 4c20040fbe792cf247f2412e841d5e3aa1ecd99c Mon Sep 17 00:00:00 2001 From: Kamil Sopko Date: Sat, 9 Apr 2016 12:48:32 +0200 Subject: [PATCH] fix errors in tool selection --- camlib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/camlib.py b/camlib.py index 0d1bd383..7c0cd11a 100644 --- a/camlib.py +++ b/camlib.py @@ -2777,7 +2777,7 @@ class CNCjob(Geometry): # so we actually are sorting the tools by diameter sorted_tools = sorted(exobj.tools.items(), key = lambda x: x[1]) if tools == "all": - tools = str([i[0] for i in sorted_tools]) # we get a string of ordered tools + tools = [i[0] for i in sorted_tools] # we get a array of ordered tools log.debug("Tools 'all' and sorted are: %s" % str(tools)) else: selected_tools = [x.strip() for x in tools.split(",")] # we strip spaces and also separate the tools by ',' @@ -2819,7 +2819,7 @@ class CNCjob(Geometry): for tool in tools: # only if tool have some points, otherwise thre may be error and this part is useless - if "tool" in points: + if tool in points: # Tool change sequence (optional) if toolchange: gcode += "G00 Z%.4f\n" % toolchangez