diff --git a/FlatCAMObj.py b/FlatCAMObj.py index 72d63280..8431132e 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -4189,13 +4189,16 @@ class FlatCAMCNCjob(FlatCAMObj, CNCjob): cw_row = cw_index.row() self.shapes.clear(update=True) + for tooluid_key in self.cnc_tools: tooldia = float('%.4f' % float(self.cnc_tools[tooluid_key]['tooldia'])) gcode_parsed = self.cnc_tools[tooluid_key]['gcode_parsed'] # tool_uid = int(self.ui.cnc_tools_table.item(cw_row, 3).text()) - if self.ui.cnc_tools_table.cellWidget((tooluid_key - 1), 6).isChecked(): - self.plot2(tooldia=tooldia, obj=self, visible=True, gcode_parsed=gcode_parsed) + for r in range(self.ui.cnc_tools_table.rowCount()): + if int(self.ui.cnc_tools_table.item(r, 5).text()) == int(tooluid_key): + if self.ui.cnc_tools_table.cellWidget(r, 6).isChecked(): + self.plot2(tooldia=tooldia, obj=self, visible=True, gcode_parsed=gcode_parsed) self.shapes.redraw() diff --git a/README.md b/README.md index 487303f1..97d31cdc 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ CAD program, and create G-Code for Isolation routing. - fixed Freeform Cutout gaps issue (it was double than the value set) - added protection so the Cutout (either Freeform or Rectangular) cannot be done on a multigeo Geometry - added 2Sided Tool default values in Edit -> Preferences -> Tools +- optimized the FlatCAMCNCJob.on_plot_cb_click_table() plot function and solved a bug regarding having tools numbers not in sync with the cnc tool table 28.01.2018