|
@@ -37,7 +37,7 @@ class ObjectUI(QtWidgets.QWidget):
|
|
|
|
|
|
|
|
def __init__(self, app, icon_file='share/flatcam_icon32.png', title=_('FlatCAM Object'), parent=None, common=True):
|
|
def __init__(self, app, icon_file='share/flatcam_icon32.png', title=_('FlatCAM Object'), parent=None, common=True):
|
|
|
QtWidgets.QWidget.__init__(self, parent=parent)
|
|
QtWidgets.QWidget.__init__(self, parent=parent)
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
self.app = app
|
|
self.app = app
|
|
|
self.decimals = app.decimals
|
|
self.decimals = app.decimals
|
|
|
|
|
|
|
@@ -1427,6 +1427,7 @@ class GeometryObjectUI(ObjectUI):
|
|
|
# ## Object name
|
|
# ## Object name
|
|
|
self.name_hlay = QtWidgets.QHBoxLayout()
|
|
self.name_hlay = QtWidgets.QHBoxLayout()
|
|
|
self.custom_box.addLayout(self.name_hlay)
|
|
self.custom_box.addLayout(self.name_hlay)
|
|
|
|
|
+
|
|
|
name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
|
|
name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
|
|
|
self.name_entry = FCEntry()
|
|
self.name_entry = FCEntry()
|
|
|
self.name_entry.setFocusPolicy(QtCore.Qt.StrongFocus)
|
|
self.name_entry.setFocusPolicy(QtCore.Qt.StrongFocus)
|
|
@@ -1438,12 +1439,25 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.geo_tools_frame = QtWidgets.QFrame()
|
|
self.geo_tools_frame = QtWidgets.QFrame()
|
|
|
self.geo_tools_frame.setContentsMargins(0, 0, 0, 0)
|
|
self.geo_tools_frame.setContentsMargins(0, 0, 0, 0)
|
|
|
self.custom_box.addWidget(self.geo_tools_frame)
|
|
self.custom_box.addWidget(self.geo_tools_frame)
|
|
|
|
|
+
|
|
|
self.geo_tools_box = QtWidgets.QVBoxLayout()
|
|
self.geo_tools_box = QtWidgets.QVBoxLayout()
|
|
|
self.geo_tools_box.setContentsMargins(0, 0, 0, 0)
|
|
self.geo_tools_box.setContentsMargins(0, 0, 0, 0)
|
|
|
self.geo_tools_frame.setLayout(self.geo_tools_box)
|
|
self.geo_tools_frame.setLayout(self.geo_tools_box)
|
|
|
|
|
|
|
|
- hlay_plot = QtWidgets.QHBoxLayout()
|
|
|
|
|
- self.geo_tools_box.addLayout(hlay_plot)
|
|
|
|
|
|
|
+ # ************************************************************************
|
|
|
|
|
+ # ************** TABLE BOX FRAME *****************************************
|
|
|
|
|
+ # ************************************************************************
|
|
|
|
|
+ self.geo_table_frame = QtWidgets.QFrame()
|
|
|
|
|
+ self.geo_table_frame.setContentsMargins(0, 0, 0, 0)
|
|
|
|
|
+ self.geo_tools_box.addWidget(self.geo_table_frame)
|
|
|
|
|
+ self.geo_table_box = QtWidgets.QVBoxLayout()
|
|
|
|
|
+ self.geo_table_box.setContentsMargins(0, 0, 0, 0)
|
|
|
|
|
+ self.geo_table_frame.setLayout(self.geo_table_box)
|
|
|
|
|
+
|
|
|
|
|
+ grid0 = QtWidgets.QGridLayout()
|
|
|
|
|
+ self.geo_table_box.addLayout(grid0)
|
|
|
|
|
+ grid0.setColumnStretch(0, 0)
|
|
|
|
|
+ grid0.setColumnStretch(1, 1)
|
|
|
|
|
|
|
|
# ### Tools ####
|
|
# ### Tools ####
|
|
|
self.tools_table_label = QtWidgets.QLabel('<b>%s:</b>' % _('Tools Table'))
|
|
self.tools_table_label = QtWidgets.QLabel('<b>%s:</b>' % _('Tools Table'))
|
|
@@ -1461,7 +1475,7 @@ class GeometryObjectUI(ObjectUI):
|
|
|
"grayed out and Cut Z is automatically calculated from the newly \n"
|
|
"grayed out and Cut Z is automatically calculated from the newly \n"
|
|
|
"showed UI form entries named V-Tip Dia and V-Tip Angle.")
|
|
"showed UI form entries named V-Tip Dia and V-Tip Angle.")
|
|
|
)
|
|
)
|
|
|
- hlay_plot.addWidget(self.tools_table_label)
|
|
|
|
|
|
|
+ grid0.addWidget(self.tools_table_label, 0, 0)
|
|
|
|
|
|
|
|
# Plot CB
|
|
# Plot CB
|
|
|
# self.plot_cb = QtWidgets.QCheckBox('Plot')
|
|
# self.plot_cb = QtWidgets.QCheckBox('Plot')
|
|
@@ -1470,11 +1484,10 @@ class GeometryObjectUI(ObjectUI):
|
|
|
_("Plot (show) this object.")
|
|
_("Plot (show) this object.")
|
|
|
)
|
|
)
|
|
|
self.plot_cb.setLayoutDirection(QtCore.Qt.RightToLeft)
|
|
self.plot_cb.setLayoutDirection(QtCore.Qt.RightToLeft)
|
|
|
- hlay_plot.addStretch()
|
|
|
|
|
- hlay_plot.addWidget(self.plot_cb)
|
|
|
|
|
|
|
+ grid0.addWidget(self.plot_cb, 0, 1)
|
|
|
|
|
|
|
|
self.geo_tools_table = FCTable()
|
|
self.geo_tools_table = FCTable()
|
|
|
- self.geo_tools_box.addWidget(self.geo_tools_table)
|
|
|
|
|
|
|
+ grid0.addWidget(self.geo_tools_table, 1, 0, 1, 2)
|
|
|
self.geo_tools_table.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
|
|
self.geo_tools_table.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
|
|
|
|
|
|
|
|
self.geo_tools_table.setColumnCount(7)
|
|
self.geo_tools_table.setColumnCount(7)
|
|
@@ -1535,10 +1548,10 @@ class GeometryObjectUI(ObjectUI):
|
|
|
# self.geo_tools_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
|
|
# self.geo_tools_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
|
|
|
|
|
|
|
|
# Tool Offset
|
|
# Tool Offset
|
|
|
- self.grid1 = QtWidgets.QGridLayout()
|
|
|
|
|
- self.geo_tools_box.addLayout(self.grid1)
|
|
|
|
|
- self.grid1.setColumnStretch(0, 0)
|
|
|
|
|
- self.grid1.setColumnStretch(1, 1)
|
|
|
|
|
|
|
+ grid1 = QtWidgets.QGridLayout()
|
|
|
|
|
+ self.geo_table_box.addLayout(grid1)
|
|
|
|
|
+ grid1.setColumnStretch(0, 0)
|
|
|
|
|
+ grid1.setColumnStretch(1, 1)
|
|
|
|
|
|
|
|
self.tool_offset_lbl = QtWidgets.QLabel('%s:' % _('Tool Offset'))
|
|
self.tool_offset_lbl = QtWidgets.QLabel('%s:' % _('Tool Offset'))
|
|
|
self.tool_offset_lbl.setToolTip(
|
|
self.tool_offset_lbl.setToolTip(
|
|
@@ -1554,16 +1567,16 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.tool_offset_entry.set_range(-9999.9999, 9999.9999)
|
|
self.tool_offset_entry.set_range(-9999.9999, 9999.9999)
|
|
|
self.tool_offset_entry.setSingleStep(0.1)
|
|
self.tool_offset_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- self.grid1.addWidget(self.tool_offset_lbl, 0, 0)
|
|
|
|
|
- self.grid1.addWidget(self.tool_offset_entry, 0, 1, 1, 2)
|
|
|
|
|
|
|
+ grid1.addWidget(self.tool_offset_lbl, 0, 0)
|
|
|
|
|
+ grid1.addWidget(self.tool_offset_entry, 0, 1)
|
|
|
|
|
|
|
|
separator_line = QtWidgets.QFrame()
|
|
separator_line = QtWidgets.QFrame()
|
|
|
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
|
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
|
|
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
|
- self.grid1.addWidget(separator_line, 1, 0, 1, 3)
|
|
|
|
|
|
|
+ grid1.addWidget(separator_line, 1, 0, 1, 2)
|
|
|
|
|
|
|
|
self.tool_sel_label = QtWidgets.QLabel('<b>%s</b>' % _("New Tool"))
|
|
self.tool_sel_label = QtWidgets.QLabel('<b>%s</b>' % _("New Tool"))
|
|
|
- self.grid1.addWidget(self.tool_sel_label, 2, 0, 1, 3)
|
|
|
|
|
|
|
+ grid1.addWidget(self.tool_sel_label, 2, 0, 1, 2)
|
|
|
|
|
|
|
|
self.addtool_entry_lbl = QtWidgets.QLabel('<b>%s:</b>' % _('Tool Dia'))
|
|
self.addtool_entry_lbl = QtWidgets.QLabel('<b>%s:</b>' % _('Tool Dia'))
|
|
|
self.addtool_entry_lbl.setToolTip(
|
|
self.addtool_entry_lbl.setToolTip(
|
|
@@ -1574,30 +1587,30 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.addtool_entry.set_range(0.00001, 9999.9999)
|
|
self.addtool_entry.set_range(0.00001, 9999.9999)
|
|
|
self.addtool_entry.setSingleStep(0.1)
|
|
self.addtool_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
|
|
+ grid1.addWidget(self.addtool_entry_lbl, 3, 0)
|
|
|
|
|
+ grid1.addWidget(self.addtool_entry, 3, 1)
|
|
|
|
|
+
|
|
|
self.addtool_btn = QtWidgets.QPushButton(_('Add'))
|
|
self.addtool_btn = QtWidgets.QPushButton(_('Add'))
|
|
|
self.addtool_btn.setToolTip(
|
|
self.addtool_btn.setToolTip(
|
|
|
_("Add a new tool to the Tool Table\n"
|
|
_("Add a new tool to the Tool Table\n"
|
|
|
"with the specified diameter.")
|
|
"with the specified diameter.")
|
|
|
)
|
|
)
|
|
|
-
|
|
|
|
|
- self.grid1.addWidget(self.addtool_entry_lbl, 3, 0)
|
|
|
|
|
- self.grid1.addWidget(self.addtool_entry, 3, 1)
|
|
|
|
|
- self.grid1.addWidget(self.addtool_btn, 3, 2)
|
|
|
|
|
|
|
+ grid1.addWidget(self.addtool_btn, 4, 0, 1, 2)
|
|
|
|
|
|
|
|
self.addtool_from_db_btn = QtWidgets.QPushButton(_('Add from DB'))
|
|
self.addtool_from_db_btn = QtWidgets.QPushButton(_('Add from DB'))
|
|
|
self.addtool_from_db_btn.setToolTip(
|
|
self.addtool_from_db_btn.setToolTip(
|
|
|
_("Add a new tool to the Tool Table\n"
|
|
_("Add a new tool to the Tool Table\n"
|
|
|
"from the Tool DataBase.")
|
|
"from the Tool DataBase.")
|
|
|
)
|
|
)
|
|
|
- self.grid1.addWidget(self.addtool_from_db_btn, 4, 0, 1, 3)
|
|
|
|
|
|
|
+ grid1.addWidget(self.addtool_from_db_btn, 7, 0, 1, 2)
|
|
|
|
|
|
|
|
separator_line = QtWidgets.QFrame()
|
|
separator_line = QtWidgets.QFrame()
|
|
|
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
|
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
|
|
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
|
- self.grid1.addWidget(separator_line, 5, 0, 1, 3)
|
|
|
|
|
|
|
+ grid1.addWidget(separator_line, 9, 0, 1, 2)
|
|
|
|
|
|
|
|
grid2 = QtWidgets.QGridLayout()
|
|
grid2 = QtWidgets.QGridLayout()
|
|
|
- self.geo_tools_box.addLayout(grid2)
|
|
|
|
|
|
|
+ self.geo_table_box.addLayout(grid2)
|
|
|
|
|
|
|
|
self.copytool_btn = QtWidgets.QPushButton(_('Copy'))
|
|
self.copytool_btn = QtWidgets.QPushButton(_('Copy'))
|
|
|
self.copytool_btn.setToolTip(
|
|
self.copytool_btn.setToolTip(
|
|
@@ -1614,17 +1627,33 @@ class GeometryObjectUI(ObjectUI):
|
|
|
grid2.addWidget(self.copytool_btn, 0, 0)
|
|
grid2.addWidget(self.copytool_btn, 0, 0)
|
|
|
grid2.addWidget(self.deltool_btn, 0, 1)
|
|
grid2.addWidget(self.deltool_btn, 0, 1)
|
|
|
|
|
|
|
|
- self.empty_label = QtWidgets.QLabel('')
|
|
|
|
|
- self.geo_tools_box.addWidget(self.empty_label)
|
|
|
|
|
|
|
+ self.geo_table_box.addWidget(QtWidgets.QLabel(''))
|
|
|
|
|
|
|
|
# ###########################################################
|
|
# ###########################################################
|
|
|
# ############# Create CNC Job ##############################
|
|
# ############# 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 = QtWidgets.QFrame()
|
|
|
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
|
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
|
|
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
|
- self.geo_tools_box.addWidget(separator_line)
|
|
|
|
|
|
|
+ self.geo_param_box.addWidget(separator_line)
|
|
|
|
|
+
|
|
|
|
|
+ # #################################################################
|
|
|
|
|
+ # ################# GRID LAYOUT 3 ###############################
|
|
|
|
|
+ # #################################################################
|
|
|
|
|
+
|
|
|
|
|
+ grid3 = QtWidgets.QGridLayout()
|
|
|
|
|
+ grid3.setColumnStretch(0, 0)
|
|
|
|
|
+ grid3.setColumnStretch(1, 1)
|
|
|
|
|
+ self.geo_param_box.addLayout(grid3)
|
|
|
|
|
|
|
|
# ### Tools Data ## ##
|
|
# ### Tools Data ## ##
|
|
|
self.tool_data_label = QtWidgets.QLabel(
|
|
self.tool_data_label = QtWidgets.QLabel(
|
|
@@ -1635,24 +1664,7 @@ class GeometryObjectUI(ObjectUI):
|
|
|
"Each tool store it's own set of such data."
|
|
"Each tool store it's own set of such data."
|
|
|
)
|
|
)
|
|
|
)
|
|
)
|
|
|
- self.geo_tools_box.addWidget(self.tool_data_label)
|
|
|
|
|
-
|
|
|
|
|
- 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)
|
|
|
|
|
-
|
|
|
|
|
- # #################################################################
|
|
|
|
|
- # ################# GRID LAYOUT 3 ###############################
|
|
|
|
|
- # #################################################################
|
|
|
|
|
-
|
|
|
|
|
- self.grid3 = QtWidgets.QGridLayout()
|
|
|
|
|
- self.grid3.setColumnStretch(0, 0)
|
|
|
|
|
- self.grid3.setColumnStretch(1, 1)
|
|
|
|
|
- self.geo_param_box.addLayout(self.grid3)
|
|
|
|
|
|
|
+ grid3.addWidget(self.tool_data_label, 0, 0, 1, 2)
|
|
|
|
|
|
|
|
# Tip Dia
|
|
# Tip Dia
|
|
|
self.tipdialabel = QtWidgets.QLabel('%s:' % _('V-Tip Dia'))
|
|
self.tipdialabel = QtWidgets.QLabel('%s:' % _('V-Tip Dia'))
|
|
@@ -1666,8 +1678,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.tipdia_entry.set_range(0.00001, 9999.9999)
|
|
self.tipdia_entry.set_range(0.00001, 9999.9999)
|
|
|
self.tipdia_entry.setSingleStep(0.1)
|
|
self.tipdia_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- self.grid3.addWidget(self.tipdialabel, 1, 0)
|
|
|
|
|
- self.grid3.addWidget(self.tipdia_entry, 1, 1)
|
|
|
|
|
|
|
+ grid3.addWidget(self.tipdialabel, 1, 0)
|
|
|
|
|
+ grid3.addWidget(self.tipdia_entry, 1, 1)
|
|
|
|
|
|
|
|
# Tip Angle
|
|
# Tip Angle
|
|
|
self.tipanglelabel = QtWidgets.QLabel('%s:' % _('V-Tip Angle'))
|
|
self.tipanglelabel = QtWidgets.QLabel('%s:' % _('V-Tip Angle'))
|
|
@@ -1682,8 +1694,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.tipangle_entry.set_range(1.0, 180.0)
|
|
self.tipangle_entry.set_range(1.0, 180.0)
|
|
|
self.tipangle_entry.setSingleStep(1)
|
|
self.tipangle_entry.setSingleStep(1)
|
|
|
|
|
|
|
|
- self.grid3.addWidget(self.tipanglelabel, 2, 0)
|
|
|
|
|
- self.grid3.addWidget(self.tipangle_entry, 2, 1)
|
|
|
|
|
|
|
+ grid3.addWidget(self.tipanglelabel, 2, 0)
|
|
|
|
|
+ grid3.addWidget(self.tipangle_entry, 2, 1)
|
|
|
|
|
|
|
|
# Cut Z
|
|
# Cut Z
|
|
|
self.cutzlabel = QtWidgets.QLabel('%s:' % _('Cut Z'))
|
|
self.cutzlabel = QtWidgets.QLabel('%s:' % _('Cut Z'))
|
|
@@ -1703,8 +1715,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
|
|
|
|
|
self.cutz_entry.setSingleStep(0.1)
|
|
self.cutz_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- self.grid3.addWidget(self.cutzlabel, 3, 0)
|
|
|
|
|
- self.grid3.addWidget(self.cutz_entry, 3, 1)
|
|
|
|
|
|
|
+ grid3.addWidget(self.cutzlabel, 3, 0)
|
|
|
|
|
+ grid3.addWidget(self.cutz_entry, 3, 1)
|
|
|
|
|
|
|
|
# Multi-pass
|
|
# Multi-pass
|
|
|
self.mpass_cb = FCCheckBox('%s:' % _("Multi-Depth"))
|
|
self.mpass_cb = FCCheckBox('%s:' % _("Multi-Depth"))
|
|
@@ -1729,8 +1741,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
)
|
|
)
|
|
|
self.ois_mpass_geo = OptionalInputSection(self.mpass_cb, [self.maxdepth_entry])
|
|
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)
|
|
|
|
|
|
|
+ grid3.addWidget(self.mpass_cb, 4, 0)
|
|
|
|
|
+ grid3.addWidget(self.maxdepth_entry, 4, 1)
|
|
|
|
|
|
|
|
# Travel Z
|
|
# Travel Z
|
|
|
self.travelzlabel = QtWidgets.QLabel('%s:' % _('Travel Z'))
|
|
self.travelzlabel = QtWidgets.QLabel('%s:' % _('Travel Z'))
|
|
@@ -1748,8 +1760,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
|
|
|
|
|
self.travelz_entry.setSingleStep(0.1)
|
|
self.travelz_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- self.grid3.addWidget(self.travelzlabel, 5, 0)
|
|
|
|
|
- self.grid3.addWidget(self.travelz_entry, 5, 1)
|
|
|
|
|
|
|
+ grid3.addWidget(self.travelzlabel, 5, 0)
|
|
|
|
|
+ grid3.addWidget(self.travelz_entry, 5, 1)
|
|
|
|
|
|
|
|
# Feedrate X-Y
|
|
# Feedrate X-Y
|
|
|
self.frlabel = QtWidgets.QLabel('%s:' % _('Feedrate X-Y'))
|
|
self.frlabel = QtWidgets.QLabel('%s:' % _('Feedrate X-Y'))
|
|
@@ -1762,8 +1774,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.cncfeedrate_entry.set_range(0, 99999.9999)
|
|
self.cncfeedrate_entry.set_range(0, 99999.9999)
|
|
|
self.cncfeedrate_entry.setSingleStep(0.1)
|
|
self.cncfeedrate_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- self.grid3.addWidget(self.frlabel, 10, 0)
|
|
|
|
|
- self.grid3.addWidget(self.cncfeedrate_entry, 10, 1)
|
|
|
|
|
|
|
+ grid3.addWidget(self.frlabel, 10, 0)
|
|
|
|
|
+ grid3.addWidget(self.cncfeedrate_entry, 10, 1)
|
|
|
|
|
|
|
|
# Feedrate Z (Plunge)
|
|
# Feedrate Z (Plunge)
|
|
|
self.frzlabel = QtWidgets.QLabel('%s:' % _('Feedrate Z'))
|
|
self.frzlabel = QtWidgets.QLabel('%s:' % _('Feedrate Z'))
|
|
@@ -1777,8 +1789,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.feedrate_z_entry.set_range(0, 99999.9999)
|
|
self.feedrate_z_entry.set_range(0, 99999.9999)
|
|
|
self.feedrate_z_entry.setSingleStep(0.1)
|
|
self.feedrate_z_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- self.grid3.addWidget(self.frzlabel, 11, 0)
|
|
|
|
|
- self.grid3.addWidget(self.feedrate_z_entry, 11, 1)
|
|
|
|
|
|
|
+ grid3.addWidget(self.frzlabel, 11, 0)
|
|
|
|
|
+ grid3.addWidget(self.feedrate_z_entry, 11, 1)
|
|
|
|
|
|
|
|
# Feedrate rapids
|
|
# Feedrate rapids
|
|
|
self.fr_rapidlabel = QtWidgets.QLabel('%s:' % _('Feedrate Rapids'))
|
|
self.fr_rapidlabel = QtWidgets.QLabel('%s:' % _('Feedrate Rapids'))
|
|
@@ -1794,8 +1806,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.feedrate_rapid_entry.set_range(0, 99999.9999)
|
|
self.feedrate_rapid_entry.set_range(0, 99999.9999)
|
|
|
self.feedrate_rapid_entry.setSingleStep(0.1)
|
|
self.feedrate_rapid_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- self.grid3.addWidget(self.fr_rapidlabel, 12, 0)
|
|
|
|
|
- self.grid3.addWidget(self.feedrate_rapid_entry, 12, 1)
|
|
|
|
|
|
|
+ grid3.addWidget(self.fr_rapidlabel, 12, 0)
|
|
|
|
|
+ grid3.addWidget(self.feedrate_rapid_entry, 12, 1)
|
|
|
# default values is to hide
|
|
# default values is to hide
|
|
|
self.fr_rapidlabel.hide()
|
|
self.fr_rapidlabel.hide()
|
|
|
self.feedrate_rapid_entry.hide()
|
|
self.feedrate_rapid_entry.hide()
|
|
@@ -1820,8 +1832,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
"meet with last cut, we generate an\n"
|
|
"meet with last cut, we generate an\n"
|
|
|
"extended cut over the first cut section.")
|
|
"extended cut over the first cut section.")
|
|
|
)
|
|
)
|
|
|
- self.grid3.addWidget(self.extracut_cb, 13, 0)
|
|
|
|
|
- self.grid3.addWidget(self.e_cut_entry, 13, 1)
|
|
|
|
|
|
|
+ grid3.addWidget(self.extracut_cb, 13, 0)
|
|
|
|
|
+ grid3.addWidget(self.e_cut_entry, 13, 1)
|
|
|
|
|
|
|
|
# Spindlespeed
|
|
# Spindlespeed
|
|
|
self.spindle_label = QtWidgets.QLabel('%s:' % _('Spindle speed'))
|
|
self.spindle_label = QtWidgets.QLabel('%s:' % _('Spindle speed'))
|
|
@@ -1836,8 +1848,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.cncspindlespeed_entry.set_range(0, 1000000)
|
|
self.cncspindlespeed_entry.set_range(0, 1000000)
|
|
|
self.cncspindlespeed_entry.set_step(100)
|
|
self.cncspindlespeed_entry.set_step(100)
|
|
|
|
|
|
|
|
- self.grid3.addWidget(self.spindle_label, 14, 0)
|
|
|
|
|
- self.grid3.addWidget(self.cncspindlespeed_entry, 14, 1)
|
|
|
|
|
|
|
+ grid3.addWidget(self.spindle_label, 14, 0)
|
|
|
|
|
+ grid3.addWidget(self.cncspindlespeed_entry, 14, 1)
|
|
|
|
|
|
|
|
# Dwell
|
|
# Dwell
|
|
|
self.dwell_cb = FCCheckBox('%s:' % _('Dwell'))
|
|
self.dwell_cb = FCCheckBox('%s:' % _('Dwell'))
|
|
@@ -1857,8 +1869,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
)
|
|
)
|
|
|
self.ois_dwell_geo = OptionalInputSection(self.dwell_cb, [self.dwelltime_entry])
|
|
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)
|
|
|
|
|
|
|
+ grid3.addWidget(self.dwell_cb, 15, 0)
|
|
|
|
|
+ grid3.addWidget(self.dwelltime_entry, 15, 1)
|
|
|
|
|
|
|
|
# Probe depth
|
|
# Probe depth
|
|
|
self.pdepth_label = QtWidgets.QLabel('%s:' % _("Probe Z depth"))
|
|
self.pdepth_label = QtWidgets.QLabel('%s:' % _("Probe Z depth"))
|
|
@@ -1871,8 +1883,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.pdepth_entry.set_range(-9999.9999, 9999.9999)
|
|
self.pdepth_entry.set_range(-9999.9999, 9999.9999)
|
|
|
self.pdepth_entry.setSingleStep(0.1)
|
|
self.pdepth_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- self.grid3.addWidget(self.pdepth_label, 17, 0)
|
|
|
|
|
- self.grid3.addWidget(self.pdepth_entry, 17, 1)
|
|
|
|
|
|
|
+ grid3.addWidget(self.pdepth_label, 17, 0)
|
|
|
|
|
+ grid3.addWidget(self.pdepth_entry, 17, 1)
|
|
|
|
|
|
|
|
self.pdepth_label.hide()
|
|
self.pdepth_label.hide()
|
|
|
self.pdepth_entry.setVisible(False)
|
|
self.pdepth_entry.setVisible(False)
|
|
@@ -1887,8 +1899,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.feedrate_probe_entry.set_range(0.0, 9999.9999)
|
|
self.feedrate_probe_entry.set_range(0.0, 9999.9999)
|
|
|
self.feedrate_probe_entry.setSingleStep(0.1)
|
|
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)
|
|
|
|
|
|
|
+ grid3.addWidget(self.feedrate_probe_label, 18, 0)
|
|
|
|
|
+ grid3.addWidget(self.feedrate_probe_entry, 18, 1)
|
|
|
|
|
|
|
|
self.feedrate_probe_label.hide()
|
|
self.feedrate_probe_label.hide()
|
|
|
self.feedrate_probe_entry.setVisible(False)
|
|
self.feedrate_probe_entry.setVisible(False)
|
|
@@ -1897,34 +1909,34 @@ class GeometryObjectUI(ObjectUI):
|
|
|
# ################# GRID LAYOUT 4 ###############################
|
|
# ################# GRID LAYOUT 4 ###############################
|
|
|
# #################################################################
|
|
# #################################################################
|
|
|
|
|
|
|
|
- self.grid4 = QtWidgets.QGridLayout()
|
|
|
|
|
- self.grid4.setColumnStretch(0, 0)
|
|
|
|
|
- self.grid4.setColumnStretch(1, 1)
|
|
|
|
|
- self.geo_param_box.addLayout(self.grid4)
|
|
|
|
|
|
|
+ grid4 = QtWidgets.QGridLayout()
|
|
|
|
|
+ grid4.setColumnStretch(0, 0)
|
|
|
|
|
+ grid4.setColumnStretch(1, 1)
|
|
|
|
|
+ self.geo_param_box.addLayout(grid4)
|
|
|
|
|
|
|
|
separator_line2 = QtWidgets.QFrame()
|
|
separator_line2 = QtWidgets.QFrame()
|
|
|
separator_line2.setFrameShape(QtWidgets.QFrame.HLine)
|
|
separator_line2.setFrameShape(QtWidgets.QFrame.HLine)
|
|
|
separator_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
separator_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
|
- self.grid4.addWidget(separator_line2, 0, 0, 1, 2)
|
|
|
|
|
|
|
+ grid4.addWidget(separator_line2, 0, 0, 1, 2)
|
|
|
|
|
|
|
|
self.apply_param_to_all = FCButton(_("Apply parameters to all tools"))
|
|
self.apply_param_to_all = FCButton(_("Apply parameters to all tools"))
|
|
|
self.apply_param_to_all.setToolTip(
|
|
self.apply_param_to_all.setToolTip(
|
|
|
_("The parameters in the current form will be applied\n"
|
|
_("The parameters in the current form will be applied\n"
|
|
|
"on all the tools from the Tool Table.")
|
|
"on all the tools from the Tool Table.")
|
|
|
)
|
|
)
|
|
|
- self.grid4.addWidget(self.apply_param_to_all, 1, 0, 1, 2)
|
|
|
|
|
|
|
+ grid4.addWidget(self.apply_param_to_all, 1, 0, 1, 2)
|
|
|
|
|
|
|
|
separator_line2 = QtWidgets.QFrame()
|
|
separator_line2 = QtWidgets.QFrame()
|
|
|
separator_line2.setFrameShape(QtWidgets.QFrame.HLine)
|
|
separator_line2.setFrameShape(QtWidgets.QFrame.HLine)
|
|
|
separator_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
separator_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
|
- self.grid4.addWidget(separator_line2, 2, 0, 1, 2)
|
|
|
|
|
|
|
+ grid4.addWidget(separator_line2, 2, 0, 1, 2)
|
|
|
|
|
|
|
|
# General Parameters
|
|
# General Parameters
|
|
|
self.gen_param_label = QtWidgets.QLabel('<b>%s</b>' % _("Common Parameters"))
|
|
self.gen_param_label = QtWidgets.QLabel('<b>%s</b>' % _("Common Parameters"))
|
|
|
self.gen_param_label.setToolTip(
|
|
self.gen_param_label.setToolTip(
|
|
|
_("Parameters that are common for all tools.")
|
|
_("Parameters that are common for all tools.")
|
|
|
)
|
|
)
|
|
|
- self.grid4.addWidget(self.gen_param_label, 3, 0, 1, 2)
|
|
|
|
|
|
|
+ grid4.addWidget(self.gen_param_label, 3, 0, 1, 2)
|
|
|
|
|
|
|
|
# Tool change Z
|
|
# Tool change Z
|
|
|
self.toolchangeg_cb = FCCheckBox('%s:' % _("Tool change Z"))
|
|
self.toolchangeg_cb = FCCheckBox('%s:' % _("Tool change Z"))
|
|
@@ -1951,8 +1963,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.toolchangez_entry.setSingleStep(0.1)
|
|
self.toolchangez_entry.setSingleStep(0.1)
|
|
|
self.ois_tcz_geo = OptionalInputSection(self.toolchangeg_cb, [self.toolchangez_entry])
|
|
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)
|
|
|
|
|
|
|
+ grid4.addWidget(self.toolchangeg_cb, 6, 0)
|
|
|
|
|
+ grid4.addWidget(self.toolchangez_entry, 6, 1)
|
|
|
|
|
|
|
|
# The Z value for the start move
|
|
# The Z value for the start move
|
|
|
# startzlabel = QtWidgets.QLabel('Start move Z:')
|
|
# startzlabel = QtWidgets.QLabel('Start move Z:')
|
|
@@ -1961,9 +1973,9 @@ class GeometryObjectUI(ObjectUI):
|
|
|
# "Delete the value if you don't need this feature."
|
|
# "Delete the value if you don't need this feature."
|
|
|
#
|
|
#
|
|
|
# )
|
|
# )
|
|
|
- # self.grid3.addWidget(startzlabel, 8, 0)
|
|
|
|
|
|
|
+ # grid3.addWidget(startzlabel, 8, 0)
|
|
|
# self.gstartz_entry = FloatEntry()
|
|
# self.gstartz_entry = FloatEntry()
|
|
|
- # self.grid3.addWidget(self.gstartz_entry, 8, 1)
|
|
|
|
|
|
|
+ # grid3.addWidget(self.gstartz_entry, 8, 1)
|
|
|
|
|
|
|
|
# The Z value for the end move
|
|
# The Z value for the end move
|
|
|
self.endz_label = QtWidgets.QLabel('%s:' % _('End move Z'))
|
|
self.endz_label = QtWidgets.QLabel('%s:' % _('End move Z'))
|
|
@@ -1981,8 +1993,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
|
|
|
|
|
self.endz_entry.setSingleStep(0.1)
|
|
self.endz_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- self.grid4.addWidget(self.endz_label, 9, 0)
|
|
|
|
|
- self.grid4.addWidget(self.endz_entry, 9, 1)
|
|
|
|
|
|
|
+ grid4.addWidget(self.endz_label, 9, 0)
|
|
|
|
|
+ grid4.addWidget(self.endz_entry, 9, 1)
|
|
|
|
|
|
|
|
# End Move X,Y
|
|
# End Move X,Y
|
|
|
endmove_xy_label = QtWidgets.QLabel('%s:' % _('End move X,Y'))
|
|
endmove_xy_label = QtWidgets.QLabel('%s:' % _('End move X,Y'))
|
|
@@ -1993,8 +2005,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
)
|
|
)
|
|
|
self.endxy_entry = FCEntry()
|
|
self.endxy_entry = FCEntry()
|
|
|
|
|
|
|
|
- self.grid4.addWidget(endmove_xy_label, 10, 0)
|
|
|
|
|
- self.grid4.addWidget(self.endxy_entry, 10, 1)
|
|
|
|
|
|
|
+ grid4.addWidget(endmove_xy_label, 10, 0)
|
|
|
|
|
+ grid4.addWidget(self.endxy_entry, 10, 1)
|
|
|
|
|
|
|
|
# preprocessor selection
|
|
# preprocessor selection
|
|
|
pp_label = QtWidgets.QLabel('%s:' % _("Preprocessor"))
|
|
pp_label = QtWidgets.QLabel('%s:' % _("Preprocessor"))
|
|
@@ -2005,17 +2017,17 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.pp_geometry_name_cb = FCComboBox()
|
|
self.pp_geometry_name_cb = FCComboBox()
|
|
|
self.pp_geometry_name_cb.setFocusPolicy(QtCore.Qt.StrongFocus)
|
|
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)
|
|
|
|
|
|
|
+ grid4.addWidget(pp_label, 11, 0)
|
|
|
|
|
+ grid4.addWidget(self.pp_geometry_name_cb, 11, 1)
|
|
|
|
|
|
|
|
- self.grid4.addWidget(QtWidgets.QLabel(''), 12, 0, 1, 2)
|
|
|
|
|
|
|
+ grid4.addWidget(QtWidgets.QLabel(''), 12, 0, 1, 2)
|
|
|
warning_lbl = QtWidgets.QLabel(
|
|
warning_lbl = QtWidgets.QLabel(
|
|
|
_(
|
|
_(
|
|
|
"Add / Select at least one tool in the tool-table.\n"
|
|
"Add / Select at least one tool in the tool-table.\n"
|
|
|
"Click the # header to select all, or Ctrl + LMB\n"
|
|
"Click the # header to select all, or Ctrl + LMB\n"
|
|
|
"for custom selection of tools."
|
|
"for custom selection of tools."
|
|
|
))
|
|
))
|
|
|
- self.grid4.addWidget(warning_lbl, 13, 0, 1, 2)
|
|
|
|
|
|
|
+ grid4.addWidget(warning_lbl, 13, 0, 1, 2)
|
|
|
|
|
|
|
|
# Button
|
|
# Button
|
|
|
self.generate_cnc_button = QtWidgets.QPushButton(_('Generate CNCJob object'))
|
|
self.generate_cnc_button = QtWidgets.QPushButton(_('Generate CNCJob object'))
|
|
@@ -2028,9 +2040,9 @@ class GeometryObjectUI(ObjectUI):
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
}
|
|
}
|
|
|
""")
|
|
""")
|
|
|
- self.grid4.addWidget(self.generate_cnc_button, 14, 0, 1, 2)
|
|
|
|
|
|
|
+ grid4.addWidget(self.generate_cnc_button, 14, 0, 1, 2)
|
|
|
|
|
|
|
|
- self.grid4.addWidget(QtWidgets.QLabel(''), 15, 0, 1, 2)
|
|
|
|
|
|
|
+ grid4.addWidget(QtWidgets.QLabel(''), 15, 0, 1, 2)
|
|
|
|
|
|
|
|
# ##############
|
|
# ##############
|
|
|
# Paint area ##
|
|
# Paint area ##
|
|
@@ -2039,7 +2051,7 @@ class GeometryObjectUI(ObjectUI):
|
|
|
self.tools_label.setToolTip(
|
|
self.tools_label.setToolTip(
|
|
|
_("Launch Paint Tool in Tools Tab.")
|
|
_("Launch Paint Tool in Tools Tab.")
|
|
|
)
|
|
)
|
|
|
- self.grid4.addWidget(self.tools_label, 16, 0, 1, 2)
|
|
|
|
|
|
|
+ grid4.addWidget(self.tools_label, 16, 0, 1, 2)
|
|
|
|
|
|
|
|
# Paint Button
|
|
# Paint Button
|
|
|
self.paint_tool_button = QtWidgets.QPushButton(_('Paint Tool'))
|
|
self.paint_tool_button = QtWidgets.QPushButton(_('Paint Tool'))
|
|
@@ -2057,7 +2069,7 @@ class GeometryObjectUI(ObjectUI):
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
}
|
|
}
|
|
|
""")
|
|
""")
|
|
|
- self.grid4.addWidget(self.paint_tool_button, 17, 0, 1, 2)
|
|
|
|
|
|
|
+ grid4.addWidget(self.paint_tool_button, 17, 0, 1, 2)
|
|
|
|
|
|
|
|
# NCC Tool
|
|
# NCC Tool
|
|
|
self.generate_ncc_button = QtWidgets.QPushButton(_('NCC Tool'))
|
|
self.generate_ncc_button = QtWidgets.QPushButton(_('NCC Tool'))
|
|
@@ -2071,7 +2083,7 @@ class GeometryObjectUI(ObjectUI):
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
}
|
|
}
|
|
|
""")
|
|
""")
|
|
|
- self.grid4.addWidget(self.generate_ncc_button, 18, 0, 1, 2)
|
|
|
|
|
|
|
+ grid4.addWidget(self.generate_ncc_button, 18, 0, 1, 2)
|
|
|
|
|
|
|
|
|
|
|
|
|
class CNCObjectUI(ObjectUI):
|
|
class CNCObjectUI(ObjectUI):
|