- Tool Drilling - fixed incorrect annotations in CNCJob objects generated; one drawback is that now each tool (when Toolchange is ON) has it's own annotation order which lead to overlapping in the start point of one tool and the end of previous tool
- Tool Drilling - refactoring methods and optimizations
This commit is contained in:
@@ -1137,13 +1137,6 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
||||
dia_plot = [float(el) for el in self.options["tooldia"].split(',') if el != ''][0]
|
||||
self.plot2(tooldia=dia_plot, obj=self, visible=visible, kind=kind)
|
||||
else:
|
||||
# multiple tools usage
|
||||
if self.cnc_tools:
|
||||
for tooluid_key in self.cnc_tools:
|
||||
tooldia = float('%.*f' % (self.decimals, float(self.cnc_tools[tooluid_key]['tooldia'])))
|
||||
gcode_parsed = self.cnc_tools[tooluid_key]['gcode_parsed']
|
||||
self.plot2(tooldia=tooldia, obj=self, visible=visible, gcode_parsed=gcode_parsed, kind=kind)
|
||||
|
||||
# I do this so the travel lines thickness will reflect the tool diameter
|
||||
# may work only for objects created within the app and not Gcode imported from elsewhere for which we
|
||||
# don't know the origin
|
||||
@@ -1156,6 +1149,13 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
||||
continue
|
||||
# gcode_parsed = self.gcode_parsed
|
||||
self.plot2(tooldia=tooldia, obj=self, visible=visible, gcode_parsed=gcode_parsed, kind=kind)
|
||||
else:
|
||||
# multiple tools usage
|
||||
if self.cnc_tools:
|
||||
for tooluid_key in self.cnc_tools:
|
||||
tooldia = float('%.*f' % (self.decimals, float(self.cnc_tools[tooluid_key]['tooldia'])))
|
||||
gcode_parsed = self.cnc_tools[tooluid_key]['gcode_parsed']
|
||||
self.plot2(tooldia=tooldia, obj=self, visible=visible, gcode_parsed=gcode_parsed, kind=kind)
|
||||
|
||||
self.shapes.redraw()
|
||||
except (ObjectDeleted, AttributeError):
|
||||
|
||||
Reference in New Issue
Block a user