- 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

@@ -996,14 +996,14 @@ class GeometryObjectUI(ObjectUI):
self.geo_tools_table.setColumnCount(7)
self.geo_tools_table.setColumnWidth(0, 20)
self.geo_tools_table.setHorizontalHeaderLabels(['#', _('Dia'), _('Offset'), _('Type'), _('Shape'), '', 'P'])
self.geo_tools_table.setHorizontalHeaderLabels(['#', _('Dia'), _('Offset'), _('Job'), _('Shape'), '', 'P'])
self.geo_tools_table.setColumnHidden(5, True)
# stylesheet = "::section{Background-color:rgb(239,239,245)}"
# self.geo_tools_table.horizontalHeader().setStyleSheet(stylesheet)
self.geo_tools_table.horizontalHeaderItem(0).setToolTip(
_(
"This is the Tool Number.\n"
"Tool Number.\n"
"When ToolChange is checked, on toolchange event this value\n"
"will be showed as a T1, T2 ... Tn")
)
@@ -1012,19 +1012,12 @@ class GeometryObjectUI(ObjectUI):
"is the cut width into the material."))
self.geo_tools_table.horizontalHeaderItem(2).setToolTip(
_(
"The value for the Offset can be:\n"
"- Path -> There is no offset, the tool cut will be done through the geometry line.\n"
"- In(side) -> The tool cut will follow the geometry inside. It will create a 'pocket'.\n"
"- Out(side) -> The tool cut will follow the geometry line on the outside."
"Offset Type. The kind of cut offset to be used."
))
self.geo_tools_table.horizontalHeaderItem(3).setToolTip(
_(
"The (Operation) Type has only informative value. Usually the UI form values \n"
"are choose based on the operation type and this will serve as a reminder.\n"
"Can be 'Roughing', 'Finishing' or 'Isolation'.\n"
"For Roughing we may choose a lower Feedrate and multiDepth cut.\n"
"For Finishing we may choose a higher Feedrate, without multiDepth.\n"
"For Isolation we need a lower Feedrate as it use a milling bit with a fine tip."
"Job Type. Usually the UI form values \n"
"are choose based on the operation type and this will serve as a reminder."
))
self.geo_tools_table.horizontalHeaderItem(4).setToolTip(
_("Tool Shape. \n"
@@ -1033,740 +1026,8 @@ class GeometryObjectUI(ObjectUI):
"B = ball tip milling tool\n"
"V = v-shape milling tool"))
self.geo_tools_table.horizontalHeaderItem(6).setToolTip(
_(
"Plot column. It is visible only for MultiGeo geometries, meaning geometries that holds the geometry\n"
"data into the tools. For those geometries, deleting the tool will delete the geometry data also,\n"
"so be WARNED. From the checkboxes on each row it can be enabled/disabled the plot on canvas\n"
"for the corresponding tool."
))
# # Tool Offset
# grid1 = QtWidgets.QGridLayout()
# self.geo_table_box.addLayout(grid1)
# grid1.setColumnStretch(0, 0)
# grid1.setColumnStretch(1, 1)
#
# self.tool_offset_lbl = FCLabel('%s:' % _('Tool Offset'))
# self.tool_offset_lbl.setToolTip(
# _(
# "The value to offset the cut when \n"
# "the Offset type selected is 'Offset'.\n"
# "The value can be positive for 'outside'\n"
# "cut and negative for 'inside' cut."
# )
# )
# self.tool_offset_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.tool_offset_entry.set_precision(self.decimals)
# self.tool_offset_entry.set_range(-10000.0000, 10000.0000)
# self.tool_offset_entry.setSingleStep(0.1)
#
# grid1.addWidget(self.tool_offset_lbl, 0, 0)
# grid1.addWidget(self.tool_offset_entry, 0, 1)
#
# separator_line = QtWidgets.QFrame()
# separator_line.setFrameShape(QtWidgets.QFrame.HLine)
# separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
# grid1.addWidget(separator_line, 1, 0, 1, 2)
#
# self.tool_sel_label = FCLabel('<b>%s</b>' % _("Add from DB"))
# grid1.addWidget(self.tool_sel_label, 2, 0, 1, 2)
#
# self.addtool_entry_lbl = FCLabel('%s:' % _('Tool Dia'))
# self.addtool_entry_lbl.setToolTip(
# _("Diameter for the new tool")
# )
# self.addtool_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.addtool_entry.set_precision(self.decimals)
# self.addtool_entry.set_range(0.00001, 10000.0000)
# self.addtool_entry.setSingleStep(0.1)
#
# grid1.addWidget(self.addtool_entry_lbl, 3, 0)
# grid1.addWidget(self.addtool_entry, 3, 1)
#
# bhlay = QtWidgets.QHBoxLayout()
#
# self.search_and_add_btn = FCButton(_('Search and Add'))
# self.search_and_add_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/plus16.png'))
# self.search_and_add_btn.setToolTip(
# _("Add a new tool to the Tool Table\n"
# "with the diameter specified above.")
# )
#
# self.addtool_from_db_btn = FCButton(_('Pick from DB'))
# self.addtool_from_db_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/search_db32.png'))
# self.addtool_from_db_btn.setToolTip(
# _("Add a new tool to the Tool Table\n"
# "from the Tools Database.\n"
# "Tools database administration in in:\n"
# "Menu: Options -> Tools Database")
# )
#
# bhlay.addWidget(self.search_and_add_btn)
# bhlay.addWidget(self.addtool_from_db_btn)
#
# grid1.addLayout(bhlay, 5, 0, 1, 2)
#
# separator_line = QtWidgets.QFrame()
# separator_line.setFrameShape(QtWidgets.QFrame.HLine)
# separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
# grid1.addWidget(separator_line, 9, 0, 1, 2)
#
# grid2 = QtWidgets.QGridLayout()
# self.geo_table_box.addLayout(grid2)
#
# self.deltool_btn = FCButton(_('Delete'))
# self.deltool_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/trash16.png'))
# self.deltool_btn.setToolTip(
# _("Delete a selection of tools in the Tool Table\n"
# "by first selecting a row in the Tool Table.")
# )
#
# grid2.addWidget(self.deltool_btn, 0, 0, 1, 2)
#
# # ###########################################################
# # ############# Create CNC Job ##############################
# # ###########################################################
# self.geo_param_frame = QtWidgets.QFrame()
# self.geo_param_frame.setContentsMargins(0, 0, 0, 0)
# self.geo_tools_box.addWidget(self.geo_param_frame)
#
# self.geo_param_box = QtWidgets.QVBoxLayout()
# self.geo_param_box.setContentsMargins(0, 0, 0, 0)
# self.geo_param_frame.setLayout(self.geo_param_box)
#
# separator_line = QtWidgets.QFrame()
# separator_line.setFrameShape(QtWidgets.QFrame.HLine)
# separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
# self.geo_param_box.addWidget(separator_line)
#
# # #################################################################
# # ################# GRID LAYOUT 3 ###############################
# # #################################################################
#
# self.grid3 = QtWidgets.QGridLayout()
# self.grid3.setColumnStretch(0, 0)
# self.grid3.setColumnStretch(1, 1)
# self.geo_param_box.addLayout(self.grid3)
#
# # ### Tools Data ## ##
# self.tool_data_label = FCLabel(
# "<b>%s: <font color='#0000FF'>%s %d</font></b>" % (_('Parameters for'), _("Tool"), int(1)))
# self.tool_data_label.setToolTip(
# _(
# "The data used for creating GCode.\n"
# "Each tool store it's own set of such data."
# )
# )
# self.grid3.addWidget(self.tool_data_label, 0, 0, 1, 2)
#
# # Tip Dia
# self.tipdialabel = FCLabel('%s:' % _('V-Tip Dia'))
# self.tipdialabel.setToolTip(
# _(
# "The tip diameter for V-Shape Tool"
# )
# )
# self.tipdia_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.tipdia_entry.set_precision(self.decimals)
# self.tipdia_entry.set_range(0.00001, 10000.0000)
# self.tipdia_entry.setSingleStep(0.1)
#
# self.grid3.addWidget(self.tipdialabel, 1, 0)
# self.grid3.addWidget(self.tipdia_entry, 1, 1)
#
# # Tip Angle
# self.tipanglelabel = FCLabel('%s:' % _('V-Tip Angle'))
# self.tipanglelabel.setToolTip(
# _(
# "The tip angle for V-Shape Tool.\n"
# "In degree."
# )
# )
# self.tipangle_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.tipangle_entry.set_precision(self.decimals)
# self.tipangle_entry.set_range(1.0, 180.0)
# self.tipangle_entry.setSingleStep(1)
#
# self.grid3.addWidget(self.tipanglelabel, 2, 0)
# self.grid3.addWidget(self.tipangle_entry, 2, 1)
#
# # Cut Z
# self.cutzlabel = FCLabel('%s:' % _('Cut Z'))
# self.cutzlabel.setToolTip(
# _(
# "Cutting depth (negative)\n"
# "below the copper surface."
# )
# )
# self.cutz_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.cutz_entry.set_precision(self.decimals)
#
# self.cutz_entry.set_range(-10000.0000, 10000.0000)
#
# self.cutz_entry.setSingleStep(0.1)
#
# self.grid3.addWidget(self.cutzlabel, 3, 0)
# self.grid3.addWidget(self.cutz_entry, 3, 1)
#
# # Multi-pass
# self.mpass_cb = FCCheckBox('%s:' % _("Multi-Depth"))
# self.mpass_cb.setToolTip(
# _(
# "Use multiple passes to limit\n"
# "the cut depth in each pass. Will\n"
# "cut multiple times until Cut Z is\n"
# "reached."
# )
# )
#
# self.maxdepth_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.maxdepth_entry.set_precision(self.decimals)
# self.maxdepth_entry.set_range(0, 10000.0000)
# self.maxdepth_entry.setSingleStep(0.1)
#
# self.maxdepth_entry.setToolTip(
# _(
# "Depth of each pass (positive)."
# )
# )
# self.ois_mpass_geo = OptionalInputSection(self.mpass_cb, [self.maxdepth_entry])
#
# self.grid3.addWidget(self.mpass_cb, 4, 0)
# self.grid3.addWidget(self.maxdepth_entry, 4, 1)
#
# # Travel Z
# self.travelzlabel = FCLabel('%s:' % _('Travel Z'))
# self.travelzlabel.setToolTip(
# _("Height of the tool when\n"
# "moving without cutting.")
# )
# self.travelz_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.travelz_entry.set_precision(self.decimals)
#
# if machinist_setting == 0:
# self.travelz_entry.set_range(0.00001, 10000.0000)
# else:
# self.travelz_entry.set_range(-10000.0000, 10000.0000)
#
# self.travelz_entry.setSingleStep(0.1)
#
# self.grid3.addWidget(self.travelzlabel, 5, 0)
# self.grid3.addWidget(self.travelz_entry, 5, 1)
#
# # Feedrate X-Y
# self.frlabel = FCLabel('%s:' % _('Feedrate X-Y'))
# self.frlabel.setToolTip(
# _("Cutting speed in the XY\n"
# "plane in units per minute")
# )
# self.cncfeedrate_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.cncfeedrate_entry.set_precision(self.decimals)
# self.cncfeedrate_entry.set_range(0, 910000.0000)
# self.cncfeedrate_entry.setSingleStep(0.1)
#
# self.grid3.addWidget(self.frlabel, 10, 0)
# self.grid3.addWidget(self.cncfeedrate_entry, 10, 1)
#
# # Feedrate Z (Plunge)
# self.frzlabel = FCLabel('%s:' % _('Feedrate Z'))
# self.frzlabel.setToolTip(
# _("Cutting speed in the XY\n"
# "plane in units per minute.\n"
# "It is called also Plunge.")
# )
# self.feedrate_z_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.feedrate_z_entry.set_precision(self.decimals)
# self.feedrate_z_entry.set_range(0, 910000.0000)
# self.feedrate_z_entry.setSingleStep(0.1)
#
# self.grid3.addWidget(self.frzlabel, 11, 0)
# self.grid3.addWidget(self.feedrate_z_entry, 11, 1)
#
# # Feedrate rapids
# self.fr_rapidlabel = FCLabel('%s:' % _('Feedrate Rapids'))
# self.fr_rapidlabel.setToolTip(
# _("Cutting speed in the XY plane\n"
# "(in units per minute).\n"
# "This is for the rapid move G00.\n"
# "It is useful only for Marlin,\n"
# "ignore for any other cases.")
# )
# self.feedrate_rapid_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.feedrate_rapid_entry.set_precision(self.decimals)
# self.feedrate_rapid_entry.set_range(0, 910000.0000)
# self.feedrate_rapid_entry.setSingleStep(0.1)
#
# self.grid3.addWidget(self.fr_rapidlabel, 12, 0)
# self.grid3.addWidget(self.feedrate_rapid_entry, 12, 1)
# # default values is to hide
# self.fr_rapidlabel.hide()
# self.feedrate_rapid_entry.hide()
#
# # Cut over 1st point in path
# self.extracut_cb = FCCheckBox('%s:' % _('Re-cut'))
# self.extracut_cb.setToolTip(
# _("In order to remove possible\n"
# "copper leftovers where first cut\n"
# "meet with last cut, we generate an\n"
# "extended cut over the first cut section.")
# )
#
# self.e_cut_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.e_cut_entry.set_range(0, 99999)
# self.e_cut_entry.set_precision(self.decimals)
# self.e_cut_entry.setSingleStep(0.1)
# self.e_cut_entry.setWrapping(True)
# self.e_cut_entry.setToolTip(
# _("In order to remove possible\n"
# "copper leftovers where first cut\n"
# "meet with last cut, we generate an\n"
# "extended cut over the first cut section.")
# )
# self.grid3.addWidget(self.extracut_cb, 13, 0)
# self.grid3.addWidget(self.e_cut_entry, 13, 1)
#
# # Spindlespeed
# self.spindle_label = FCLabel('%s:' % _('Spindle speed'))
# self.spindle_label.setToolTip(
# _(
# "Speed of the spindle in RPM (optional).\n"
# "If LASER preprocessor is used,\n"
# "this value is the power of laser."
# )
# )
# self.cncspindlespeed_entry = FCSpinner(callback=self.confirmation_message_int)
# self.cncspindlespeed_entry.set_range(0, 1000000)
# self.cncspindlespeed_entry.set_step(100)
#
# self.grid3.addWidget(self.spindle_label, 14, 0)
# self.grid3.addWidget(self.cncspindlespeed_entry, 14, 1)
#
# # Dwell
# self.dwell_cb = FCCheckBox('%s:' % _('Dwell'))
# self.dwell_cb.setToolTip(
# _(
# "Pause to allow the spindle to reach its\n"
# "speed before cutting."
# )
# )
# self.dwelltime_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.dwelltime_entry.set_precision(self.decimals)
# self.dwelltime_entry.set_range(0, 10000.0000)
# self.dwelltime_entry.setSingleStep(0.1)
#
# self.dwelltime_entry.setToolTip(
# _("Number of time units for spindle to dwell.")
# )
# self.ois_dwell_geo = OptionalInputSection(self.dwell_cb, [self.dwelltime_entry])
#
# self.grid3.addWidget(self.dwell_cb, 15, 0)
# self.grid3.addWidget(self.dwelltime_entry, 15, 1)
#
# # Probe depth
# self.pdepth_label = FCLabel('%s:' % _("Probe Z depth"))
# self.pdepth_label.setToolTip(
# _("The maximum depth that the probe is allowed\n"
# "to probe. Negative value, in current units.")
# )
# self.pdepth_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.pdepth_entry.set_precision(self.decimals)
# self.pdepth_entry.set_range(-10000.0000, 10000.0000)
# self.pdepth_entry.setSingleStep(0.1)
#
# self.grid3.addWidget(self.pdepth_label, 17, 0)
# self.grid3.addWidget(self.pdepth_entry, 17, 1)
#
# self.pdepth_label.hide()
# self.pdepth_entry.setVisible(False)
#
# # Probe feedrate
# self.feedrate_probe_label = FCLabel('%s:' % _("Feedrate Probe"))
# self.feedrate_probe_label.setToolTip(
# _("The feedrate used while the probe is probing.")
# )
# self.feedrate_probe_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.feedrate_probe_entry.set_precision(self.decimals)
# self.feedrate_probe_entry.set_range(0.0, 10000.0000)
# self.feedrate_probe_entry.setSingleStep(0.1)
#
# self.grid3.addWidget(self.feedrate_probe_label, 18, 0)
# self.grid3.addWidget(self.feedrate_probe_entry, 18, 1)
#
# self.feedrate_probe_label.hide()
# self.feedrate_probe_entry.setVisible(False)
#
# # #################################################################
# # ################# GRID LAYOUT 4 ###############################
# # #################################################################
#
# self.grid4 = QtWidgets.QGridLayout()
# self.grid4.setColumnStretch(0, 0)
# self.grid4.setColumnStretch(1, 1)
# self.geo_param_box.addLayout(self.grid4)
#
# separator_line2 = QtWidgets.QFrame()
# separator_line2.setFrameShape(QtWidgets.QFrame.HLine)
# separator_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
# self.grid4.addWidget(separator_line2, 0, 0, 1, 2)
#
# self.apply_param_to_all = FCButton(_("Apply parameters to all tools"))
# self.apply_param_to_all.setIcon(QtGui.QIcon(self.app.resource_location + '/param_all32.png'))
# self.apply_param_to_all.setToolTip(
# _("The parameters in the current form will be applied\n"
# "on all the tools from the Tool Table.")
# )
# self.grid4.addWidget(self.apply_param_to_all, 1, 0, 1, 2)
#
# separator_line2 = QtWidgets.QFrame()
# separator_line2.setFrameShape(QtWidgets.QFrame.HLine)
# separator_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
# self.grid4.addWidget(separator_line2, 2, 0, 1, 2)
#
# # General Parameters
# self.gen_param_label = FCLabel('<b>%s</b>' % _("Common Parameters"))
# self.gen_param_label.setToolTip(
# _("Parameters that are common for all tools.")
# )
# self.grid4.addWidget(self.gen_param_label, 3, 0, 1, 2)
#
# # Tool change Z
# self.toolchangeg_cb = FCCheckBox('%s:' % _("Tool change Z"))
# self.toolchangeg_cb.setToolTip(
# _(
# "Include tool-change sequence\n"
# "in the Machine Code (Pause for tool change)."
# )
# )
# self.toolchangez_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.toolchangez_entry.set_precision(self.decimals)
# self.toolchangez_entry.setToolTip(
# _(
# "Z-axis position (height) for\n"
# "tool change."
# )
# )
#
# if machinist_setting == 0:
# self.toolchangez_entry.set_range(0, 10000.0000)
# else:
# self.toolchangez_entry.set_range(-10000.0000, 10000.0000)
#
# self.toolchangez_entry.setSingleStep(0.1)
# self.ois_tcz_geo = OptionalInputSection(self.toolchangeg_cb, [self.toolchangez_entry])
#
# self.grid4.addWidget(self.toolchangeg_cb, 6, 0)
# self.grid4.addWidget(self.toolchangez_entry, 6, 1)
#
# # The Z value for the start move
# # startzlabel = FCLabel('Start move Z:')
# # startzlabel.setToolTip(
# # "Tool height just before starting the work.\n"
# # "Delete the value if you don't need this feature."
# #
# # )
# # grid3.addWidget(startzlabel, 8, 0)
# # self.gstartz_entry = FloatEntry()
# # grid3.addWidget(self.gstartz_entry, 8, 1)
#
# # The Z value for the end move
# self.endz_label = FCLabel('%s:' % _('End move Z'))
# self.endz_label.setToolTip(
# _("Height of the tool after\n"
# "the last move at the end of the job.")
# )
# self.endz_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.endz_entry.set_precision(self.decimals)
#
# if machinist_setting == 0:
# self.endz_entry.set_range(0, 10000.0000)
# else:
# self.endz_entry.set_range(-10000.0000, 10000.0000)
#
# self.endz_entry.setSingleStep(0.1)
#
# self.grid4.addWidget(self.endz_label, 9, 0)
# self.grid4.addWidget(self.endz_entry, 9, 1)
#
# # End Move X,Y
# endmove_xy_label = FCLabel('%s:' % _('End move X,Y'))
# endmove_xy_label.setToolTip(
# _("End move X,Y position. In format (x,y).\n"
# "If no value is entered then there is no move\n"
# "on X,Y plane at the end of the job.")
# )
# self.endxy_entry = NumericalEvalTupleEntry(border_color='#0069A9')
# self.endxy_entry.setPlaceholderText(_("X,Y coordinates"))
#
# self.grid4.addWidget(endmove_xy_label, 10, 0)
# self.grid4.addWidget(self.endxy_entry, 10, 1)
#
# # preprocessor selection
# pp_label = FCLabel('%s:' % _("Preprocessor"))
# pp_label.setToolTip(
# _("The Preprocessor file that dictates\n"
# "the Machine Code (like GCode, RML, HPGL) output.")
# )
# self.pp_geometry_name_cb = FCComboBox()
# self.pp_geometry_name_cb.setFocusPolicy(QtCore.Qt.StrongFocus)
#
# self.grid4.addWidget(pp_label, 11, 0)
# self.grid4.addWidget(self.pp_geometry_name_cb, 11, 1)
#
# # self.grid4.addWidget(FCLabel(''), 12, 0, 1, 2)
#
# # ------------------------------------------------------------------------------------------------------------
# # ------------------------- EXCLUSION AREAS ------------------------------------------------------------------
# # ------------------------------------------------------------------------------------------------------------
#
# # Exclusion Areas
# self.exclusion_cb = FCCheckBox('%s' % _("Add exclusion areas"))
# self.exclusion_cb.setToolTip(
# _(
# "Include exclusion areas.\n"
# "In those areas the travel of the tools\n"
# "is forbidden."
# )
# )
# self.grid4.addWidget(self.exclusion_cb, 12, 0, 1, 2)
#
# self.exclusion_frame = QtWidgets.QFrame()
# self.exclusion_frame.setContentsMargins(0, 0, 0, 0)
# self.grid4.addWidget(self.exclusion_frame, 14, 0, 1, 2)
#
# self.exclusion_box = QtWidgets.QVBoxLayout()
# self.exclusion_box.setContentsMargins(0, 0, 0, 0)
# self.exclusion_frame.setLayout(self.exclusion_box)
#
# self.exclusion_table = FCTable()
# self.exclusion_box.addWidget(self.exclusion_table)
# self.exclusion_table.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
#
# self.exclusion_table.setColumnCount(4)
# self.exclusion_table.setColumnWidth(0, 20)
# self.exclusion_table.setHorizontalHeaderLabels(['#', _('Object'), _('Strategy'), _('Over Z')])
#
# self.exclusion_table.horizontalHeaderItem(0).setToolTip(_("This is the Area ID."))
# self.exclusion_table.horizontalHeaderItem(1).setToolTip(
# _("Type of the object where the exclusion area was added."))
# self.exclusion_table.horizontalHeaderItem(2).setToolTip(
# _("The strategy used for exclusion area. Go around the exclusion areas or over it."))
# self.exclusion_table.horizontalHeaderItem(3).setToolTip(
# _("If the strategy is to go over the area then this is the height at which the tool will go to avoid the "
# "exclusion area."))
#
# self.exclusion_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
#
# grid_a1 = QtWidgets.QGridLayout()
# grid_a1.setColumnStretch(0, 0)
# grid_a1.setColumnStretch(1, 1)
# self.exclusion_box.addLayout(grid_a1)
#
# # Chose Strategy
# self.strategy_label = FCLabel('%s:' % _("Strategy"))
# self.strategy_label.setToolTip(_("The strategy followed when encountering an exclusion area.\n"
# "Can be:\n"
# "- Over -> when encountering the area, the tool will go to a set height\n"
# "- Around -> will avoid the exclusion area by going around the area"))
# self.strategy_radio = RadioSet([{'label': _('Over'), 'value': 'over'},
# {'label': _('Around'), 'value': 'around'}])
#
# grid_a1.addWidget(self.strategy_label, 1, 0)
# grid_a1.addWidget(self.strategy_radio, 1, 1)
#
# # Over Z
# self.over_z_label = FCLabel('%s:' % _("Over Z"))
# self.over_z_label.setToolTip(_("The height Z to which the tool will rise in order to avoid\n"
# "an interdiction area."))
# self.over_z_entry = FCDoubleSpinner()
# self.over_z_entry.set_range(0.000, 10000.0000)
# self.over_z_entry.set_precision(self.decimals)
#
# grid_a1.addWidget(self.over_z_label, 2, 0)
# grid_a1.addWidget(self.over_z_entry, 2, 1)
#
# # Button Add Area
# self.add_area_button = FCButton(_('Add Area:'))
# self.add_area_button.setToolTip(_("Add an Exclusion Area."))
#
# # Area Selection shape
# self.area_shape_radio = RadioSet([{'label': _("Square"), 'value': 'square'},
# {'label': _("Polygon"), 'value': 'polygon'}])
# self.area_shape_radio.setToolTip(
# _("The kind of selection shape used for area selection.")
# )
#
# grid_a1.addWidget(self.add_area_button, 4, 0)
# grid_a1.addWidget(self.area_shape_radio, 4, 1)
#
# h_lay_1 = QtWidgets.QHBoxLayout()
# self.exclusion_box.addLayout(h_lay_1)
#
# # Button Delete All Areas
# self.delete_area_button = FCButton(_('Delete All'))
# self.delete_area_button.setToolTip(_("Delete all exclusion areas."))
#
# # Button Delete Selected Areas
# self.delete_sel_area_button = FCButton(_('Delete Selected'))
# self.delete_sel_area_button.setToolTip(_("Delete all exclusion areas that are selected in the table."))
#
# h_lay_1.addWidget(self.delete_area_button)
# h_lay_1.addWidget(self.delete_sel_area_button)
#
# self.ois_exclusion_geo = OptionalHideInputSection(self.exclusion_cb, [self.exclusion_frame])
# # -------------------------- EXCLUSION AREAS END -------------------------------------------------------------
# # ------------------------------------------------------------------------------------------------------------
#
# # Add Polish
# self.polish_cb = FCCheckBox(label=_('Add Polish'))
# self.polish_cb.setToolTip(_(
# "Will add a Paint section at the end of the GCode.\n"
# "A metallic brush will clean the material after milling."))
# self.polish_cb.setObjectName("g_polish")
# self.grid4.addWidget(self.polish_cb, 15, 0, 1, 2)
#
# # Polish Tool Diameter
# self.polish_dia_lbl = FCLabel('%s:' % _('Tool Dia'))
# self.polish_dia_lbl.setToolTip(
# _("Diameter for the polishing tool.")
# )
# self.polish_dia_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.polish_dia_entry.set_precision(self.decimals)
# self.polish_dia_entry.set_range(0.000, 10000.0000)
# self.polish_dia_entry.setObjectName("g_polish_dia")
#
# self.grid4.addWidget(self.polish_dia_lbl, 16, 0)
# self.grid4.addWidget(self.polish_dia_entry, 16, 1)
#
# # Polish Travel Z
# self.polish_travelz_lbl = FCLabel('%s:' % _('Travel Z'))
# self.polish_travelz_lbl.setToolTip(
# _("Height of the tool when\n"
# "moving without cutting.")
# )
# self.polish_travelz_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.polish_travelz_entry.set_precision(self.decimals)
# self.polish_travelz_entry.set_range(0.00000, 10000.00000)
# self.polish_travelz_entry.setSingleStep(0.1)
# self.polish_travelz_entry.setObjectName("g_polish_travelz")
#
# self.grid4.addWidget(self.polish_travelz_lbl, 17, 0)
# self.grid4.addWidget(self.polish_travelz_entry, 17, 1)
#
# # Polish Pressure
# self.polish_pressure_lbl = FCLabel('%s:' % _('Pressure'))
# self.polish_pressure_lbl.setToolTip(
# _("Negative value. The higher the absolute value\n"
# "the stronger the pressure of the brush on the material.")
# )
# self.polish_pressure_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.polish_pressure_entry.set_precision(self.decimals)
# self.polish_pressure_entry.set_range(-10000.0000, 10000.0000)
# self.polish_pressure_entry.setObjectName("g_polish_pressure")
#
# self.grid4.addWidget(self.polish_pressure_lbl, 18, 0)
# self.grid4.addWidget(self.polish_pressure_entry, 18, 1)
#
# # Polish Margin
# self.polish_margin_lbl = FCLabel('%s:' % _('Margin'))
# self.polish_margin_lbl.setToolTip(
# _("Bounding box margin.")
# )
# self.polish_margin_entry = FCDoubleSpinner(callback=self.confirmation_message)
# self.polish_margin_entry.set_precision(self.decimals)
# self.polish_margin_entry.set_range(-10000.0000, 10000.0000)
# self.polish_margin_entry.setObjectName("g_polish_margin")
#
# self.grid4.addWidget(self.polish_margin_lbl, 20, 0)
# self.grid4.addWidget(self.polish_margin_entry, 20, 1)
#
# # Polish Overlap
# self.polish_over_lbl = FCLabel('%s:' % _('Overlap'))
# self.polish_over_lbl.setToolTip(
# _("How much (percentage) of the tool width to overlap each tool pass.")
# )
# self.polish_over_entry = FCDoubleSpinner(suffix='%', callback=self.confirmation_message)
# self.polish_over_entry.set_precision(self.decimals)
# self.polish_over_entry.setWrapping(True)
# self.polish_over_entry.set_range(0.0000, 99.9999)
# self.polish_over_entry.setSingleStep(0.1)
# self.polish_over_entry.setObjectName("g_polish_overlap")
#
# self.grid4.addWidget(self.polish_over_lbl, 22, 0)
# self.grid4.addWidget(self.polish_over_entry, 22, 1)
#
# # Polish Method
# self.polish_method_lbl = FCLabel('%s:' % _('Method'))
# self.polish_method_lbl.setToolTip(
# _("Algorithm for polishing:\n"
# "- Standard: Fixed step inwards.\n"
# "- Seed-based: Outwards from seed.\n"
# "- Line-based: Parallel lines.")
# )
#
# self.polish_method_combo = FCComboBox2()
# self.polish_method_combo.addItems(
# [_("Standard"), _("Seed"), _("Lines")]
# )
# self.polish_method_combo.setObjectName('g_polish_method')
#
# self.grid4.addWidget(self.polish_method_lbl, 24, 0)
# self.grid4.addWidget(self.polish_method_combo, 24, 1)
#
# self.polish_dia_lbl.hide()
# self.polish_dia_entry.hide()
# self.polish_pressure_lbl.hide()
# self.polish_pressure_entry.hide()
# self.polish_travelz_lbl.hide()
# self.polish_travelz_entry.hide()
# self.polish_margin_lbl.hide()
# self.polish_margin_entry.hide()
# self.polish_over_lbl.hide()
# self.polish_over_entry.hide()
# self.polish_method_lbl.hide()
# self.polish_method_combo.hide()
#
# self.ois_polish = OptionalHideInputSection(
# self.polish_cb,
# [
# self.polish_dia_lbl,
# self.polish_dia_entry,
# self.polish_pressure_lbl,
# self.polish_pressure_entry,
# self.polish_travelz_lbl,
# self.polish_travelz_entry,
# self.polish_margin_lbl,
# self.polish_margin_entry,
# self.polish_over_lbl,
# self.polish_over_entry,
# self.polish_method_lbl,
# self.polish_method_combo
# ]
# )
#
# separator_line2 = QtWidgets.QFrame()
# separator_line2.setFrameShape(QtWidgets.QFrame.HLine)
# separator_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
# self.grid4.addWidget(separator_line2, 26, 0, 1, 2)
#
# # Button
# self.generate_cnc_button = FCButton(_('Generate CNCJob object'))
# self.generate_cnc_button.setIcon(QtGui.QIcon(self.app.resource_location + '/cnc16.png'))
# self.generate_cnc_button.setToolTip('%s.\n%s' % (
# _("Generate CNCJob object"),
# _(
# "Add / Select at least one tool in the tool-table.\n"
# "Click the # header to select all, or Ctrl + LMB\n"
# "for custom selection of tools.")))
#
# self.generate_cnc_button.setStyleSheet("""
# QPushButton
# {
# font-weight: bold;
# }
# """)
# self.grid4.addWidget(self.generate_cnc_button, 28, 0, 1, 2)
#
# self.grid4.addWidget(FCLabel(''), 30, 0, 1, 2)
_("Plot column. It is visible only for MultiGeo Geometry objects.\n"
"Enable plot for the selected tool geometry."))
self.grid4 = QtWidgets.QGridLayout()
self.grid4.setColumnStretch(0, 0)
@@ -2110,7 +1371,7 @@ class CNCObjectUI(ObjectUI):
self.cnc_tools_table.setColumnCount(7)
self.cnc_tools_table.setColumnWidth(0, 20)
self.cnc_tools_table.setHorizontalHeaderLabels(['#', _('Dia'), _('Offset'), _('Type'), _('TT'), '', _('P')])
self.cnc_tools_table.setHorizontalHeaderLabels(['#', _('Dia'), _('Offset'), _('Job'), _('Shape'), '', _('P')])
self.cnc_tools_table.setColumnHidden(5, True)
# stylesheet = "::section{Background-color:rgb(239,239,245)}"
# self.cnc_tools_table.horizontalHeader().setStyleSheet(stylesheet)