- modified the Geometry UI tools table. Replaced the comboboxes with labels.

- Fixed the SolderPaste Plugin regarding the special designation 'SP' job type and 'DN' tool shape
- some fixes in the GCode Editor regarding the new changes in the data structure
This commit is contained in:
Marius Stanciu
2021-07-18 12:01:41 +03:00
committed by Marius
parent a36be12960
commit 9c139d3ea2
8 changed files with 110 additions and 869 deletions

View File

@@ -226,17 +226,30 @@ class CNCJobObject(FlatCAMObj, CNCjob):
dia_item = QtWidgets.QTableWidgetItem('%.*f' % (self.decimals, float(dia_value['tooldia'])))
offset_txt = list(str(dia_value['offset']))
offset_txt = list(str(dia_value['data']['tools_mill_offset_value']))
offset_txt[0] = offset_txt[0].upper()
offset_item = QtWidgets.QTableWidgetItem(''.join(offset_txt))
type_item = QtWidgets.QTableWidgetItem(str(dia_value['data']['job']))
tool_type_item = QtWidgets.QTableWidgetItem(str(dia_value['data']['tools_mill_shape']))
job_item_options = [_('Roughing'), _('Finishing'), _('Isolation'), _('Polishing')]
tool_shape_options = ["C1", "C2", "C3", "C4", "B", "V"]
try:
job_item_txt = job_item_options[dia_value['data']['tools_mill_job_type']]
except TypeError:
job_item_txt = dia_value['data']['tools_mill_job_type']
job_item = QtWidgets.QTableWidgetItem(job_item_txt)
try:
tool_shape_item_txt = tool_shape_options[dia_value['data']['tools_mill_shape']]
except TypeError:
tool_shape_item_txt = dia_value['data']['tools_mill_shape']
tool_shape_item = QtWidgets.QTableWidgetItem(tool_shape_item_txt)
t_id.setFlags(QtCore.Qt.ItemIsEnabled)
dia_item.setFlags(QtCore.Qt.ItemIsEnabled)
offset_item.setFlags(QtCore.Qt.ItemIsEnabled)
type_item.setFlags(QtCore.Qt.ItemIsEnabled)
tool_type_item.setFlags(QtCore.Qt.ItemIsEnabled)
job_item.setFlags(QtCore.Qt.ItemIsEnabled)
tool_shape_item.setFlags(QtCore.Qt.ItemIsEnabled)
# hack so the checkbox stay centered in the table cell
# used this:
@@ -256,8 +269,8 @@ class CNCJobObject(FlatCAMObj, CNCjob):
self.ui.cnc_tools_table.setItem(row_no, 1, dia_item) # Diameter
self.ui.cnc_tools_table.setItem(row_no, 2, offset_item) # Offset
self.ui.cnc_tools_table.setItem(row_no, 3, type_item) # Toolpath Type
self.ui.cnc_tools_table.setItem(row_no, 4, tool_type_item) # Tool Type
self.ui.cnc_tools_table.setItem(row_no, 3, job_item) # Job Type
self.ui.cnc_tools_table.setItem(row_no, 4, tool_shape_item) # Tool Shape
# ## REMEMBER: THIS COLUMN IS HIDDEN IN OBJECTUI.PY # ##
self.ui.cnc_tools_table.setItem(row_no, 5, tool_uid_item) # Tool unique ID)
@@ -1301,7 +1314,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
if self.tools:
for tooluid_key in self.tools:
dia_plot = self.app.dec_format(
float(self.tools[tooluid_key]['data']['tools_mill_tooldia']),
float(self.tools[tooluid_key]['tooldia']),
self.decimals
)
gcode_parsed = self.tools[tooluid_key]['gcode_parsed']