diff --git a/CHANGELOG.md b/CHANGELOG.md
index be45d3be..49515c6b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta
=================================================
+19.11.2020
+
+- cleaned up the Geometry Properties UI
+
17.11.2020
- the Follow Geometry outputted by the Follow Tools is now of type multigeo which means that it can be fused with other multigeo object without much pain
diff --git a/appGUI/ObjectUI.py b/appGUI/ObjectUI.py
index 603a6b60..a081ec4b 100644
--- a/appGUI/ObjectUI.py
+++ b/appGUI/ObjectUI.py
@@ -1055,736 +1055,741 @@ class GeometryObjectUI(ObjectUI):
"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('%s' % _("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(
- "%s: %s %d" % (_('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)
-
- if machinist_setting == 0:
- self.cutz_entry.set_range(-10000.0000, 0.0000)
- else:
- 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 ###############################
- # #################################################################
+ # # 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('%s' % _("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(
+ # "%s: %s %d" % (_('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)
+ #
+ # if machinist_setting == 0:
+ # self.cutz_entry.set_range(-10000.0000, 0.0000)
+ # else:
+ # 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('%s' % _("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)
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('%s' % _("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)
+ self.geo_tools_box.addLayout(self.grid4)
# ##############
# Paint area ##
diff --git a/appObjects/FlatCAMGeometry.py b/appObjects/FlatCAMGeometry.py
index f60a3c87..86600297 100644
--- a/appObjects/FlatCAMGeometry.py
+++ b/appObjects/FlatCAMGeometry.py
@@ -254,18 +254,18 @@ class GeometryObject(FlatCAMObj, Geometry):
self.ui.geo_tools_table.setCellWidget(row_idx, 6, plot_item)
# set an initial value for the OFFSET ENTRY
- try:
- self.ui.tool_offset_entry.set_value(tooluid_value['offset_value'])
- except Exception as e:
- log.debug("build_ui() --> Could not set the 'offset_value' key in self.tools. Error: %s" % str(e))
+ # try:
+ # self.ui.tool_offset_entry.set_value(tooluid_value['offset_value'])
+ # except Exception as e:
+ # log.debug("build_ui() --> Could not set the 'offset_value' key in self.tools. Error: %s" % str(e))
row_idx += 1
# make the diameter column editable
- for row in range(row_idx):
- self.ui.geo_tools_table.item(row, 1).setFlags(QtCore.Qt.ItemIsSelectable |
- QtCore.Qt.ItemIsEditable |
- QtCore.Qt.ItemIsEnabled)
+ # for row in range(row_idx):
+ # self.ui.geo_tools_table.item(row, 1).setFlags(QtCore.Qt.ItemIsSelectable |
+ # QtCore.Qt.ItemIsEditable |
+ # QtCore.Qt.ItemIsEnabled)
# sort the tool diameter column
# self.ui.geo_tools_table.sortItems(1)
@@ -306,17 +306,17 @@ class GeometryObject(FlatCAMObj, Geometry):
self.ui.geo_tools_table.setMaximumHeight(self.ui.geo_tools_table.getHeight())
# update UI for all rows - useful after units conversion but only if there is at least one row
- row_cnt = self.ui.geo_tools_table.rowCount()
- if row_cnt > 0:
- for r in range(row_cnt):
- self.update_ui(r)
+ # row_cnt = self.ui.geo_tools_table.rowCount()
+ # if row_cnt > 0:
+ # for r in range(row_cnt):
+ # self.update_ui(r)
# select only the first tool / row
selected_row = 0
try:
self.select_tools_table_row(selected_row, clearsel=True)
# update the Geometry UI
- self.update_ui()
+ # self.update_ui()
except Exception as e:
# when the tools table is empty there will be this error but once the table is populated it will go away
log.debug(str(e))
@@ -328,94 +328,94 @@ class GeometryObject(FlatCAMObj, Geometry):
else:
self.ui.geo_tools_table.setColumnHidden(6, False)
- self.set_tool_offset_visibility(selected_row)
+ # self.set_tool_offset_visibility(selected_row)
# #############################################################################################################
# ################################### Build Exclusion Areas section ###########################################
# #############################################################################################################
- self.ui_disconnect()
-
- e_len = len(self.app.exc_areas.exclusion_areas_storage)
- self.ui.exclusion_table.setRowCount(e_len)
-
- for area in range(e_len):
- area_dict = self.app.exc_areas.exclusion_areas_storage[area]
-
- area_id_item = QtWidgets.QTableWidgetItem('%d' % int(area_dict["idx"]))
- area_id_item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
- self.ui.exclusion_table.setItem(area, 0, area_id_item) # Area id
-
- object_item = QtWidgets.QTableWidgetItem('%s' % area_dict["obj_type"])
- object_item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
- self.ui.exclusion_table.setItem(area, 1, object_item) # Origin Object
-
- # strategy_item = QtWidgets.QTableWidgetItem('%s' % area_dict["strategy"])
- # strategy_item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
- strategy_item = FCComboBox2(policy=False)
- strategy_item.addItems([_("Around"), _("Over")])
- idx = 0 if area_dict["strategy"] == 'around' else 1
- # protection against having this translated or loading a project with translated values
- if idx == -1:
- strategy_item.setCurrentIndex(0)
- else:
- strategy_item.setCurrentIndex(idx)
- self.ui.exclusion_table.setCellWidget(area, 2, strategy_item) # Strategy
-
- overz_item = QtWidgets.QTableWidgetItem('%s' % area_dict["overz"])
- overz_item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
- self.ui.exclusion_table.setItem(area, 3, overz_item) # Over Z
-
- # make the Overz column editable
- for row in range(e_len):
- self.ui.exclusion_table.item(row, 3).setFlags(QtCore.Qt.ItemIsSelectable |
- QtCore.Qt.ItemIsEditable |
- QtCore.Qt.ItemIsEnabled)
-
- self.ui.exclusion_table.resizeColumnsToContents()
- self.ui.exclusion_table.resizeRowsToContents()
-
- area_vheader = self.ui.exclusion_table.verticalHeader()
- area_vheader.hide()
- self.ui.exclusion_table.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
-
- area_hheader = self.ui.exclusion_table.horizontalHeader()
- area_hheader.setMinimumSectionSize(10)
- area_hheader.setDefaultSectionSize(70)
-
- area_hheader.setSectionResizeMode(0, QtWidgets.QHeaderView.Fixed)
- area_hheader.resizeSection(0, 20)
- area_hheader.setSectionResizeMode(1, QtWidgets.QHeaderView.Stretch)
- area_hheader.setSectionResizeMode(2, QtWidgets.QHeaderView.ResizeToContents)
- area_hheader.setSectionResizeMode(3, QtWidgets.QHeaderView.ResizeToContents)
-
- # area_hheader.setStretchLastSection(True)
- self.ui.exclusion_table.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
-
- self.ui.exclusion_table.setColumnWidth(0, 20)
-
- self.ui.exclusion_table.setMinimumHeight(self.ui.exclusion_table.getHeight())
- self.ui.exclusion_table.setMaximumHeight(self.ui.exclusion_table.getHeight())
-
- # End Build Exclusion Areas
- # -----------------------------
-
- # HACK: for whatever reasons the name in Selected tab is reverted to the original one after a successful rename
- # done in the collection view but only for Geometry objects. Perhaps some references remains. Should be fixed.
- self.ui.name_entry.set_value(self.options['name'])
- self.ui_connect()
-
- self.ui.e_cut_entry.setDisabled(False) if self.ui.extracut_cb.get_value() else \
- self.ui.e_cut_entry.setDisabled(True)
-
- # set the text on tool_data_label after loading the object
- sel_rows = set()
- for it in self.ui.geo_tools_table.selectedItems():
- sel_rows.add(it.row())
-
- if len(sel_rows) > 1:
- self.ui.tool_data_label.setText(
- "%s: %s" % (_('Parameters for'), _("Multiple Tools"))
- )
+ # self.ui_disconnect()
+ #
+ # e_len = len(self.app.exc_areas.exclusion_areas_storage)
+ # self.ui.exclusion_table.setRowCount(e_len)
+ #
+ # for area in range(e_len):
+ # area_dict = self.app.exc_areas.exclusion_areas_storage[area]
+ #
+ # area_id_item = QtWidgets.QTableWidgetItem('%d' % int(area_dict["idx"]))
+ # area_id_item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
+ # self.ui.exclusion_table.setItem(area, 0, area_id_item) # Area id
+ #
+ # object_item = QtWidgets.QTableWidgetItem('%s' % area_dict["obj_type"])
+ # object_item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
+ # self.ui.exclusion_table.setItem(area, 1, object_item) # Origin Object
+ #
+ # # strategy_item = QtWidgets.QTableWidgetItem('%s' % area_dict["strategy"])
+ # # strategy_item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
+ # strategy_item = FCComboBox2(policy=False)
+ # strategy_item.addItems([_("Around"), _("Over")])
+ # idx = 0 if area_dict["strategy"] == 'around' else 1
+ # # protection against having this translated or loading a project with translated values
+ # if idx == -1:
+ # strategy_item.setCurrentIndex(0)
+ # else:
+ # strategy_item.setCurrentIndex(idx)
+ # self.ui.exclusion_table.setCellWidget(area, 2, strategy_item) # Strategy
+ #
+ # overz_item = QtWidgets.QTableWidgetItem('%s' % area_dict["overz"])
+ # overz_item.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
+ # self.ui.exclusion_table.setItem(area, 3, overz_item) # Over Z
+ #
+ # # make the Overz column editable
+ # for row in range(e_len):
+ # self.ui.exclusion_table.item(row, 3).setFlags(QtCore.Qt.ItemIsSelectable |
+ # QtCore.Qt.ItemIsEditable |
+ # QtCore.Qt.ItemIsEnabled)
+ #
+ # self.ui.exclusion_table.resizeColumnsToContents()
+ # self.ui.exclusion_table.resizeRowsToContents()
+ #
+ # area_vheader = self.ui.exclusion_table.verticalHeader()
+ # area_vheader.hide()
+ # self.ui.exclusion_table.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
+ #
+ # area_hheader = self.ui.exclusion_table.horizontalHeader()
+ # area_hheader.setMinimumSectionSize(10)
+ # area_hheader.setDefaultSectionSize(70)
+ #
+ # area_hheader.setSectionResizeMode(0, QtWidgets.QHeaderView.Fixed)
+ # area_hheader.resizeSection(0, 20)
+ # area_hheader.setSectionResizeMode(1, QtWidgets.QHeaderView.Stretch)
+ # area_hheader.setSectionResizeMode(2, QtWidgets.QHeaderView.ResizeToContents)
+ # area_hheader.setSectionResizeMode(3, QtWidgets.QHeaderView.ResizeToContents)
+ #
+ # # area_hheader.setStretchLastSection(True)
+ # self.ui.exclusion_table.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
+ #
+ # self.ui.exclusion_table.setColumnWidth(0, 20)
+ #
+ # self.ui.exclusion_table.setMinimumHeight(self.ui.exclusion_table.getHeight())
+ # self.ui.exclusion_table.setMaximumHeight(self.ui.exclusion_table.getHeight())
+ #
+ # # End Build Exclusion Areas
+ # # -----------------------------
+ #
+ # # HACK: for whatever reasons the name in Selected tab is reverted to the original one after a successful rename
+ # # done in the collection view but only for Geometry objects. Perhaps some references remains. Should be fixed.
+ # self.ui.name_entry.set_value(self.options['name'])
+ # self.ui_connect()
+ #
+ # self.ui.e_cut_entry.setDisabled(False) if self.ui.extracut_cb.get_value() else \
+ # self.ui.e_cut_entry.setDisabled(True)
+ #
+ # # set the text on tool_data_label after loading the object
+ # sel_rows = set()
+ # for it in self.ui.geo_tools_table.selectedItems():
+ # sel_rows.add(it.row())
+ #
+ # if len(sel_rows) > 1:
+ # self.ui.tool_data_label.setText(
+ # "%s: %s" % (_('Parameters for'), _("Multiple Tools"))
+ # )
def set_ui(self, ui):
# this one adds the 'name' key and the self.ui.name_entry widget in the self.form_fields dict
@@ -429,91 +429,91 @@ class GeometryObject(FlatCAMObj, Geometry):
self.units = self.app.defaults['units'].upper()
self.units_found = self.app.defaults['units']
- # make sure the preprocessor combobox is clear
- self.ui.pp_geometry_name_cb.clear()
- # populate preprocessor names in the combobox
- pp_list = []
- for name in list(self.app.preprocessors.keys()):
- pp_list.append(name)
- pp_list.sort()
- if 'default' in pp_list:
- pp_list.remove('default')
- pp_list.insert(0, 'default')
- self.ui.pp_geometry_name_cb.addItems(pp_list)
- # add tooltips
- for it in range(self.ui.pp_geometry_name_cb.count()):
- self.ui.pp_geometry_name_cb.setItemData(
- it, self.ui.pp_geometry_name_cb.itemText(it), QtCore.Qt.ToolTipRole)
+ # # make sure the preprocessor combobox is clear
+ # self.ui.pp_geometry_name_cb.clear()
+ # # populate preprocessor names in the combobox
+ # pp_list = []
+ # for name in list(self.app.preprocessors.keys()):
+ # pp_list.append(name)
+ # pp_list.sort()
+ # if 'default' in pp_list:
+ # pp_list.remove('default')
+ # pp_list.insert(0, 'default')
+ # self.ui.pp_geometry_name_cb.addItems(pp_list)
+ # # add tooltips
+ # for it in range(self.ui.pp_geometry_name_cb.count()):
+ # self.ui.pp_geometry_name_cb.setItemData(
+ # it, self.ui.pp_geometry_name_cb.itemText(it), QtCore.Qt.ToolTipRole)
self.form_fields.update({
"plot": self.ui.plot_cb,
"multicolored": self.ui.multicolored_cb,
- "cutz": self.ui.cutz_entry,
- "vtipdia": self.ui.tipdia_entry,
- "vtipangle": self.ui.tipangle_entry,
- "travelz": self.ui.travelz_entry,
- "feedrate": self.ui.cncfeedrate_entry,
- "feedrate_z": self.ui.feedrate_z_entry,
- "feedrate_rapid": self.ui.feedrate_rapid_entry,
- "spindlespeed": self.ui.cncspindlespeed_entry,
- "dwell": self.ui.dwell_cb,
- "dwelltime": self.ui.dwelltime_entry,
- "multidepth": self.ui.mpass_cb,
- "ppname_g": self.ui.pp_geometry_name_cb,
- "z_pdepth": self.ui.pdepth_entry,
- "feedrate_probe": self.ui.feedrate_probe_entry,
- "depthperpass": self.ui.maxdepth_entry,
- "extracut": self.ui.extracut_cb,
- "extracut_length": self.ui.e_cut_entry,
- "toolchange": self.ui.toolchangeg_cb,
- "toolchangez": self.ui.toolchangez_entry,
- "endz": self.ui.endz_entry,
- "endxy": self.ui.endxy_entry,
- "cnctooldia": self.ui.addtool_entry,
- "area_exclusion": self.ui.exclusion_cb,
- "area_shape": self.ui.area_shape_radio,
- "area_strategy": self.ui.strategy_radio,
- "area_overz": self.ui.over_z_entry,
- "polish": self.ui.polish_cb,
- "polish_dia": self.ui.polish_dia_entry,
- "polish_pressure": self.ui.polish_pressure_entry,
- "polish_travelz": self.ui.polish_travelz_entry,
- "polish_margin": self.ui.polish_margin_entry,
- "polish_overlap": self.ui.polish_over_entry,
- "polish_method": self.ui.polish_method_combo,
+ # "cutz": self.ui.cutz_entry,
+ # "vtipdia": self.ui.tipdia_entry,
+ # "vtipangle": self.ui.tipangle_entry,
+ # "travelz": self.ui.travelz_entry,
+ # "feedrate": self.ui.cncfeedrate_entry,
+ # "feedrate_z": self.ui.feedrate_z_entry,
+ # "feedrate_rapid": self.ui.feedrate_rapid_entry,
+ # "spindlespeed": self.ui.cncspindlespeed_entry,
+ # "dwell": self.ui.dwell_cb,
+ # "dwelltime": self.ui.dwelltime_entry,
+ # "multidepth": self.ui.mpass_cb,
+ # "ppname_g": self.ui.pp_geometry_name_cb,
+ # "z_pdepth": self.ui.pdepth_entry,
+ # "feedrate_probe": self.ui.feedrate_probe_entry,
+ # "depthperpass": self.ui.maxdepth_entry,
+ # "extracut": self.ui.extracut_cb,
+ # "extracut_length": self.ui.e_cut_entry,
+ # "toolchange": self.ui.toolchangeg_cb,
+ # "toolchangez": self.ui.toolchangez_entry,
+ # "endz": self.ui.endz_entry,
+ # "endxy": self.ui.endxy_entry,
+ # "cnctooldia": self.ui.addtool_entry,
+ # "area_exclusion": self.ui.exclusion_cb,
+ # "area_shape": self.ui.area_shape_radio,
+ # "area_strategy": self.ui.strategy_radio,
+ # "area_overz": self.ui.over_z_entry,
+ # "polish": self.ui.polish_cb,
+ # "polish_dia": self.ui.polish_dia_entry,
+ # "polish_pressure": self.ui.polish_pressure_entry,
+ # "polish_travelz": self.ui.polish_travelz_entry,
+ # "polish_margin": self.ui.polish_margin_entry,
+ # "polish_overlap": self.ui.polish_over_entry,
+ # "polish_method": self.ui.polish_method_combo,
})
- self.param_fields.update({
- "vtipdia": self.ui.tipdia_entry,
- "vtipangle": self.ui.tipangle_entry,
- "cutz": self.ui.cutz_entry,
- "depthperpass": self.ui.maxdepth_entry,
- "multidepth": self.ui.mpass_cb,
- "travelz": self.ui.travelz_entry,
- "feedrate": self.ui.cncfeedrate_entry,
- "feedrate_z": self.ui.feedrate_z_entry,
- "feedrate_rapid": self.ui.feedrate_rapid_entry,
- "extracut": self.ui.extracut_cb,
- "extracut_length": self.ui.e_cut_entry,
- "spindlespeed": self.ui.cncspindlespeed_entry,
- "dwelltime": self.ui.dwelltime_entry,
- "dwell": self.ui.dwell_cb,
- "pdepth": self.ui.pdepth_entry,
- "pfeedrate": self.ui.feedrate_probe_entry,
- })
+ # self.param_fields.update({
+ # "vtipdia": self.ui.tipdia_entry,
+ # "vtipangle": self.ui.tipangle_entry,
+ # "cutz": self.ui.cutz_entry,
+ # "depthperpass": self.ui.maxdepth_entry,
+ # "multidepth": self.ui.mpass_cb,
+ # "travelz": self.ui.travelz_entry,
+ # "feedrate": self.ui.cncfeedrate_entry,
+ # "feedrate_z": self.ui.feedrate_z_entry,
+ # "feedrate_rapid": self.ui.feedrate_rapid_entry,
+ # "extracut": self.ui.extracut_cb,
+ # "extracut_length": self.ui.e_cut_entry,
+ # "spindlespeed": self.ui.cncspindlespeed_entry,
+ # "dwelltime": self.ui.dwelltime_entry,
+ # "dwell": self.ui.dwell_cb,
+ # "pdepth": self.ui.pdepth_entry,
+ # "pfeedrate": self.ui.feedrate_probe_entry,
+ # })
# Fill form fields only on object create
self.to_form()
# update the changes in UI depending on the selected preprocessor in Preferences
# after this moment all the changes in the Posprocessor combo will be handled by the activated signal of the
# self.ui.pp_geometry_name_cb combobox
- self.on_pp_changed()
+ # self.on_pp_changed()
- self.ui.tipdialabel.hide()
- self.ui.tipdia_entry.hide()
- self.ui.tipanglelabel.hide()
- self.ui.tipangle_entry.hide()
- self.ui.cutz_entry.setDisabled(False)
+ # self.ui.tipdialabel.hide()
+ # self.ui.tipdia_entry.hide()
+ # self.ui.tipanglelabel.hide()
+ # self.ui.tipangle_entry.hide()
+ # self.ui.cutz_entry.setDisabled(False)
# store here the default data for Geometry Data
self.default_data = {}
@@ -531,53 +531,53 @@ class GeometryObject(FlatCAMObj, Geometry):
# if def_key == opt_key:
# self.default_data[def_key] = deepcopy(opt_val)
- if type(self.options["cnctooldia"]) == float:
- tools_list = [self.options["cnctooldia"]]
- else:
- try:
- temp_tools = self.options["cnctooldia"].split(",")
- tools_list = [
- float(eval(dia)) for dia in temp_tools if dia != ''
- ]
- except Exception as e:
- log.error("GeometryObject.set_ui() -> At least one tool diameter needed. "
- "Verify in Edit -> Preferences -> Geometry General -> Tool dia. %s" % str(e))
- return
+ # if type(self.options["cnctooldia"]) == float:
+ # tools_list = [self.options["cnctooldia"]]
+ # else:
+ # try:
+ # temp_tools = self.options["cnctooldia"].split(",")
+ # tools_list = [
+ # float(eval(dia)) for dia in temp_tools if dia != ''
+ # ]
+ # except Exception as e:
+ # log.error("GeometryObject.set_ui() -> At least one tool diameter needed. "
+ # "Verify in Edit -> Preferences -> Geometry General -> Tool dia. %s" % str(e))
+ # return
- self.tooluid += 1
-
- if not self.tools:
- for toold in tools_list:
- new_data = deepcopy(self.default_data)
- self.tools.update({
- self.tooluid: {
- 'tooldia': self.app.dec_format(float(toold), self.decimals),
- 'offset': 'Path',
- 'offset_value': 0.0,
- 'type': 'Rough',
- 'tool_type': self.tool_type,
- 'data': new_data,
- 'solid_geometry': self.solid_geometry
- }
- })
- self.tooluid += 1
- else:
- # if self.tools is not empty then it can safely be assumed that it comes from an opened project.
- # Because of the serialization the self.tools list on project save, the dict keys (members of self.tools
- # are each a dict) are turned into strings so we rebuild the self.tools elements so the keys are
- # again float type; dict's don't like having keys changed when iterated through therefore the need for the
- # following convoluted way of changing the keys from string to float type
- temp_tools = {}
- for tooluid_key in self.tools:
- val = deepcopy(self.tools[tooluid_key])
- new_key = deepcopy(int(tooluid_key))
- temp_tools[new_key] = val
-
- self.tools.clear()
- self.tools = deepcopy(temp_tools)
-
- self.ui.tool_offset_entry.hide()
- self.ui.tool_offset_lbl.hide()
+ # self.tooluid += 1
+ #
+ # if not self.tools:
+ # for toold in tools_list:
+ # new_data = deepcopy(self.default_data)
+ # self.tools.update({
+ # self.tooluid: {
+ # 'tooldia': self.app.dec_format(float(toold), self.decimals),
+ # 'offset': 'Path',
+ # 'offset_value': 0.0,
+ # 'type': 'Rough',
+ # 'tool_type': self.tool_type,
+ # 'data': new_data,
+ # 'solid_geometry': self.solid_geometry
+ # }
+ # })
+ # self.tooluid += 1
+ # else:
+ # # if self.tools is not empty then it can safely be assumed that it comes from an opened project.
+ # # Because of the serialization the self.tools list on project save, the dict keys (members of self.tools
+ # # are each a dict) are turned into strings so we rebuild the self.tools elements so the keys are
+ # # again float type; dict's don't like having keys changed when iterated through therefore the need for the
+ # # following convoluted way of changing the keys from string to float type
+ # temp_tools = {}
+ # for tooluid_key in self.tools:
+ # val = deepcopy(self.tools[tooluid_key])
+ # new_key = deepcopy(int(tooluid_key))
+ # temp_tools[new_key] = val
+ #
+ # self.tools.clear()
+ # self.tools = deepcopy(temp_tools)
+ #
+ # self.ui.tool_offset_entry.hide()
+ # self.ui.tool_offset_lbl.hide()
# used to store the state of the mpass_cb if the selected preprocessor for geometry is hpgl
self.old_pp_state = self.default_data['multidepth']
@@ -590,58 +590,61 @@ class GeometryObject(FlatCAMObj, Geometry):
# #############################################################################################################
# ############################### TOOLS TABLE context menu ####################################################
# #############################################################################################################
- self.ui.geo_tools_table.setupContextMenu()
- self.ui.geo_tools_table.addContextMenu(
- _("Pick from DB"), self.on_tool_add_from_db_clicked,
- icon=QtGui.QIcon(self.app.resource_location + "/plus16.png"))
- self.ui.geo_tools_table.addContextMenu(
- _("Copy"), self.on_tool_copy,
- icon=QtGui.QIcon(self.app.resource_location + "/copy16.png"))
- self.ui.geo_tools_table.addContextMenu(
- _("Delete"), lambda: self.on_tool_delete(clicked_signal=None, all_tools=None),
- icon=QtGui.QIcon(self.app.resource_location + "/trash16.png"))
+ # self.ui.geo_tools_table.setupContextMenu()
+ # self.ui.geo_tools_table.addContextMenu(
+ # _("Pick from DB"), self.on_tool_add_from_db_clicked,
+ # icon=QtGui.QIcon(self.app.resource_location + "/plus16.png"))
+ # self.ui.geo_tools_table.addContextMenu(
+ # _("Copy"), self.on_tool_copy,
+ # icon=QtGui.QIcon(self.app.resource_location + "/copy16.png"))
+ # self.ui.geo_tools_table.addContextMenu(
+ # _("Delete"), lambda: self.on_tool_delete(clicked_signal=None, all_tools=None),
+ # icon=QtGui.QIcon(self.app.resource_location + "/trash16.png"))
# #############################################################################################################
# ############################## EXCLUSION TABLE context menu #################################################
# #############################################################################################################
- self.ui.exclusion_table.setupContextMenu()
- self.ui.exclusion_table.addContextMenu(
- _("Delete"), self.on_delete_sel_areas, icon=QtGui.QIcon(self.app.resource_location + "/trash16.png")
- )
+ # self.ui.exclusion_table.setupContextMenu()
+ # self.ui.exclusion_table.addContextMenu(
+ # _("Delete"), self.on_delete_sel_areas, icon=QtGui.QIcon(self.app.resource_location + "/trash16.png")
+ # )
# Show/Hide Advanced Options
- if self.app.defaults["global_app_level"] == 'b':
- self.ui.level.setText('%s' % _('Basic'))
+ # if self.app.defaults["global_app_level"] == 'b':
+ # self.ui.level.setText('%s' % _('Basic'))
+ #
+ # self.ui.geo_tools_table.setColumnHidden(2, True)
+ # self.ui.geo_tools_table.setColumnHidden(3, True)
+ # # self.ui.geo_tools_table.setColumnHidden(4, True)
+ # self.ui.addtool_entry_lbl.hide()
+ # self.ui.addtool_entry.hide()
+ # self.ui.search_and_add_btn.hide()
+ # self.ui.deltool_btn.hide()
+ # # self.ui.endz_label.hide()
+ # # self.ui.endz_entry.hide()
+ # self.ui.fr_rapidlabel.hide()
+ # self.ui.feedrate_rapid_entry.hide()
+ # self.ui.extracut_cb.hide()
+ # self.ui.e_cut_entry.hide()
+ # self.ui.pdepth_label.hide()
+ # self.ui.pdepth_entry.hide()
+ # self.ui.feedrate_probe_label.hide()
+ # self.ui.feedrate_probe_entry.hide()
+ # else:
+ # self.ui.level.setText('%s' % _('Advanced'))
- self.ui.geo_tools_table.setColumnHidden(2, True)
- self.ui.geo_tools_table.setColumnHidden(3, True)
- # self.ui.geo_tools_table.setColumnHidden(4, True)
- self.ui.addtool_entry_lbl.hide()
- self.ui.addtool_entry.hide()
- self.ui.search_and_add_btn.hide()
- self.ui.deltool_btn.hide()
- # self.ui.endz_label.hide()
- # self.ui.endz_entry.hide()
- self.ui.fr_rapidlabel.hide()
- self.ui.feedrate_rapid_entry.hide()
- self.ui.extracut_cb.hide()
- self.ui.e_cut_entry.hide()
- self.ui.pdepth_label.hide()
- self.ui.pdepth_entry.hide()
- self.ui.feedrate_probe_label.hide()
- self.ui.feedrate_probe_entry.hide()
- else:
- self.ui.level.setText('%s' % _('Advanced'))
+ self.ui.geo_tools_table.setColumnHidden(2, True)
+ self.ui.geo_tools_table.setColumnHidden(3, True)
# #############################################################################################################
# ################################ Signals Connection #########################################################
# #############################################################################################################
- self.builduiSig.connect(self.build_ui)
-
- self.ui.e_cut_entry.setDisabled(False) if self.app.defaults['geometry_extracut'] else \
- self.ui.e_cut_entry.setDisabled(True)
- self.ui.extracut_cb.toggled.connect(lambda state: self.ui.e_cut_entry.setDisabled(not state))
-
+ # self.builduiSig.connect(self.build_ui)
+ #
+ # self.ui.e_cut_entry.setDisabled(False) if self.app.defaults['geometry_extracut'] else \
+ # self.ui.e_cut_entry.setDisabled(True)
+ # self.ui.extracut_cb.toggled.connect(lambda state: self.ui.e_cut_entry.setDisabled(not state))
+ #
# Plot state signals
# self.ui.plot_cb.stateChanged.connect(self.on_plot_cb_click)
self.ui.multicolored_cb.stateChanged.connect(self.on_multicolored_cb_click)
@@ -653,37 +656,37 @@ class GeometryObject(FlatCAMObj, Geometry):
self.ui.properties_button.toggled.connect(self.on_properties)
self.calculations_finished.connect(self.update_area_chull)
- # Buttons Signals
- self.ui.generate_cnc_button.clicked.connect(self.on_generatecnc_button_click)
+ # # Buttons Signals
+ # self.ui.generate_cnc_button.clicked.connect(self.on_generatecnc_button_click)
self.ui.paint_tool_button.clicked.connect(lambda: self.app.paint_tool.run(toggle=True))
self.ui.generate_ncc_button.clicked.connect(lambda: self.app.ncclear_tool.run(toggle=True))
self.ui.milling_button.clicked.connect(self.on_milling_button_clicked)
- # Postprocessor change
- self.ui.pp_geometry_name_cb.activated.connect(self.on_pp_changed)
-
- # V tool shape params changed
- self.ui.tipdia_entry.valueChanged.connect(self.on_update_cutz)
- self.ui.tipangle_entry.valueChanged.connect(self.on_update_cutz)
-
- self.ui.addtool_from_db_btn.clicked.connect(self.on_tool_add_from_db_clicked)
- self.ui.apply_param_to_all.clicked.connect(self.on_apply_param_to_all_clicked)
- self.ui.cutz_entry.returnPressed.connect(self.on_cut_z_changed)
-
- # Exclusion areas signals
- self.ui.exclusion_table.horizontalHeader().sectionClicked.connect(self.on_exclusion_table_toggle_all)
- self.ui.exclusion_table.lost_focus.connect(self.on_clear_selection)
- self.ui.exclusion_table.itemClicked.connect(self.on_draw_sel_shape)
- self.ui.add_area_button.clicked.connect(self.on_add_area_click)
- self.ui.delete_area_button.clicked.connect(self.on_clear_area_click)
- self.ui.delete_sel_area_button.clicked.connect(self.on_delete_sel_areas)
- self.ui.strategy_radio.activated_custom.connect(self.on_strategy)
-
- # Tools Table signals
- self.ui.geo_tools_table.drag_drop_sig.connect(self.on_rebuild_ui)
- self.ui.geo_tools_table.horizontalHeader().sectionClicked.connect(self.on_toggle_all_rows)
-
- self.launch_job.connect(self.mtool_gen_cncjob)
+ # # Postprocessor change
+ # self.ui.pp_geometry_name_cb.activated.connect(self.on_pp_changed)
+ #
+ # # V tool shape params changed
+ # self.ui.tipdia_entry.valueChanged.connect(self.on_update_cutz)
+ # self.ui.tipangle_entry.valueChanged.connect(self.on_update_cutz)
+ #
+ # self.ui.addtool_from_db_btn.clicked.connect(self.on_tool_add_from_db_clicked)
+ # self.ui.apply_param_to_all.clicked.connect(self.on_apply_param_to_all_clicked)
+ # self.ui.cutz_entry.returnPressed.connect(self.on_cut_z_changed)
+ #
+ # # Exclusion areas signals
+ # self.ui.exclusion_table.horizontalHeader().sectionClicked.connect(self.on_exclusion_table_toggle_all)
+ # self.ui.exclusion_table.lost_focus.connect(self.on_clear_selection)
+ # self.ui.exclusion_table.itemClicked.connect(self.on_draw_sel_shape)
+ # self.ui.add_area_button.clicked.connect(self.on_add_area_click)
+ # self.ui.delete_area_button.clicked.connect(self.on_clear_area_click)
+ # self.ui.delete_sel_area_button.clicked.connect(self.on_delete_sel_areas)
+ # self.ui.strategy_radio.activated_custom.connect(self.on_strategy)
+ #
+ # # Tools Table signals
+ # self.ui.geo_tools_table.drag_drop_sig.connect(self.on_rebuild_ui)
+ # self.ui.geo_tools_table.horizontalHeader().sectionClicked.connect(self.on_toggle_all_rows)
+ #
+ # self.launch_job.connect(self.mtool_gen_cncjob)
def on_properties(self, state):
if state:
@@ -776,33 +779,33 @@ class GeometryObject(FlatCAMObj, Geometry):
def ui_connect(self):
# on any change to the widgets that matter it will be called self.gui_form_to_storage which will save the
# changes in geometry UI
- for i in self.param_fields:
- current_widget = self.param_fields[i]
-
- if isinstance(current_widget, FCCheckBox):
- current_widget.stateChanged.connect(self.gui_form_to_storage)
- elif isinstance(current_widget, FCComboBox):
- current_widget.currentIndexChanged.connect(self.gui_form_to_storage)
- elif isinstance(current_widget, FloatEntry) or isinstance(current_widget, LengthEntry) or \
- isinstance(current_widget, FCEntry) or isinstance(current_widget, IntEntry) or \
- isinstance(current_widget, NumericalEvalTupleEntry):
- current_widget.editingFinished.connect(self.gui_form_to_storage)
- elif isinstance(current_widget, FCSpinner) or isinstance(current_widget, FCDoubleSpinner):
- current_widget.returnPressed.connect(self.gui_form_to_storage)
-
- for row in range(self.ui.geo_tools_table.rowCount()):
- for col in [2, 3, 4]:
- self.ui.geo_tools_table.cellWidget(row, col).currentIndexChanged.connect(
- self.on_tooltable_cellwidget_change)
-
- self.ui.search_and_add_btn.clicked.connect(self.on_tool_add)
- self.ui.deltool_btn.clicked.connect(self.on_tool_delete)
+ # for i in self.param_fields:
+ # current_widget = self.param_fields[i]
+ #
+ # if isinstance(current_widget, FCCheckBox):
+ # current_widget.stateChanged.connect(self.gui_form_to_storage)
+ # elif isinstance(current_widget, FCComboBox):
+ # current_widget.currentIndexChanged.connect(self.gui_form_to_storage)
+ # elif isinstance(current_widget, FloatEntry) or isinstance(current_widget, LengthEntry) or \
+ # isinstance(current_widget, FCEntry) or isinstance(current_widget, IntEntry) or \
+ # isinstance(current_widget, NumericalEvalTupleEntry):
+ # current_widget.editingFinished.connect(self.gui_form_to_storage)
+ # elif isinstance(current_widget, FCSpinner) or isinstance(current_widget, FCDoubleSpinner):
+ # current_widget.returnPressed.connect(self.gui_form_to_storage)
+ #
+ # for row in range(self.ui.geo_tools_table.rowCount()):
+ # for col in [2, 3, 4]:
+ # self.ui.geo_tools_table.cellWidget(row, col).currentIndexChanged.connect(
+ # self.on_tooltable_cellwidget_change)
+ #
+ # self.ui.search_and_add_btn.clicked.connect(self.on_tool_add)
+ # self.ui.deltool_btn.clicked.connect(self.on_tool_delete)
# Tools Table
- self.ui.geo_tools_table.clicked.connect(self.on_row_selection_change)
- self.ui.geo_tools_table.itemChanged.connect(self.on_tool_edit)
-
- self.ui.tool_offset_entry.returnPressed.connect(self.on_offset_value_edited)
+ # self.ui.geo_tools_table.clicked.connect(self.on_row_selection_change)
+ # self.ui.geo_tools_table.itemChanged.connect(self.on_tool_edit)
+ #
+ # self.ui.tool_offset_entry.returnPressed.connect(self.on_offset_value_edited)
for row in range(self.ui.geo_tools_table.rowCount()):
self.ui.geo_tools_table.cellWidget(row, 6).clicked.connect(self.on_plot_cb_click_table)
@@ -810,82 +813,82 @@ class GeometryObject(FlatCAMObj, Geometry):
self.ui.plot_cb.stateChanged.connect(self.on_plot_cb_click)
# Exclusion Table widgets connect
- for row in range(self.ui.exclusion_table.rowCount()):
- self.ui.exclusion_table.cellWidget(row, 2).currentIndexChanged.connect(self.on_exclusion_table_strategy)
-
- self.ui.exclusion_table.itemChanged.connect(self.on_exclusion_table_overz)
+ # for row in range(self.ui.exclusion_table.rowCount()):
+ # self.ui.exclusion_table.cellWidget(row, 2).currentIndexChanged.connect(self.on_exclusion_table_strategy)
+ #
+ # self.ui.exclusion_table.itemChanged.connect(self.on_exclusion_table_overz)
# common parameters update
- self.ui.toolchangeg_cb.stateChanged.connect(self.update_common_param_in_storage)
- self.ui.toolchangez_entry.editingFinished.connect(self.update_common_param_in_storage)
- self.ui.endz_entry.editingFinished.connect(self.update_common_param_in_storage)
- self.ui.endxy_entry.editingFinished.connect(self.update_common_param_in_storage)
- self.ui.pp_geometry_name_cb.currentIndexChanged.connect(self.update_common_param_in_storage)
- self.ui.exclusion_cb.stateChanged.connect(self.update_common_param_in_storage)
- self.ui.polish_cb.stateChanged.connect(self.update_common_param_in_storage)
+ # self.ui.toolchangeg_cb.stateChanged.connect(self.update_common_param_in_storage)
+ # self.ui.toolchangez_entry.editingFinished.connect(self.update_common_param_in_storage)
+ # self.ui.endz_entry.editingFinished.connect(self.update_common_param_in_storage)
+ # self.ui.endxy_entry.editingFinished.connect(self.update_common_param_in_storage)
+ # self.ui.pp_geometry_name_cb.currentIndexChanged.connect(self.update_common_param_in_storage)
+ # self.ui.exclusion_cb.stateChanged.connect(self.update_common_param_in_storage)
+ # self.ui.polish_cb.stateChanged.connect(self.update_common_param_in_storage)
def ui_disconnect(self):
# on any change to the widgets that matter it will be called self.gui_form_to_storage which will save the
# changes in geometry UI
- for i in self.param_fields:
- # current_widget = self.ui.grid3.itemAt(i).widget()
- current_widget = self.param_fields[i]
- if isinstance(current_widget, FCCheckBox):
- try:
- current_widget.stateChanged.disconnect(self.gui_form_to_storage)
- except (TypeError, AttributeError):
- pass
- elif isinstance(current_widget, FCComboBox):
- try:
- current_widget.currentIndexChanged.disconnect(self.gui_form_to_storage)
- except (TypeError, AttributeError):
- pass
- elif isinstance(current_widget, LengthEntry) or isinstance(current_widget, IntEntry) or \
- isinstance(current_widget, FCEntry) or isinstance(current_widget, FloatEntry) or \
- isinstance(current_widget, NumericalEvalTupleEntry):
- try:
- current_widget.editingFinished.disconnect(self.gui_form_to_storage)
- except (TypeError, AttributeError):
- pass
- elif isinstance(current_widget, FCSpinner) or isinstance(current_widget, FCDoubleSpinner):
- try:
- current_widget.returnPressed.disconnect(self.gui_form_to_storage)
- except TypeError:
- pass
+ # for i in self.param_fields:
+ # # current_widget = self.ui.grid3.itemAt(i).widget()
+ # current_widget = self.param_fields[i]
+ # if isinstance(current_widget, FCCheckBox):
+ # try:
+ # current_widget.stateChanged.disconnect(self.gui_form_to_storage)
+ # except (TypeError, AttributeError):
+ # pass
+ # elif isinstance(current_widget, FCComboBox):
+ # try:
+ # current_widget.currentIndexChanged.disconnect(self.gui_form_to_storage)
+ # except (TypeError, AttributeError):
+ # pass
+ # elif isinstance(current_widget, LengthEntry) or isinstance(current_widget, IntEntry) or \
+ # isinstance(current_widget, FCEntry) or isinstance(current_widget, FloatEntry) or \
+ # isinstance(current_widget, NumericalEvalTupleEntry):
+ # try:
+ # current_widget.editingFinished.disconnect(self.gui_form_to_storage)
+ # except (TypeError, AttributeError):
+ # pass
+ # elif isinstance(current_widget, FCSpinner) or isinstance(current_widget, FCDoubleSpinner):
+ # try:
+ # current_widget.returnPressed.disconnect(self.gui_form_to_storage)
+ # except TypeError:
+ # pass
# disconnect FCCombobox widgets in the Tool Table
- for row in range(self.ui.geo_tools_table.rowCount()):
- for col in [2, 3, 4]:
- try:
- self.ui.geo_tools_table.cellWidget(row, col).currentIndexChanged.disconnect()
- except (TypeError, AttributeError):
- pass
+ # for row in range(self.ui.geo_tools_table.rowCount()):
+ # for col in [2, 3, 4]:
+ # try:
+ # self.ui.geo_tools_table.cellWidget(row, col).currentIndexChanged.disconnect()
+ # except (TypeError, AttributeError):
+ # pass
- try:
- self.ui.search_and_add_btn.clicked.disconnect()
- except (TypeError, AttributeError):
- pass
+ # try:
+ # self.ui.search_and_add_btn.clicked.disconnect()
+ # except (TypeError, AttributeError):
+ # pass
+ #
+ # try:
+ # self.ui.deltool_btn.clicked.disconnect()
+ # except (TypeError, AttributeError):
+ # pass
- try:
- self.ui.deltool_btn.clicked.disconnect()
- except (TypeError, AttributeError):
- pass
-
- try:
- self.ui.geo_tools_table.clicked.disconnect()
- except (TypeError, AttributeError):
- pass
-
- try:
- self.ui.geo_tools_table.itemChanged.disconnect()
- except (TypeError, AttributeError):
- pass
-
- try:
- self.ui.tool_offset_entry.returnPressed.disconnect()
- except (TypeError, AttributeError):
- pass
+ # try:
+ # self.ui.geo_tools_table.clicked.disconnect()
+ # except (TypeError, AttributeError):
+ # pass
+ #
+ # try:
+ # self.ui.geo_tools_table.itemChanged.disconnect()
+ # except (TypeError, AttributeError):
+ # pass
+ #
+ # try:
+ # self.ui.tool_offset_entry.returnPressed.disconnect()
+ # except (TypeError, AttributeError):
+ # pass
for row in range(self.ui.geo_tools_table.rowCount()):
try:
@@ -899,48 +902,48 @@ class GeometryObject(FlatCAMObj, Geometry):
pass
# common parameters update
- try:
- self.ui.toolchangeg_cb.stateChanged.disconnect(self.update_common_param_in_storage)
- except (TypeError, AttributeError):
- pass
- try:
- self.ui.toolchangez_entry.editingFinished.disconnect(self.update_common_param_in_storage)
- except (TypeError, AttributeError):
- pass
- try:
- self.ui.endz_entry.editingFinished.disconnect(self.update_common_param_in_storage)
- except (TypeError, AttributeError):
- pass
- try:
- self.ui.endxy_entry.editingFinished.disconnect(self.update_common_param_in_storage)
- except (TypeError, AttributeError):
- pass
- try:
- self.ui.pp_geometry_name_cb.currentIndexChanged.disconnect(self.update_common_param_in_storage)
- except (TypeError, AttributeError):
- pass
-
- try:
- self.ui.polish_cb.stateChanged.disconnect(self.update_common_param_in_storage)
- except (TypeError, AttributeError):
- pass
-
- try:
- self.ui.exclusion_cb.stateChanged.disconnect(self.update_common_param_in_storage)
- except (TypeError, AttributeError):
- pass
-
- # Exclusion Table widgets disconnect
- for row in range(self.ui.exclusion_table.rowCount()):
- try:
- self.ui.exclusion_table.cellWidget(row, 2).currentIndexChanged.disconnect()
- except (TypeError, AttributeError):
- pass
-
- try:
- self.ui.exclusion_table.itemChanged.disconnect()
- except (TypeError, AttributeError):
- pass
+ # try:
+ # self.ui.toolchangeg_cb.stateChanged.disconnect(self.update_common_param_in_storage)
+ # except (TypeError, AttributeError):
+ # pass
+ # try:
+ # self.ui.toolchangez_entry.editingFinished.disconnect(self.update_common_param_in_storage)
+ # except (TypeError, AttributeError):
+ # pass
+ # try:
+ # self.ui.endz_entry.editingFinished.disconnect(self.update_common_param_in_storage)
+ # except (TypeError, AttributeError):
+ # pass
+ # try:
+ # self.ui.endxy_entry.editingFinished.disconnect(self.update_common_param_in_storage)
+ # except (TypeError, AttributeError):
+ # pass
+ # try:
+ # self.ui.pp_geometry_name_cb.currentIndexChanged.disconnect(self.update_common_param_in_storage)
+ # except (TypeError, AttributeError):
+ # pass
+ #
+ # try:
+ # self.ui.polish_cb.stateChanged.disconnect(self.update_common_param_in_storage)
+ # except (TypeError, AttributeError):
+ # pass
+ #
+ # try:
+ # self.ui.exclusion_cb.stateChanged.disconnect(self.update_common_param_in_storage)
+ # except (TypeError, AttributeError):
+ # pass
+ #
+ # # Exclusion Table widgets disconnect
+ # for row in range(self.ui.exclusion_table.rowCount()):
+ # try:
+ # self.ui.exclusion_table.cellWidget(row, 2).currentIndexChanged.disconnect()
+ # except (TypeError, AttributeError):
+ # pass
+ #
+ # try:
+ # self.ui.exclusion_table.itemChanged.disconnect()
+ # except (TypeError, AttributeError):
+ # pass
def on_toggle_all_rows(self):
"""