- a series of PEP8 corrections in the FlatCAMGeometry.py
- in Geometry UI finished a very basic way for the Polish feature (this will be upgraded in the future, for now is very rough) - added some new GUI elements by subclassing some widgets for the dialog pop-ups - in NCC Tool and Isolation Tool, pressing the shortcut key 'T' will bring the add new tool pop up in which now it is included the button to get the optimal diameter - in Geometry UI and for Solderpaste Tool replaced the pop up window that is launched when using shortcut key with one that has the context menu translated - some UI cleanup in the Geometry UI
This commit is contained in:
@@ -1224,6 +1224,55 @@ class FCSliderWithDoubleSpinner(QtWidgets.QFrame):
|
||||
self.spinner.set_value(slider_value)
|
||||
|
||||
|
||||
class FCButtonWithDoubleSpinner(QtWidgets.QFrame):
|
||||
|
||||
def __init__(self, min=0, max=100, step=1, decimals=4, button_text='', button_icon=None, callback=None, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
self.button = QtWidgets.QToolButton()
|
||||
if button_text != '':
|
||||
self.button.setText(button_text)
|
||||
if button_icon:
|
||||
self.button.setIcon(button_icon)
|
||||
|
||||
self.spinner = FCDoubleSpinner()
|
||||
self.spinner.set_range(min, max)
|
||||
self.spinner.set_step(step)
|
||||
self.spinner.set_precision(decimals)
|
||||
self.spinner.setMinimumWidth(70)
|
||||
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
|
||||
self.spinner.setSizePolicy(sizePolicy)
|
||||
|
||||
self.layout = QtWidgets.QHBoxLayout()
|
||||
self.layout.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
|
||||
self.layout.setContentsMargins(0, 0, 0, 0)
|
||||
self.layout.addWidget(self.spinner)
|
||||
self.layout.addWidget(self.button)
|
||||
self.setLayout(self.layout)
|
||||
|
||||
self.valueChanged = self.spinner.valueChanged
|
||||
|
||||
self._callback = callback
|
||||
self.button.clicked.connect(self._callback)
|
||||
|
||||
def get_value(self) -> float:
|
||||
return self.spinner.get_value()
|
||||
|
||||
def set_value(self, value: float):
|
||||
self.spinner.set_value(value)
|
||||
|
||||
def set_callback(self, callback):
|
||||
self._callback = callback
|
||||
|
||||
def set_text(self, txt: str):
|
||||
if txt:
|
||||
self.button.setText(txt)
|
||||
|
||||
def set_icon(self, icon: QtGui.QIcon):
|
||||
self.button.setIcon(icon)
|
||||
|
||||
|
||||
class FCDoubleSpinner(QtWidgets.QDoubleSpinBox):
|
||||
returnPressed = QtCore.pyqtSignal()
|
||||
confirmation_signal = QtCore.pyqtSignal(bool, float, float)
|
||||
@@ -2112,6 +2161,7 @@ class FCInputDialog(QtWidgets.QInputDialog):
|
||||
def __init__(self, parent=None, ok=False, val=None, title=None, text=None, min=None, max=None, decimals=None,
|
||||
init_val=None):
|
||||
super(FCInputDialog, self).__init__(parent)
|
||||
|
||||
self.allow_empty = ok
|
||||
self.empty_val = val
|
||||
|
||||
@@ -2151,6 +2201,70 @@ class FCInputDialog(QtWidgets.QInputDialog):
|
||||
pass
|
||||
|
||||
|
||||
class FCInputSpinner(QtWidgets.QDialog):
|
||||
def __init__(self, parent=None, title=None, text=None, min=None, max=None, decimals=4, step=1, init_val=None):
|
||||
super().__init__(parent)
|
||||
|
||||
self.val = 0.0
|
||||
self.ok = ''
|
||||
|
||||
self.init_value = init_val if init_val else 0.0
|
||||
|
||||
self.setWindowTitle(title) if title else self.setWindowTitle('title')
|
||||
self.text = text if text else 'text'
|
||||
|
||||
self.min = min if min else 0
|
||||
self.max = max if max else 255
|
||||
self.step = step if step else 1
|
||||
|
||||
self.lbl = FCLabel(self.text)
|
||||
|
||||
self.wdg = FCDoubleSpinner()
|
||||
self.wdg.set_value(self.init_value)
|
||||
self.wdg.set_range(self.min, self.max)
|
||||
self.wdg.set_step(self.step)
|
||||
self.wdg.set_precision(decimals)
|
||||
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
|
||||
self.wdg.setSizePolicy(sizePolicy)
|
||||
|
||||
QBtn = QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel
|
||||
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(QBtn)
|
||||
self.buttonBox.accepted.connect(self.accept)
|
||||
self.buttonBox.rejected.connect(self.reject)
|
||||
|
||||
self.layout = QtWidgets.QVBoxLayout()
|
||||
self.layout.addWidget(self.lbl)
|
||||
self.layout.addWidget(self.wdg)
|
||||
self.layout.addWidget(self.buttonBox)
|
||||
self.setLayout(self.layout)
|
||||
|
||||
def set_title(self, txt):
|
||||
self.setWindowTitle(txt)
|
||||
|
||||
def set_text(self, txt):
|
||||
self.lbl.set_value(txt)
|
||||
|
||||
def set_min(self, val):
|
||||
self.wdg.spinner.setMinimum(val)
|
||||
|
||||
def set_max(self, val):
|
||||
self.wdg.spinner.setMaximum(val)
|
||||
|
||||
def set_range(self, min, max):
|
||||
self.wdg.spinner.set_range(min, max)
|
||||
|
||||
def set_step(self, val):
|
||||
self.wdg.spinner.set_step(val)
|
||||
|
||||
def get_value(self):
|
||||
if self.exec_() == QtWidgets.QDialog.Accepted:
|
||||
return [self.wdg.get_value(), True]
|
||||
else:
|
||||
return [None, False]
|
||||
|
||||
|
||||
class FCInputDialogSlider(QtWidgets.QDialog):
|
||||
|
||||
def __init__(self, parent=None, title=None, text=None, min=None, max=None, step=1, init_val=None):
|
||||
@@ -2209,6 +2323,70 @@ class FCInputDialogSlider(QtWidgets.QDialog):
|
||||
return None, False
|
||||
|
||||
|
||||
class FCInputDialogSpinnerButton(QtWidgets.QDialog):
|
||||
|
||||
def __init__(self, parent=None, title=None, text=None, min=None, max=None, step=1, decimals=4, init_val=None,
|
||||
button_text='', button_icon=None, callback=None):
|
||||
super().__init__(parent)
|
||||
|
||||
self.val = 0.0
|
||||
|
||||
self.init_value = init_val if init_val else 0.0
|
||||
|
||||
self.setWindowTitle(title) if title else self.setWindowTitle('title')
|
||||
self.text = text if text else 'text'
|
||||
|
||||
self.min = min if min else 0
|
||||
self.max = max if max else 255
|
||||
self.step = step if step else 1
|
||||
self.decimals = decimals if decimals else 4
|
||||
|
||||
self.lbl = FCLabel(self.text)
|
||||
|
||||
self.wdg = FCButtonWithDoubleSpinner(min=self.min, max=self.max, step=self.step, decimals=decimals,
|
||||
button_text=button_text, button_icon=button_icon, callback=callback)
|
||||
self.wdg.set_value(self.init_value)
|
||||
|
||||
QBtn = QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel
|
||||
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(QBtn)
|
||||
self.buttonBox.accepted.connect(self.accept)
|
||||
self.buttonBox.rejected.connect(self.reject)
|
||||
|
||||
self.layout = QtWidgets.QVBoxLayout()
|
||||
self.layout.addWidget(self.lbl)
|
||||
self.layout.addWidget(self.wdg)
|
||||
self.layout.addWidget(self.buttonBox)
|
||||
self.setLayout(self.layout)
|
||||
|
||||
def set_title(self, txt):
|
||||
self.setWindowTitle(txt)
|
||||
|
||||
def set_text(self, txt):
|
||||
self.lbl.set_value(txt)
|
||||
|
||||
def set_min(self, val):
|
||||
self.wdg.spinner.setMinimum(val)
|
||||
|
||||
def set_max(self, val):
|
||||
self.wdg.spinner.setMaximum(val)
|
||||
|
||||
def set_range(self, min, max):
|
||||
self.wdg.spinner.set_range(min, max)
|
||||
|
||||
def set_step(self, val):
|
||||
self.wdg.spinner.set_step(val)
|
||||
|
||||
def set_value(self, val):
|
||||
self.wdg.spinner.set_value(val)
|
||||
|
||||
def get_results(self):
|
||||
if self.exec_() == QtWidgets.QDialog.Accepted:
|
||||
return self.wdg.get_value(), True
|
||||
else:
|
||||
return None, False
|
||||
|
||||
|
||||
class FCButton(QtWidgets.QPushButton):
|
||||
def __init__(self, text=None, checkable=None, click_callback=None, parent=None):
|
||||
super(FCButton, self).__init__(text, parent)
|
||||
|
||||
@@ -1122,13 +1122,6 @@ class GeometryObjectUI(ObjectUI):
|
||||
grid2 = QtWidgets.QGridLayout()
|
||||
self.geo_table_box.addLayout(grid2)
|
||||
|
||||
self.copytool_btn = QtWidgets.QPushButton(_('Copy'))
|
||||
self.copytool_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/copy16.png'))
|
||||
self.copytool_btn.setToolTip(
|
||||
_("Copy a selection of tools in the Tool Table\n"
|
||||
"by first selecting a row in the Tool Table.")
|
||||
)
|
||||
|
||||
self.deltool_btn = QtWidgets.QPushButton(_('Delete'))
|
||||
self.deltool_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/trash16.png'))
|
||||
self.deltool_btn.setToolTip(
|
||||
@@ -1136,15 +1129,11 @@ class GeometryObjectUI(ObjectUI):
|
||||
"by first selecting a row in the Tool Table.")
|
||||
)
|
||||
|
||||
grid2.addWidget(self.copytool_btn, 0, 0)
|
||||
grid2.addWidget(self.deltool_btn, 0, 1)
|
||||
|
||||
self.geo_table_box.addWidget(QtWidgets.QLabel(''))
|
||||
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)
|
||||
@@ -1659,6 +1648,21 @@ class GeometryObjectUI(ObjectUI):
|
||||
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 = QtWidgets.QLabel('%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 = QtWidgets.QLabel('%s:' % _('Pressure'))
|
||||
self.polish_pressure_lbl.setToolTip(
|
||||
@@ -1670,8 +1674,21 @@ class GeometryObjectUI(ObjectUI):
|
||||
self.polish_pressure_entry.set_range(-9999.9999, 9999.9999)
|
||||
self.polish_pressure_entry.setObjectName("g_polish_pressure")
|
||||
|
||||
self.grid4.addWidget(self.polish_pressure_lbl, 17, 0)
|
||||
self.grid4.addWidget(self.polish_pressure_entry, 17, 1)
|
||||
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(-9999.9999, 9999.9999)
|
||||
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 = QtWidgets.QLabel('%s:' % _('Overlap'))
|
||||
@@ -1685,8 +1702,8 @@ class GeometryObjectUI(ObjectUI):
|
||||
self.polish_over_entry.setSingleStep(0.1)
|
||||
self.polish_over_entry.setObjectName("g_polish_overlap")
|
||||
|
||||
self.grid4.addWidget(self.polish_over_lbl, 18, 0)
|
||||
self.grid4.addWidget(self.polish_over_entry, 18, 1)
|
||||
self.grid4.addWidget(self.polish_over_lbl, 22, 0)
|
||||
self.grid4.addWidget(self.polish_over_entry, 22, 1)
|
||||
|
||||
# Polish Method
|
||||
self.polish_method_lbl = QtWidgets.QLabel('%s:' % _('Method'))
|
||||
@@ -1703,13 +1720,17 @@ class GeometryObjectUI(ObjectUI):
|
||||
)
|
||||
self.polish_method_combo.setObjectName('g_polish_method')
|
||||
|
||||
self.grid4.addWidget(self.polish_method_lbl, 20, 0)
|
||||
self.grid4.addWidget(self.polish_method_combo, 20, 1)
|
||||
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()
|
||||
@@ -1722,6 +1743,10 @@ class GeometryObjectUI(ObjectUI):
|
||||
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,
|
||||
@@ -1732,7 +1757,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
separator_line2 = QtWidgets.QFrame()
|
||||
separator_line2.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
self.grid4.addWidget(separator_line2, 22, 0, 1, 2)
|
||||
self.grid4.addWidget(separator_line2, 26, 0, 1, 2)
|
||||
|
||||
# Button
|
||||
self.generate_cnc_button = QtWidgets.QPushButton(_('Generate CNCJob object'))
|
||||
@@ -1750,9 +1775,9 @@ class GeometryObjectUI(ObjectUI):
|
||||
font-weight: bold;
|
||||
}
|
||||
""")
|
||||
self.grid4.addWidget(self.generate_cnc_button, 24, 0, 1, 2)
|
||||
self.grid4.addWidget(self.generate_cnc_button, 28, 0, 1, 2)
|
||||
|
||||
self.grid4.addWidget(QtWidgets.QLabel(''), 26, 0, 1, 2)
|
||||
self.grid4.addWidget(QtWidgets.QLabel(''), 30, 0, 1, 2)
|
||||
|
||||
# ##############
|
||||
# Paint area ##
|
||||
@@ -1761,7 +1786,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
self.tools_label.setToolTip(
|
||||
_("Launch Paint Tool in Tools Tab.")
|
||||
)
|
||||
self.grid4.addWidget(self.tools_label, 28, 0, 1, 2)
|
||||
self.grid4.addWidget(self.tools_label, 32, 0, 1, 2)
|
||||
|
||||
# Milling Tool - will create GCode for slot holes
|
||||
self.milling_button = QtWidgets.QPushButton(_('Milling Tool'))
|
||||
@@ -1775,7 +1800,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
font-weight: bold;
|
||||
}
|
||||
""")
|
||||
self.grid4.addWidget(self.milling_button, 30, 0, 1, 2)
|
||||
self.grid4.addWidget(self.milling_button, 34, 0, 1, 2)
|
||||
# FIXME: until the Milling Tool is ready, this get disabled
|
||||
self.milling_button.setDisabled(True)
|
||||
|
||||
@@ -1793,7 +1818,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
# font-weight: bold;
|
||||
# }
|
||||
# """)
|
||||
self.grid4.addWidget(self.paint_tool_button, 32, 0, 1, 2)
|
||||
self.grid4.addWidget(self.paint_tool_button, 36, 0, 1, 2)
|
||||
|
||||
# NCC Tool
|
||||
self.generate_ncc_button = QtWidgets.QPushButton(_('NCC Tool'))
|
||||
@@ -1808,7 +1833,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
# font-weight: bold;
|
||||
# }
|
||||
# """)
|
||||
self.grid4.addWidget(self.generate_ncc_button, 34, 0, 1, 2)
|
||||
self.grid4.addWidget(self.generate_ncc_button, 38, 0, 1, 2)
|
||||
|
||||
|
||||
class CNCObjectUI(ObjectUI):
|
||||
|
||||
@@ -282,6 +282,14 @@ class PreferencesUIManager:
|
||||
"geometry_area_shape": self.ui.geometry_defaults_form.geometry_adv_opt_group.area_shape_radio,
|
||||
"geometry_area_strategy": self.ui.geometry_defaults_form.geometry_adv_opt_group.strategy_radio,
|
||||
"geometry_area_overz": self.ui.geometry_defaults_form.geometry_adv_opt_group.over_z_entry,
|
||||
# Polish
|
||||
"geometry_polish": self.ui.geometry_defaults_form.geometry_adv_opt_group.polish_cb,
|
||||
"geometry_polish_dia": self.ui.geometry_defaults_form.geometry_adv_opt_group.polish_dia_entry,
|
||||
"geometry_polish_pressure": self.ui.geometry_defaults_form.geometry_adv_opt_group.polish_pressure_entry,
|
||||
"geometry_polish_travelz": self.ui.geometry_defaults_form.geometry_adv_opt_group.polish_travelz_entry,
|
||||
"geometry_polish_margin": self.ui.geometry_defaults_form.geometry_adv_opt_group.polish_margin_entry,
|
||||
"geometry_polish_overlap": self.ui.geometry_defaults_form.geometry_adv_opt_group.polish_over_entry,
|
||||
"geometry_polish_method": self.ui.geometry_defaults_form.geometry_adv_opt_group.polish_method_combo,
|
||||
|
||||
# Geometry Editor
|
||||
"geometry_editor_sel_limit": self.ui.geometry_defaults_form.geometry_editor_group.sel_limit_entry,
|
||||
|
||||
@@ -2,7 +2,7 @@ from PyQt5 import QtWidgets
|
||||
from PyQt5.QtCore import QSettings
|
||||
|
||||
from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, RadioSet, FCLabel, NumericalEvalTupleEntry, \
|
||||
NumericalEvalEntry
|
||||
NumericalEvalEntry, FCComboBox
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
|
||||
import gettext
|
||||
@@ -31,7 +31,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
# ------------------------------
|
||||
# ## Advanced Options
|
||||
# ------------------------------
|
||||
self.geo_label = QtWidgets.QLabel('<b>%s:</b>' % _('Advanced Options'))
|
||||
self.geo_label = FCLabel('<b>%s:</b>' % _('Advanced Options'))
|
||||
self.geo_label.setToolTip(
|
||||
_("A list of Geometry advanced parameters.\n"
|
||||
"Those parameters are available only for\n"
|
||||
@@ -43,7 +43,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
self.layout.addLayout(grid1)
|
||||
|
||||
# Toolchange X,Y
|
||||
toolchange_xy_label = QtWidgets.QLabel('%s:' % _('Toolchange X-Y'))
|
||||
toolchange_xy_label = FCLabel('%s:' % _('Toolchange X-Y'))
|
||||
toolchange_xy_label.setToolTip(
|
||||
_("Toolchange X,Y position.")
|
||||
)
|
||||
@@ -53,7 +53,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.toolchangexy_entry, 1, 1)
|
||||
|
||||
# Start move Z
|
||||
startzlabel = QtWidgets.QLabel('%s:' % _('Start Z'))
|
||||
startzlabel = FCLabel('%s:' % _('Start Z'))
|
||||
startzlabel.setToolTip(
|
||||
_("Height of the tool just after starting the work.\n"
|
||||
"Delete the value if you don't need this feature.")
|
||||
@@ -64,7 +64,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.gstartz_entry, 2, 1)
|
||||
|
||||
# Feedrate rapids
|
||||
fr_rapid_label = QtWidgets.QLabel('%s:' % _('Feedrate Rapids'))
|
||||
fr_rapid_label = FCLabel('%s:' % _('Feedrate Rapids'))
|
||||
fr_rapid_label.setToolTip(
|
||||
_("Cutting speed in the XY plane\n"
|
||||
"(in units per minute).\n"
|
||||
@@ -105,7 +105,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.e_cut_entry, 5, 1)
|
||||
|
||||
# Probe depth
|
||||
self.pdepth_label = QtWidgets.QLabel('%s:' % _("Probe Z 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.")
|
||||
@@ -120,7 +120,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.pdepth_entry, 6, 1)
|
||||
|
||||
# Probe feedrate
|
||||
self.feedrate_probe_label = QtWidgets.QLabel('%s:' % _("Feedrate Probe"))
|
||||
self.feedrate_probe_label = FCLabel('%s:' % _("Feedrate Probe"))
|
||||
self.feedrate_probe_label.setToolTip(
|
||||
_("The feedrate used while the probe is probing.")
|
||||
)
|
||||
@@ -134,7 +134,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.feedrate_probe_entry, 7, 1)
|
||||
|
||||
# Spindle direction
|
||||
spindle_dir_label = QtWidgets.QLabel('%s:' % _('Spindle direction'))
|
||||
spindle_dir_label = FCLabel('%s:' % _('Spindle direction'))
|
||||
spindle_dir_label.setToolTip(
|
||||
_("This sets the direction that the spindle is rotating.\n"
|
||||
"It can be either:\n"
|
||||
@@ -158,7 +158,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.fplunge_cb, 9, 0, 1, 2)
|
||||
|
||||
# Size of trace segment on X axis
|
||||
segx_label = QtWidgets.QLabel('%s:' % _("Segment X size"))
|
||||
segx_label = FCLabel('%s:' % _("Segment X size"))
|
||||
segx_label.setToolTip(
|
||||
_("The size of the trace segment on the X axis.\n"
|
||||
"Useful for auto-leveling.\n"
|
||||
@@ -174,7 +174,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.segx_entry, 10, 1)
|
||||
|
||||
# Size of trace segment on Y axis
|
||||
segy_label = QtWidgets.QLabel('%s:' % _("Segment Y size"))
|
||||
segy_label = FCLabel('%s:' % _("Segment Y size"))
|
||||
segy_label.setToolTip(
|
||||
_("The size of the trace segment on the Y axis.\n"
|
||||
"Useful for auto-leveling.\n"
|
||||
@@ -197,7 +197,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
# -----------------------------
|
||||
# --- Area Exclusion ----------
|
||||
# -----------------------------
|
||||
self.area_exc_label = QtWidgets.QLabel('<b>%s:</b>' % _('Area Exclusion'))
|
||||
self.area_exc_label = FCLabel('<b>%s:</b>' % _('Area Exclusion'))
|
||||
self.area_exc_label.setToolTip(
|
||||
_("Area exclusion parameters.")
|
||||
)
|
||||
@@ -215,7 +215,7 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.exclusion_cb, 14, 0, 1, 2)
|
||||
|
||||
# Area Selection shape
|
||||
self.area_shape_label = QtWidgets.QLabel('%s:' % _("Shape"))
|
||||
self.area_shape_label = FCLabel('%s:' % _("Shape"))
|
||||
self.area_shape_label.setToolTip(
|
||||
_("The kind of selection shape used for area selection.")
|
||||
)
|
||||
@@ -248,5 +248,102 @@ class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
|
||||
grid1.addWidget(self.over_z_label, 18, 0)
|
||||
grid1.addWidget(self.over_z_entry, 18, 1)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid1.addWidget(separator_line, 20, 0, 1, 2)
|
||||
|
||||
# -----------------------------
|
||||
# --- Area POLISH ----------
|
||||
# -----------------------------
|
||||
# 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."))
|
||||
grid1.addWidget(self.polish_cb, 22, 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()
|
||||
self.polish_dia_entry.set_precision(self.decimals)
|
||||
self.polish_dia_entry.set_range(0.000, 9999.9999)
|
||||
|
||||
grid1.addWidget(self.polish_dia_lbl, 24, 0)
|
||||
grid1.addWidget(self.polish_dia_entry, 24, 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()
|
||||
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)
|
||||
|
||||
grid1.addWidget(self.polish_travelz_lbl, 26, 0)
|
||||
grid1.addWidget(self.polish_travelz_entry, 26, 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()
|
||||
self.polish_pressure_entry.set_precision(self.decimals)
|
||||
self.polish_pressure_entry.set_range(-9999.9999, 9999.9999)
|
||||
|
||||
grid1.addWidget(self.polish_pressure_lbl, 28, 0)
|
||||
grid1.addWidget(self.polish_pressure_entry, 28, 1)
|
||||
|
||||
# Polish Margin
|
||||
self.polish_margin_lbl = FCLabel('%s:' % _('Margin'))
|
||||
self.polish_margin_lbl.setToolTip(
|
||||
_("Bounding box margin.")
|
||||
)
|
||||
self.polish_margin_entry = FCDoubleSpinner()
|
||||
self.polish_margin_entry.set_precision(self.decimals)
|
||||
self.polish_margin_entry.set_range(-9999.9999, 9999.9999)
|
||||
|
||||
grid1.addWidget(self.polish_margin_lbl, 30, 0)
|
||||
grid1.addWidget(self.polish_margin_entry, 30, 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='%')
|
||||
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)
|
||||
|
||||
grid1.addWidget(self.polish_over_lbl, 32, 0)
|
||||
grid1.addWidget(self.polish_over_entry, 32, 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 = FCComboBox()
|
||||
self.polish_method_combo.addItems(
|
||||
[_("Standard"), _("Seed"), _("Lines")]
|
||||
)
|
||||
|
||||
grid1.addWidget(self.polish_method_lbl, 34, 0)
|
||||
grid1.addWidget(self.polish_method_combo, 34, 1)
|
||||
|
||||
self.layout.addStretch()
|
||||
|
||||
Reference in New Issue
Block a user