|
@@ -729,20 +729,20 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
|
|
|
exc_final.drills.append({"point": point, "tool": drill['tool']})
|
|
exc_final.drills.append({"point": point, "tool": drill['tool']})
|
|
|
toolsrework=dict()
|
|
toolsrework=dict()
|
|
|
max_numeric_tool=0
|
|
max_numeric_tool=0
|
|
|
- for toolname in list(exc.tools.keys()):
|
|
|
|
|
|
|
+ for toolname in list(exc.tools.copy().keys()):
|
|
|
numeric_tool=int(toolname)
|
|
numeric_tool=int(toolname)
|
|
|
if numeric_tool>max_numeric_tool:
|
|
if numeric_tool>max_numeric_tool:
|
|
|
max_numeric_tool=numeric_tool
|
|
max_numeric_tool=numeric_tool
|
|
|
toolsrework[exc.tools[toolname]['C']]=toolname
|
|
toolsrework[exc.tools[toolname]['C']]=toolname
|
|
|
|
|
|
|
|
#exc_final as last because names from final tools will be used
|
|
#exc_final as last because names from final tools will be used
|
|
|
- for toolname in list(exc_final.tools.keys()):
|
|
|
|
|
|
|
+ for toolname in list(exc_final.tools.copy().keys()):
|
|
|
numeric_tool=int(toolname)
|
|
numeric_tool=int(toolname)
|
|
|
if numeric_tool>max_numeric_tool:
|
|
if numeric_tool>max_numeric_tool:
|
|
|
max_numeric_tool=numeric_tool
|
|
max_numeric_tool=numeric_tool
|
|
|
toolsrework[exc_final.tools[toolname]['C']]=toolname
|
|
toolsrework[exc_final.tools[toolname]['C']]=toolname
|
|
|
|
|
|
|
|
- for toolvalues in list(toolsrework.keys()):
|
|
|
|
|
|
|
+ for toolvalues in list(toolsrework.copy().keys()):
|
|
|
if toolsrework[toolvalues] in exc_final.tools:
|
|
if toolsrework[toolvalues] in exc_final.tools:
|
|
|
if exc_final.tools[toolsrework[toolvalues]]!={"C": toolvalues}:
|
|
if exc_final.tools[toolsrework[toolvalues]]!={"C": toolvalues}:
|
|
|
exc_final.tools[str(max_numeric_tool+1)]={"C": toolvalues}
|
|
exc_final.tools[str(max_numeric_tool+1)]={"C": toolvalues}
|