|
@@ -11,11 +11,11 @@
|
|
|
# Date: 3/10/2019 #
|
|
# Date: 3/10/2019 #
|
|
|
# ##########################################################
|
|
# ##########################################################
|
|
|
|
|
|
|
|
-from flatcamGUI.GUIElements import *
|
|
|
|
|
|
|
+from AppGUI.GUIElements import *
|
|
|
import sys
|
|
import sys
|
|
|
|
|
|
|
|
import gettext
|
|
import gettext
|
|
|
-import FlatCAMTranslation as fcTranslate
|
|
|
|
|
|
|
+import AppTranslation as fcTranslate
|
|
|
import builtins
|
|
import builtins
|
|
|
|
|
|
|
|
fcTranslate.apply_language('strings')
|
|
fcTranslate.apply_language('strings')
|
|
@@ -35,7 +35,7 @@ class ObjectUI(QtWidgets.QWidget):
|
|
|
put UI elements in ObjectUI.custom_box (QtWidgets.QLayout).
|
|
put UI elements in ObjectUI.custom_box (QtWidgets.QLayout).
|
|
|
"""
|
|
"""
|
|
|
|
|
|
|
|
- def __init__(self, app, icon_file='assets/resources/flatcam_icon32.png', title=_('FlatCAM Object'),
|
|
|
|
|
|
|
+ def __init__(self, app, icon_file='assets/resources/flatcam_icon32.png', title=_('App Object'),
|
|
|
parent=None, common=True):
|
|
parent=None, common=True):
|
|
|
QtWidgets.QWidget.__init__(self, parent=parent)
|
|
QtWidgets.QWidget.__init__(self, parent=parent)
|
|
|
|
|
|
|
@@ -114,7 +114,7 @@ class ObjectUI(QtWidgets.QWidget):
|
|
|
self.common_grid.addWidget(self.transform_label, 2, 0, 1, 2)
|
|
self.common_grid.addWidget(self.transform_label, 2, 0, 1, 2)
|
|
|
|
|
|
|
|
# ### Scale ####
|
|
# ### Scale ####
|
|
|
- self.scale_entry = FCEntry()
|
|
|
|
|
|
|
+ self.scale_entry = NumericalEvalEntry(border_color='#0069A9')
|
|
|
self.scale_entry.set_value(1.0)
|
|
self.scale_entry.set_value(1.0)
|
|
|
self.scale_entry.setToolTip(
|
|
self.scale_entry.setToolTip(
|
|
|
_("Factor by which to multiply\n"
|
|
_("Factor by which to multiply\n"
|
|
@@ -132,7 +132,7 @@ class ObjectUI(QtWidgets.QWidget):
|
|
|
self.common_grid.addWidget(self.scale_button, 3, 1)
|
|
self.common_grid.addWidget(self.scale_button, 3, 1)
|
|
|
|
|
|
|
|
# ### Offset ####
|
|
# ### Offset ####
|
|
|
- self.offsetvector_entry = EvalEntry2()
|
|
|
|
|
|
|
+ self.offsetvector_entry = NumericalEvalTupleEntry(border_color='#0069A9')
|
|
|
self.offsetvector_entry.setText("(0.0, 0.0)")
|
|
self.offsetvector_entry.setText("(0.0, 0.0)")
|
|
|
self.offsetvector_entry.setToolTip(
|
|
self.offsetvector_entry.setToolTip(
|
|
|
_("Amount by which to move the object\n"
|
|
_("Amount by which to move the object\n"
|
|
@@ -149,21 +149,30 @@ class ObjectUI(QtWidgets.QWidget):
|
|
|
self.common_grid.addWidget(self.offsetvector_entry, 4, 0)
|
|
self.common_grid.addWidget(self.offsetvector_entry, 4, 0)
|
|
|
self.common_grid.addWidget(self.offset_button, 4, 1)
|
|
self.common_grid.addWidget(self.offset_button, 4, 1)
|
|
|
|
|
|
|
|
|
|
+ self.transformations_button = QtWidgets.QPushButton(_('Transformations'))
|
|
|
|
|
+ self.transformations_button.setToolTip(
|
|
|
|
|
+ _("Geometrical transformations of the current object.")
|
|
|
|
|
+ )
|
|
|
|
|
+ self.common_grid.addWidget(self.transformations_button, 5, 0, 1, 2)
|
|
|
|
|
+
|
|
|
layout.addStretch()
|
|
layout.addStretch()
|
|
|
|
|
|
|
|
def confirmation_message(self, accepted, minval, maxval):
|
|
def confirmation_message(self, accepted, minval, maxval):
|
|
|
if accepted is False:
|
|
if accepted is False:
|
|
|
- self.app.inform.emit('[WARNING_NOTCL] %s: [%.*f, %.*f]' %
|
|
|
|
|
- (_("Edited value is out of range"), self.decimals, minval, self.decimals, maxval))
|
|
|
|
|
|
|
+ self.app.inform[str, bool].emit('[WARNING_NOTCL] %s: [%.*f, %.*f]' % (_("Edited value is out of range"),
|
|
|
|
|
+ self.decimals,
|
|
|
|
|
+ minval,
|
|
|
|
|
+ self.decimals,
|
|
|
|
|
+ maxval), False)
|
|
|
else:
|
|
else:
|
|
|
- self.app.inform.emit('[success] %s' % _("Edited value is within limits."))
|
|
|
|
|
|
|
+ self.app.inform[str, bool].emit('[success] %s' % _("Edited value is within limits."), False)
|
|
|
|
|
|
|
|
def confirmation_message_int(self, accepted, minval, maxval):
|
|
def confirmation_message_int(self, accepted, minval, maxval):
|
|
|
if accepted is False:
|
|
if accepted is False:
|
|
|
- self.app.inform.emit('[WARNING_NOTCL] %s: [%d, %d]' %
|
|
|
|
|
- (_("Edited value is out of range"), minval, maxval))
|
|
|
|
|
|
|
+ self.app.inform[str, bool].emit('[WARNING_NOTCL] %s: [%d, %d]' %
|
|
|
|
|
+ (_("Edited value is out of range"), minval, maxval), False)
|
|
|
else:
|
|
else:
|
|
|
- self.app.inform.emit('[success] %s' % _("Edited value is within limits."))
|
|
|
|
|
|
|
+ self.app.inform[str, bool].emit('[success] %s' % _("Edited value is within limits."), False)
|
|
|
|
|
|
|
|
|
|
|
|
|
class GerberObjectUI(ObjectUI):
|
|
class GerberObjectUI(ObjectUI):
|
|
@@ -205,27 +214,37 @@ class GerberObjectUI(ObjectUI):
|
|
|
self.multicolored_cb.setMinimumWidth(55)
|
|
self.multicolored_cb.setMinimumWidth(55)
|
|
|
grid0.addWidget(self.multicolored_cb, 0, 2)
|
|
grid0.addWidget(self.multicolored_cb, 0, 2)
|
|
|
|
|
|
|
|
- # Plot CB
|
|
|
|
|
- self.plot_cb = FCCheckBox('%s' % _("Plot"))
|
|
|
|
|
- # self.plot_cb.setLayoutDirection(QtCore.Qt.RightToLeft)
|
|
|
|
|
- self.plot_cb.setToolTip(_("Plot (show) this object."))
|
|
|
|
|
-
|
|
|
|
|
- grid0.addWidget(self.plot_cb, 1, 0, 1, 2)
|
|
|
|
|
-
|
|
|
|
|
# ## Object name
|
|
# ## Object name
|
|
|
self.name_hlay = QtWidgets.QHBoxLayout()
|
|
self.name_hlay = QtWidgets.QHBoxLayout()
|
|
|
- self.custom_box.addLayout(self.name_hlay)
|
|
|
|
|
|
|
+ grid0.addLayout(self.name_hlay, 1, 0, 1, 3)
|
|
|
|
|
+
|
|
|
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)
|
|
|
self.name_hlay.addWidget(name_label)
|
|
self.name_hlay.addWidget(name_label)
|
|
|
self.name_hlay.addWidget(self.name_entry)
|
|
self.name_hlay.addWidget(self.name_entry)
|
|
|
|
|
|
|
|
|
|
+ # Plot CB
|
|
|
|
|
+ self.plot_lbl = FCLabel('%s:' % _("Plot"))
|
|
|
|
|
+ self.plot_lbl.setToolTip(_("Plot (show) this object."))
|
|
|
|
|
+ self.plot_cb = FCCheckBox()
|
|
|
|
|
+
|
|
|
|
|
+ grid0.addWidget(self.plot_lbl, 2, 0)
|
|
|
|
|
+ grid0.addWidget(self.plot_cb, 2, 1)
|
|
|
|
|
+
|
|
|
|
|
+ # generate follow
|
|
|
|
|
+ self.follow_cb = FCCheckBox('%s' % _("Follow"))
|
|
|
|
|
+ self.follow_cb.setToolTip(_("Generate a 'Follow' geometry.\n"
|
|
|
|
|
+ "This means that it will cut through\n"
|
|
|
|
|
+ "the middle of the trace."))
|
|
|
|
|
+ self.follow_cb.setMinimumWidth(55)
|
|
|
|
|
+ grid0.addWidget(self.follow_cb, 2, 2)
|
|
|
|
|
+
|
|
|
hlay_plot = QtWidgets.QHBoxLayout()
|
|
hlay_plot = QtWidgets.QHBoxLayout()
|
|
|
self.custom_box.addLayout(hlay_plot)
|
|
self.custom_box.addLayout(hlay_plot)
|
|
|
|
|
|
|
|
# ### Gerber Apertures ####
|
|
# ### Gerber Apertures ####
|
|
|
- self.apertures_table_label = QtWidgets.QLabel('<b>%s:</b>' % _('Apertures'))
|
|
|
|
|
|
|
+ self.apertures_table_label = QtWidgets.QLabel('%s:' % _('Apertures'))
|
|
|
self.apertures_table_label.setToolTip(
|
|
self.apertures_table_label.setToolTip(
|
|
|
_("Apertures Table for the Gerber Object.")
|
|
_("Apertures Table for the Gerber Object.")
|
|
|
)
|
|
)
|
|
@@ -282,254 +301,7 @@ class GerberObjectUI(ObjectUI):
|
|
|
# start with apertures table hidden
|
|
# start with apertures table hidden
|
|
|
self.apertures_table.setVisible(False)
|
|
self.apertures_table.setVisible(False)
|
|
|
|
|
|
|
|
- separator_line = QtWidgets.QFrame()
|
|
|
|
|
- separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
|
|
|
|
- separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
|
|
|
- self.custom_box.addWidget(separator_line)
|
|
|
|
|
-
|
|
|
|
|
- # Isolation Routing
|
|
|
|
|
- self.isolation_routing_label = QtWidgets.QLabel("<b>%s</b>" % _("Isolation Routing"))
|
|
|
|
|
- self.isolation_routing_label.setToolTip(
|
|
|
|
|
- _("Create a Geometry object with\n"
|
|
|
|
|
- "toolpaths to cut outside polygons.")
|
|
|
|
|
- )
|
|
|
|
|
- self.custom_box.addWidget(self.isolation_routing_label)
|
|
|
|
|
-
|
|
|
|
|
- # ###########################################
|
|
|
|
|
- # ########## NEW GRID #######################
|
|
|
|
|
- # ###########################################
|
|
|
|
|
-
|
|
|
|
|
- grid1 = QtWidgets.QGridLayout()
|
|
|
|
|
- self.custom_box.addLayout(grid1)
|
|
|
|
|
- grid1.setColumnStretch(0, 0)
|
|
|
|
|
- grid1.setColumnStretch(1, 1)
|
|
|
|
|
- grid1.setColumnStretch(2, 1)
|
|
|
|
|
-
|
|
|
|
|
- # Tool Type
|
|
|
|
|
- self.tool_type_label = QtWidgets.QLabel('%s:' % _('Tool Type'))
|
|
|
|
|
- self.tool_type_label.setToolTip(
|
|
|
|
|
- _("Choose which tool to use for Gerber isolation:\n"
|
|
|
|
|
- "'Circular' or 'V-shape'.\n"
|
|
|
|
|
- "When the 'V-shape' is selected then the tool\n"
|
|
|
|
|
- "diameter will depend on the chosen cut depth.")
|
|
|
|
|
- )
|
|
|
|
|
- self.tool_type_radio = RadioSet([{'label': _('Circular'), 'value': 'circular'},
|
|
|
|
|
- {'label': _('V-Shape'), 'value': 'v'}])
|
|
|
|
|
-
|
|
|
|
|
- grid1.addWidget(self.tool_type_label, 0, 0)
|
|
|
|
|
- grid1.addWidget(self.tool_type_radio, 0, 1, 1, 2)
|
|
|
|
|
-
|
|
|
|
|
- # Tip Dia
|
|
|
|
|
- self.tipdialabel = QtWidgets.QLabel('%s:' % _('V-Tip Dia'))
|
|
|
|
|
- self.tipdialabel.setToolTip(
|
|
|
|
|
- _("The tip diameter for V-Shape Tool")
|
|
|
|
|
- )
|
|
|
|
|
- self.tipdia_spinner = FCDoubleSpinner(callback=self.confirmation_message)
|
|
|
|
|
- self.tipdia_spinner.set_range(-99.9999, 99.9999)
|
|
|
|
|
- self.tipdia_spinner.set_precision(self.decimals)
|
|
|
|
|
- self.tipdia_spinner.setSingleStep(0.1)
|
|
|
|
|
- self.tipdia_spinner.setWrapping(True)
|
|
|
|
|
- grid1.addWidget(self.tipdialabel, 1, 0)
|
|
|
|
|
- grid1.addWidget(self.tipdia_spinner, 1, 1, 1, 2)
|
|
|
|
|
-
|
|
|
|
|
- # Tip Angle
|
|
|
|
|
- self.tipanglelabel = QtWidgets.QLabel('%s:' % _('V-Tip Angle'))
|
|
|
|
|
- self.tipanglelabel.setToolTip(
|
|
|
|
|
- _("The tip angle for V-Shape Tool.\n"
|
|
|
|
|
- "In degree.")
|
|
|
|
|
- )
|
|
|
|
|
- self.tipangle_spinner = FCDoubleSpinner(callback=self.confirmation_message)
|
|
|
|
|
- self.tipangle_spinner.set_range(1, 180)
|
|
|
|
|
- self.tipangle_spinner.set_precision(self.decimals)
|
|
|
|
|
- self.tipangle_spinner.setSingleStep(5)
|
|
|
|
|
- self.tipangle_spinner.setWrapping(True)
|
|
|
|
|
- grid1.addWidget(self.tipanglelabel, 2, 0)
|
|
|
|
|
- grid1.addWidget(self.tipangle_spinner, 2, 1, 1, 2)
|
|
|
|
|
-
|
|
|
|
|
- # Cut Z
|
|
|
|
|
- self.cutzlabel = QtWidgets.QLabel('%s:' % _('Cut Z'))
|
|
|
|
|
- self.cutzlabel.setToolTip(
|
|
|
|
|
- _("Cutting depth (negative)\n"
|
|
|
|
|
- "below the copper surface.")
|
|
|
|
|
- )
|
|
|
|
|
- self.cutz_spinner = FCDoubleSpinner(callback=self.confirmation_message)
|
|
|
|
|
- self.cutz_spinner.set_range(-9999.9999, 0.0000)
|
|
|
|
|
- self.cutz_spinner.set_precision(self.decimals)
|
|
|
|
|
- self.cutz_spinner.setSingleStep(0.1)
|
|
|
|
|
- self.cutz_spinner.setWrapping(True)
|
|
|
|
|
- grid1.addWidget(self.cutzlabel, 3, 0)
|
|
|
|
|
- grid1.addWidget(self.cutz_spinner, 3, 1, 1, 2)
|
|
|
|
|
-
|
|
|
|
|
- # Tool diameter
|
|
|
|
|
- tdlabel = QtWidgets.QLabel('%s:' % _('Tool dia'))
|
|
|
|
|
- tdlabel.setToolTip(
|
|
|
|
|
- _("Diameter of the cutting tool.\n"
|
|
|
|
|
- "If you want to have an isolation path\n"
|
|
|
|
|
- "inside the actual shape of the Gerber\n"
|
|
|
|
|
- "feature, use a negative value for\n"
|
|
|
|
|
- "this parameter.")
|
|
|
|
|
- )
|
|
|
|
|
- tdlabel.setMinimumWidth(90)
|
|
|
|
|
- self.iso_tool_dia_entry = FCDoubleSpinner(callback=self.confirmation_message)
|
|
|
|
|
- self.iso_tool_dia_entry.set_range(-9999.9999, 9999.9999)
|
|
|
|
|
- self.iso_tool_dia_entry.set_precision(self.decimals)
|
|
|
|
|
- self.iso_tool_dia_entry.setSingleStep(0.1)
|
|
|
|
|
-
|
|
|
|
|
- grid1.addWidget(tdlabel, 4, 0)
|
|
|
|
|
- grid1.addWidget(self.iso_tool_dia_entry, 4, 1, 1, 2)
|
|
|
|
|
-
|
|
|
|
|
- # Number of Passes
|
|
|
|
|
- passlabel = QtWidgets.QLabel('%s:' % _('# Passes'))
|
|
|
|
|
- passlabel.setToolTip(
|
|
|
|
|
- _("Width of the isolation gap in\n"
|
|
|
|
|
- "number (integer) of tool widths.")
|
|
|
|
|
- )
|
|
|
|
|
- passlabel.setMinimumWidth(90)
|
|
|
|
|
- self.iso_width_entry = FCSpinner(callback=self.confirmation_message_int)
|
|
|
|
|
- self.iso_width_entry.set_range(1, 999)
|
|
|
|
|
-
|
|
|
|
|
- grid1.addWidget(passlabel, 5, 0)
|
|
|
|
|
- grid1.addWidget(self.iso_width_entry, 5, 1, 1, 2)
|
|
|
|
|
-
|
|
|
|
|
- # Pass overlap
|
|
|
|
|
- overlabel = QtWidgets.QLabel('%s:' % _('Pass overlap'))
|
|
|
|
|
- overlabel.setToolTip(
|
|
|
|
|
- _("How much (percentage) of the tool width to overlap each tool pass.")
|
|
|
|
|
- )
|
|
|
|
|
- overlabel.setMinimumWidth(90)
|
|
|
|
|
- self.iso_overlap_entry = FCDoubleSpinner(suffix='%', callback=self.confirmation_message)
|
|
|
|
|
- self.iso_overlap_entry.set_precision(self.decimals)
|
|
|
|
|
- self.iso_overlap_entry.setWrapping(True)
|
|
|
|
|
- self.iso_overlap_entry.set_range(0.0000, 99.9999)
|
|
|
|
|
- self.iso_overlap_entry.setSingleStep(0.1)
|
|
|
|
|
- grid1.addWidget(overlabel, 6, 0)
|
|
|
|
|
- grid1.addWidget(self.iso_overlap_entry, 6, 1, 1, 2)
|
|
|
|
|
-
|
|
|
|
|
- # Milling Type Radio Button
|
|
|
|
|
- self.milling_type_label = QtWidgets.QLabel('%s:' % _('Milling Type'))
|
|
|
|
|
- self.milling_type_label.setToolTip(
|
|
|
|
|
- _("Milling type:\n"
|
|
|
|
|
- "- climb / best for precision milling and to reduce tool usage\n"
|
|
|
|
|
- "- conventional / useful when there is no backlash compensation")
|
|
|
|
|
- )
|
|
|
|
|
- self.milling_type_radio = RadioSet([{'label': _('Climb'), 'value': 'cl'},
|
|
|
|
|
- {'label': _('Conventional'), 'value': 'cv'}])
|
|
|
|
|
- grid1.addWidget(self.milling_type_label, 7, 0)
|
|
|
|
|
- grid1.addWidget(self.milling_type_radio, 7, 1, 1, 2)
|
|
|
|
|
-
|
|
|
|
|
- # combine all passes CB
|
|
|
|
|
- self.combine_passes_cb = FCCheckBox(label=_('Combine'))
|
|
|
|
|
- self.combine_passes_cb.setToolTip(
|
|
|
|
|
- _("Combine all passes into one object")
|
|
|
|
|
- )
|
|
|
|
|
-
|
|
|
|
|
- # generate follow
|
|
|
|
|
- self.follow_cb = FCCheckBox(label=_('"Follow"'))
|
|
|
|
|
- self.follow_cb.setToolTip(_("Generate a 'Follow' geometry.\n"
|
|
|
|
|
- "This means that it will cut through\n"
|
|
|
|
|
- "the middle of the trace."))
|
|
|
|
|
- grid1.addWidget(self.combine_passes_cb, 8, 0)
|
|
|
|
|
-
|
|
|
|
|
- # avoid an area from isolation
|
|
|
|
|
- self.except_cb = FCCheckBox(label=_('Except'))
|
|
|
|
|
- grid1.addWidget(self.follow_cb, 8, 1)
|
|
|
|
|
-
|
|
|
|
|
- self.except_cb.setToolTip(_("When the isolation geometry is generated,\n"
|
|
|
|
|
- "by checking this, the area of the object below\n"
|
|
|
|
|
- "will be subtracted from the isolation geometry."))
|
|
|
|
|
- grid1.addWidget(self.except_cb, 8, 2)
|
|
|
|
|
-
|
|
|
|
|
- # ## Form Layout
|
|
|
|
|
- form_layout = QtWidgets.QFormLayout()
|
|
|
|
|
- grid1.addLayout(form_layout, 9, 0, 1, 3)
|
|
|
|
|
-
|
|
|
|
|
- # ################################################
|
|
|
|
|
- # ##### Type of object to be excepted ############
|
|
|
|
|
- # ################################################
|
|
|
|
|
- self.type_obj_combo = FCComboBox()
|
|
|
|
|
- self.type_obj_combo.addItems([_("Gerber"), _("Geometry")])
|
|
|
|
|
-
|
|
|
|
|
- # we get rid of item1 ("Excellon") as it is not suitable
|
|
|
|
|
- # self.type_obj_combo.view().setRowHidden(1, True)
|
|
|
|
|
- self.type_obj_combo.setItemIcon(0, QtGui.QIcon(self.resource_loc + "/flatcam_icon16.png"))
|
|
|
|
|
- self.type_obj_combo.setItemIcon(1, QtGui.QIcon(self.resource_loc + "/geometry16.png"))
|
|
|
|
|
-
|
|
|
|
|
- self.type_obj_combo_label = QtWidgets.QLabel('%s:' % _("Obj Type"))
|
|
|
|
|
- self.type_obj_combo_label.setToolTip(
|
|
|
|
|
- _("Specify the type of object to be excepted from isolation.\n"
|
|
|
|
|
- "It can be of type: Gerber or Geometry.\n"
|
|
|
|
|
- "What is selected here will dictate the kind\n"
|
|
|
|
|
- "of objects that will populate the 'Object' combobox.")
|
|
|
|
|
- )
|
|
|
|
|
- # self.type_obj_combo_label.setMinimumWidth(60)
|
|
|
|
|
- form_layout.addRow(self.type_obj_combo_label, self.type_obj_combo)
|
|
|
|
|
-
|
|
|
|
|
- # ################################################
|
|
|
|
|
- # ##### The object to be excepted ################
|
|
|
|
|
- # ################################################
|
|
|
|
|
- self.obj_combo = FCComboBox()
|
|
|
|
|
-
|
|
|
|
|
- self.obj_label = QtWidgets.QLabel('%s:' % _("Object"))
|
|
|
|
|
- self.obj_label.setToolTip(_("Object whose area will be removed from isolation geometry."))
|
|
|
|
|
-
|
|
|
|
|
- form_layout.addRow(self.obj_label, self.obj_combo)
|
|
|
|
|
-
|
|
|
|
|
- # ---------------------------------------------- #
|
|
|
|
|
- # --------- Isolation scope -------------------- #
|
|
|
|
|
- # ---------------------------------------------- #
|
|
|
|
|
- self.iso_scope_label = QtWidgets.QLabel('<b>%s:</b>' % _('Scope'))
|
|
|
|
|
- self.iso_scope_label.setToolTip(
|
|
|
|
|
- _("Isolation scope. Choose what to isolate:\n"
|
|
|
|
|
- "- 'All' -> Isolate all the polygons in the object\n"
|
|
|
|
|
- "- 'Selection' -> Isolate a selection of polygons.")
|
|
|
|
|
- )
|
|
|
|
|
- self.iso_scope_radio = RadioSet([{'label': _('All'), 'value': 'all'},
|
|
|
|
|
- {'label': _('Selection'), 'value': 'single'}])
|
|
|
|
|
-
|
|
|
|
|
- grid1.addWidget(self.iso_scope_label, 10, 0)
|
|
|
|
|
- grid1.addWidget(self.iso_scope_radio, 10, 1, 1, 2)
|
|
|
|
|
-
|
|
|
|
|
- # ---------------------------------------------- #
|
|
|
|
|
- # --------- Isolation type -------------------- #
|
|
|
|
|
- # ---------------------------------------------- #
|
|
|
|
|
- self.iso_type_label = QtWidgets.QLabel('<b>%s:</b>' % _('Isolation Type'))
|
|
|
|
|
- self.iso_type_label.setToolTip(
|
|
|
|
|
- _("Choose how the isolation will be executed:\n"
|
|
|
|
|
- "- 'Full' -> complete isolation of polygons\n"
|
|
|
|
|
- "- 'Ext' -> will isolate only on the outside\n"
|
|
|
|
|
- "- 'Int' -> will isolate only on the inside\n"
|
|
|
|
|
- "'Exterior' isolation is almost always possible\n"
|
|
|
|
|
- "(with the right tool) but 'Interior'\n"
|
|
|
|
|
- "isolation can be done only when there is an opening\n"
|
|
|
|
|
- "inside of the polygon (e.g polygon is a 'doughnut' shape).")
|
|
|
|
|
- )
|
|
|
|
|
- self.iso_type_radio = RadioSet([{'label': _('Full'), 'value': 'full'},
|
|
|
|
|
- {'label': _('Ext'), 'value': 'ext'},
|
|
|
|
|
- {'label': _('Int'), 'value': 'int'}])
|
|
|
|
|
-
|
|
|
|
|
- grid1.addWidget(self.iso_type_label, 11, 0)
|
|
|
|
|
- grid1.addWidget(self.iso_type_radio, 11, 1, 1, 2)
|
|
|
|
|
-
|
|
|
|
|
- self.generate_iso_button = QtWidgets.QPushButton("%s" % _("Generate Isolation Geometry"))
|
|
|
|
|
- self.generate_iso_button.setStyleSheet("""
|
|
|
|
|
- QPushButton
|
|
|
|
|
- {
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- }
|
|
|
|
|
- """)
|
|
|
|
|
- self.generate_iso_button.setToolTip(
|
|
|
|
|
- _("Create a Geometry object with toolpaths to cut \n"
|
|
|
|
|
- "isolation outside, inside or on both sides of the\n"
|
|
|
|
|
- "object. For a Gerber object outside means outside\n"
|
|
|
|
|
- "of the Gerber feature and inside means inside of\n"
|
|
|
|
|
- "the Gerber feature, if possible at all. This means\n"
|
|
|
|
|
- "that only if the Gerber feature has openings inside, they\n"
|
|
|
|
|
- "will be isolated. If what is wanted is to cut isolation\n"
|
|
|
|
|
- "inside the actual Gerber feature, use a negative tool\n"
|
|
|
|
|
- "diameter above.")
|
|
|
|
|
- )
|
|
|
|
|
- grid1.addWidget(self.generate_iso_button, 12, 0, 1, 3)
|
|
|
|
|
-
|
|
|
|
|
|
|
+ # Buffer Geometry
|
|
|
self.create_buffer_button = QtWidgets.QPushButton(_('Buffer Solid Geometry'))
|
|
self.create_buffer_button = QtWidgets.QPushButton(_('Buffer Solid Geometry'))
|
|
|
self.create_buffer_button.setToolTip(
|
|
self.create_buffer_button.setToolTip(
|
|
|
_("This button is shown only when the Gerber file\n"
|
|
_("This button is shown only when the Gerber file\n"
|
|
@@ -537,19 +309,12 @@ class GerberObjectUI(ObjectUI):
|
|
|
"Clicking this will create the buffered geometry\n"
|
|
"Clicking this will create the buffered geometry\n"
|
|
|
"required for isolation.")
|
|
"required for isolation.")
|
|
|
)
|
|
)
|
|
|
- grid1.addWidget(self.create_buffer_button, 13, 0, 1, 3)
|
|
|
|
|
|
|
+ self.custom_box.addWidget(self.create_buffer_button)
|
|
|
|
|
|
|
|
- self.ohis_iso = OptionalHideInputSection(
|
|
|
|
|
- self.except_cb,
|
|
|
|
|
- [self.type_obj_combo, self.type_obj_combo_label, self.obj_combo, self.obj_label],
|
|
|
|
|
- logic=True
|
|
|
|
|
- )
|
|
|
|
|
-
|
|
|
|
|
- separator_line2 = QtWidgets.QFrame()
|
|
|
|
|
- separator_line2.setFrameShape(QtWidgets.QFrame.HLine)
|
|
|
|
|
- separator_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
|
|
|
- grid1.addWidget(separator_line2, 14, 0, 1, 3)
|
|
|
|
|
- # grid1.addWidget(QtWidgets.QLabel(''), 15, 0)
|
|
|
|
|
|
|
+ separator_line = QtWidgets.QFrame()
|
|
|
|
|
+ separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
|
|
|
|
+ separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
|
|
|
+ self.custom_box.addWidget(separator_line)
|
|
|
|
|
|
|
|
# ###########################################
|
|
# ###########################################
|
|
|
# ########## NEW GRID #######################
|
|
# ########## NEW GRID #######################
|
|
@@ -563,14 +328,21 @@ class GerberObjectUI(ObjectUI):
|
|
|
self.tool_lbl = QtWidgets.QLabel('<b>%s</b>' % _("TOOLS"))
|
|
self.tool_lbl = QtWidgets.QLabel('<b>%s</b>' % _("TOOLS"))
|
|
|
grid2.addWidget(self.tool_lbl, 0, 0, 1, 2)
|
|
grid2.addWidget(self.tool_lbl, 0, 0, 1, 2)
|
|
|
|
|
|
|
|
- # ## Clear non-copper regions
|
|
|
|
|
- self.clearcopper_label = QtWidgets.QLabel("%s" % _("Clear N-copper"))
|
|
|
|
|
- self.clearcopper_label.setToolTip(
|
|
|
|
|
|
|
+ # Isolation Tool - will create isolation paths around the copper features
|
|
|
|
|
+ self.iso_button = QtWidgets.QPushButton(_('Isolation Routing'))
|
|
|
|
|
+ self.iso_button.setToolTip(
|
|
|
_("Create a Geometry object with\n"
|
|
_("Create a Geometry object with\n"
|
|
|
- "toolpaths to cut all non-copper regions.")
|
|
|
|
|
|
|
+ "toolpaths to cut around polygons.")
|
|
|
)
|
|
)
|
|
|
- self.clearcopper_label.setMinimumWidth(90)
|
|
|
|
|
|
|
+ self.iso_button.setStyleSheet("""
|
|
|
|
|
+ QPushButton
|
|
|
|
|
+ {
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ }
|
|
|
|
|
+ """)
|
|
|
|
|
+ grid2.addWidget(self.iso_button, 1, 0, 1, 2)
|
|
|
|
|
|
|
|
|
|
+ # ## Clear non-copper regions
|
|
|
self.generate_ncc_button = QtWidgets.QPushButton(_('NCC Tool'))
|
|
self.generate_ncc_button = QtWidgets.QPushButton(_('NCC Tool'))
|
|
|
self.generate_ncc_button.setToolTip(
|
|
self.generate_ncc_button.setToolTip(
|
|
|
_("Create the Geometry Object\n"
|
|
_("Create the Geometry Object\n"
|
|
@@ -582,17 +354,9 @@ class GerberObjectUI(ObjectUI):
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
}
|
|
}
|
|
|
""")
|
|
""")
|
|
|
- grid2.addWidget(self.clearcopper_label, 1, 0)
|
|
|
|
|
- grid2.addWidget(self.generate_ncc_button, 1, 1)
|
|
|
|
|
|
|
+ grid2.addWidget(self.generate_ncc_button, 2, 0, 1, 2)
|
|
|
|
|
|
|
|
# ## Board cutout
|
|
# ## Board cutout
|
|
|
- self.board_cutout_label = QtWidgets.QLabel("%s" % _("Board cutout"))
|
|
|
|
|
- self.board_cutout_label.setToolTip(
|
|
|
|
|
- _("Create toolpaths to cut around\n"
|
|
|
|
|
- "the PCB and separate it from\n"
|
|
|
|
|
- "the original board.")
|
|
|
|
|
- )
|
|
|
|
|
-
|
|
|
|
|
self.generate_cutout_button = QtWidgets.QPushButton(_('Cutout Tool'))
|
|
self.generate_cutout_button = QtWidgets.QPushButton(_('Cutout Tool'))
|
|
|
self.generate_cutout_button.setToolTip(
|
|
self.generate_cutout_button.setToolTip(
|
|
|
_("Generate the geometry for\n"
|
|
_("Generate the geometry for\n"
|
|
@@ -604,13 +368,12 @@ class GerberObjectUI(ObjectUI):
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
}
|
|
}
|
|
|
""")
|
|
""")
|
|
|
- grid2.addWidget(self.board_cutout_label, 2, 0)
|
|
|
|
|
- grid2.addWidget(self.generate_cutout_button, 2, 1)
|
|
|
|
|
|
|
+ grid2.addWidget(self.generate_cutout_button, 3, 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)
|
|
|
- grid2.addWidget(separator_line, 3, 0, 1, 2)
|
|
|
|
|
|
|
+ grid2.addWidget(separator_line, 4, 0, 1, 2)
|
|
|
|
|
|
|
|
# ## Non-copper regions
|
|
# ## Non-copper regions
|
|
|
self.noncopper_label = QtWidgets.QLabel("<b>%s</b>" % _("Non-copper regions"))
|
|
self.noncopper_label = QtWidgets.QLabel("<b>%s</b>" % _("Non-copper regions"))
|
|
@@ -622,7 +385,7 @@ class GerberObjectUI(ObjectUI):
|
|
|
"copper from a specified region.")
|
|
"copper from a specified region.")
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
- grid2.addWidget(self.noncopper_label, 4, 0, 1, 2)
|
|
|
|
|
|
|
+ grid2.addWidget(self.noncopper_label, 5, 0, 1, 2)
|
|
|
|
|
|
|
|
# Margin
|
|
# Margin
|
|
|
bmlabel = QtWidgets.QLabel('%s:' % _('Boundary Margin'))
|
|
bmlabel = QtWidgets.QLabel('%s:' % _('Boundary Margin'))
|
|
@@ -638,8 +401,8 @@ class GerberObjectUI(ObjectUI):
|
|
|
self.noncopper_margin_entry.set_precision(self.decimals)
|
|
self.noncopper_margin_entry.set_precision(self.decimals)
|
|
|
self.noncopper_margin_entry.setSingleStep(0.1)
|
|
self.noncopper_margin_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- grid2.addWidget(bmlabel, 5, 0)
|
|
|
|
|
- grid2.addWidget(self.noncopper_margin_entry, 5, 1)
|
|
|
|
|
|
|
+ grid2.addWidget(bmlabel, 6, 0)
|
|
|
|
|
+ grid2.addWidget(self.noncopper_margin_entry, 6, 1)
|
|
|
|
|
|
|
|
# Rounded corners
|
|
# Rounded corners
|
|
|
self.noncopper_rounded_cb = FCCheckBox(label=_("Rounded Geo"))
|
|
self.noncopper_rounded_cb = FCCheckBox(label=_("Rounded Geo"))
|
|
@@ -649,13 +412,13 @@ class GerberObjectUI(ObjectUI):
|
|
|
self.noncopper_rounded_cb.setMinimumWidth(90)
|
|
self.noncopper_rounded_cb.setMinimumWidth(90)
|
|
|
|
|
|
|
|
self.generate_noncopper_button = QtWidgets.QPushButton(_('Generate Geo'))
|
|
self.generate_noncopper_button = QtWidgets.QPushButton(_('Generate Geo'))
|
|
|
- grid2.addWidget(self.noncopper_rounded_cb, 6, 0)
|
|
|
|
|
- grid2.addWidget(self.generate_noncopper_button, 6, 1)
|
|
|
|
|
|
|
+ grid2.addWidget(self.noncopper_rounded_cb, 7, 0)
|
|
|
|
|
+ grid2.addWidget(self.generate_noncopper_button, 7, 1)
|
|
|
|
|
|
|
|
separator_line1 = QtWidgets.QFrame()
|
|
separator_line1 = QtWidgets.QFrame()
|
|
|
separator_line1.setFrameShape(QtWidgets.QFrame.HLine)
|
|
separator_line1.setFrameShape(QtWidgets.QFrame.HLine)
|
|
|
separator_line1.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
separator_line1.setFrameShadow(QtWidgets.QFrame.Sunken)
|
|
|
- grid2.addWidget(separator_line1, 7, 0, 1, 2)
|
|
|
|
|
|
|
+ grid2.addWidget(separator_line1, 8, 0, 1, 2)
|
|
|
|
|
|
|
|
# ## Bounding box
|
|
# ## Bounding box
|
|
|
self.boundingbox_label = QtWidgets.QLabel('<b>%s</b>' % _('Bounding Box'))
|
|
self.boundingbox_label = QtWidgets.QLabel('<b>%s</b>' % _('Bounding Box'))
|
|
@@ -664,7 +427,7 @@ class GerberObjectUI(ObjectUI):
|
|
|
"Square shape.")
|
|
"Square shape.")
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
- grid2.addWidget(self.boundingbox_label, 8, 0, 1, 2)
|
|
|
|
|
|
|
+ grid2.addWidget(self.boundingbox_label, 9, 0, 1, 2)
|
|
|
|
|
|
|
|
bbmargin = QtWidgets.QLabel('%s:' % _('Boundary Margin'))
|
|
bbmargin = QtWidgets.QLabel('%s:' % _('Boundary Margin'))
|
|
|
bbmargin.setToolTip(
|
|
bbmargin.setToolTip(
|
|
@@ -677,8 +440,8 @@ class GerberObjectUI(ObjectUI):
|
|
|
self.bbmargin_entry.set_precision(self.decimals)
|
|
self.bbmargin_entry.set_precision(self.decimals)
|
|
|
self.bbmargin_entry.setSingleStep(0.1)
|
|
self.bbmargin_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- grid2.addWidget(bbmargin, 9, 0)
|
|
|
|
|
- grid2.addWidget(self.bbmargin_entry, 9, 1)
|
|
|
|
|
|
|
+ grid2.addWidget(bbmargin, 10, 0)
|
|
|
|
|
+ grid2.addWidget(self.bbmargin_entry, 10, 1)
|
|
|
|
|
|
|
|
self.bbrounded_cb = FCCheckBox(label=_("Rounded Geo"))
|
|
self.bbrounded_cb = FCCheckBox(label=_("Rounded Geo"))
|
|
|
self.bbrounded_cb.setToolTip(
|
|
self.bbrounded_cb.setToolTip(
|
|
@@ -693,8 +456,8 @@ class GerberObjectUI(ObjectUI):
|
|
|
self.generate_bb_button.setToolTip(
|
|
self.generate_bb_button.setToolTip(
|
|
|
_("Generate the Geometry object.")
|
|
_("Generate the Geometry object.")
|
|
|
)
|
|
)
|
|
|
- grid2.addWidget(self.bbrounded_cb, 10, 0)
|
|
|
|
|
- grid2.addWidget(self.generate_bb_button, 10, 1)
|
|
|
|
|
|
|
+ grid2.addWidget(self.bbrounded_cb, 11, 0)
|
|
|
|
|
+ grid2.addWidget(self.generate_bb_button, 11, 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
class ExcellonObjectUI(ObjectUI):
|
|
class ExcellonObjectUI(ObjectUI):
|
|
@@ -723,22 +486,38 @@ class ExcellonObjectUI(ObjectUI):
|
|
|
parent=parent,
|
|
parent=parent,
|
|
|
app=self.app)
|
|
app=self.app)
|
|
|
|
|
|
|
|
- # ### Plot options ####
|
|
|
|
|
- hlay_plot = QtWidgets.QHBoxLayout()
|
|
|
|
|
- self.custom_box.addLayout(hlay_plot)
|
|
|
|
|
|
|
+ # Plot options
|
|
|
|
|
+ grid_h = QtWidgets.QGridLayout()
|
|
|
|
|
+ grid_h.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
|
|
|
|
|
+ self.custom_box.addLayout(grid_h)
|
|
|
|
|
+ grid_h.setColumnStretch(0, 0)
|
|
|
|
|
+ grid_h.setColumnStretch(1, 1)
|
|
|
|
|
|
|
|
self.plot_options_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
|
|
self.plot_options_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
|
|
|
|
|
+ self.plot_options_label.setMinimumWidth(90)
|
|
|
|
|
+
|
|
|
|
|
+ grid_h.addWidget(self.plot_options_label, 0, 0)
|
|
|
|
|
+
|
|
|
|
|
+ # Solid CB
|
|
|
self.solid_cb = FCCheckBox(label=_('Solid'))
|
|
self.solid_cb = FCCheckBox(label=_('Solid'))
|
|
|
self.solid_cb.setToolTip(
|
|
self.solid_cb.setToolTip(
|
|
|
_("Solid circles.")
|
|
_("Solid circles.")
|
|
|
)
|
|
)
|
|
|
- hlay_plot.addWidget(self.plot_options_label)
|
|
|
|
|
- hlay_plot.addStretch()
|
|
|
|
|
- hlay_plot.addWidget(self.solid_cb)
|
|
|
|
|
|
|
+ self.solid_cb.setMinimumWidth(50)
|
|
|
|
|
+ grid_h.addWidget(self.solid_cb, 0, 1)
|
|
|
|
|
+
|
|
|
|
|
+ # Multicolored CB
|
|
|
|
|
+ self.multicolored_cb = FCCheckBox(label=_('Multi-Color'))
|
|
|
|
|
+ self.multicolored_cb.setToolTip(
|
|
|
|
|
+ _("Draw polygons in different colors.")
|
|
|
|
|
+ )
|
|
|
|
|
+ self.multicolored_cb.setMinimumWidth(55)
|
|
|
|
|
+ grid_h.addWidget(self.multicolored_cb, 0, 2)
|
|
|
|
|
|
|
|
# ## Object name
|
|
# ## Object name
|
|
|
self.name_hlay = QtWidgets.QHBoxLayout()
|
|
self.name_hlay = QtWidgets.QHBoxLayout()
|
|
|
- self.custom_box.addLayout(self.name_hlay)
|
|
|
|
|
|
|
+ grid_h.addLayout(self.name_hlay, 1, 0, 1, 3)
|
|
|
|
|
+
|
|
|
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)
|
|
@@ -1525,12 +1304,28 @@ class GeometryObjectUI(ObjectUI):
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
# Plot options
|
|
# Plot options
|
|
|
|
|
+ grid_header = QtWidgets.QGridLayout()
|
|
|
|
|
+ grid_header.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
|
|
|
|
|
+ self.custom_box.addLayout(grid_header)
|
|
|
|
|
+ grid_header.setColumnStretch(0, 0)
|
|
|
|
|
+ grid_header.setColumnStretch(1, 1)
|
|
|
|
|
+
|
|
|
self.plot_options_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
|
|
self.plot_options_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
|
|
|
- self.custom_box.addWidget(self.plot_options_label)
|
|
|
|
|
|
|
+ self.plot_options_label.setMinimumWidth(90)
|
|
|
|
|
+
|
|
|
|
|
+ grid_header.addWidget(self.plot_options_label, 0, 0)
|
|
|
|
|
+
|
|
|
|
|
+ # Multicolored CB
|
|
|
|
|
+ self.multicolored_cb = FCCheckBox(label=_('Multi-Color'))
|
|
|
|
|
+ self.multicolored_cb.setToolTip(
|
|
|
|
|
+ _("Draw polygons in different colors.")
|
|
|
|
|
+ )
|
|
|
|
|
+ self.multicolored_cb.setMinimumWidth(55)
|
|
|
|
|
+ grid_header.addWidget(self.multicolored_cb, 0, 2)
|
|
|
|
|
|
|
|
# ## Object name
|
|
# ## Object name
|
|
|
self.name_hlay = QtWidgets.QHBoxLayout()
|
|
self.name_hlay = QtWidgets.QHBoxLayout()
|
|
|
- self.custom_box.addLayout(self.name_hlay)
|
|
|
|
|
|
|
+ grid_header.addLayout(self.name_hlay, 1, 0, 1, 3)
|
|
|
|
|
|
|
|
name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
|
|
name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
|
|
|
self.name_entry = FCEntry()
|
|
self.name_entry = FCEntry()
|
|
@@ -1694,19 +1489,24 @@ class GeometryObjectUI(ObjectUI):
|
|
|
grid1.addWidget(self.addtool_entry_lbl, 3, 0)
|
|
grid1.addWidget(self.addtool_entry_lbl, 3, 0)
|
|
|
grid1.addWidget(self.addtool_entry, 3, 1)
|
|
grid1.addWidget(self.addtool_entry, 3, 1)
|
|
|
|
|
|
|
|
|
|
+ bhlay = QtWidgets.QHBoxLayout()
|
|
|
|
|
+
|
|
|
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 diameter specified above.")
|
|
|
)
|
|
)
|
|
|
- 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.")
|
|
|
)
|
|
)
|
|
|
- grid1.addWidget(self.addtool_from_db_btn, 7, 0, 1, 2)
|
|
|
|
|
|
|
+
|
|
|
|
|
+ bhlay.addWidget(self.addtool_btn)
|
|
|
|
|
+ bhlay.addWidget(self.addtool_from_db_btn)
|
|
|
|
|
+
|
|
|
|
|
+ grid1.addLayout(bhlay, 5, 0, 1, 2)
|
|
|
|
|
|
|
|
separator_line = QtWidgets.QFrame()
|
|
separator_line = QtWidgets.QFrame()
|
|
|
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
|
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
|
@@ -1754,10 +1554,10 @@ class GeometryObjectUI(ObjectUI):
|
|
|
# ################# GRID LAYOUT 3 ###############################
|
|
# ################# GRID LAYOUT 3 ###############################
|
|
|
# #################################################################
|
|
# #################################################################
|
|
|
|
|
|
|
|
- grid3 = QtWidgets.QGridLayout()
|
|
|
|
|
- grid3.setColumnStretch(0, 0)
|
|
|
|
|
- grid3.setColumnStretch(1, 1)
|
|
|
|
|
- self.geo_param_box.addLayout(grid3)
|
|
|
|
|
|
|
+ self.grid3 = QtWidgets.QGridLayout()
|
|
|
|
|
+ self.grid3.setColumnStretch(0, 0)
|
|
|
|
|
+ self.grid3.setColumnStretch(1, 1)
|
|
|
|
|
+ self.geo_param_box.addLayout(self.grid3)
|
|
|
|
|
|
|
|
# ### Tools Data ## ##
|
|
# ### Tools Data ## ##
|
|
|
self.tool_data_label = QtWidgets.QLabel(
|
|
self.tool_data_label = QtWidgets.QLabel(
|
|
@@ -1768,7 +1568,7 @@ class GeometryObjectUI(ObjectUI):
|
|
|
"Each tool store it's own set of such data."
|
|
"Each tool store it's own set of such data."
|
|
|
)
|
|
)
|
|
|
)
|
|
)
|
|
|
- grid3.addWidget(self.tool_data_label, 0, 0, 1, 2)
|
|
|
|
|
|
|
+ self.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'))
|
|
@@ -1782,8 +1582,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)
|
|
|
|
|
|
|
|
- grid3.addWidget(self.tipdialabel, 1, 0)
|
|
|
|
|
- grid3.addWidget(self.tipdia_entry, 1, 1)
|
|
|
|
|
|
|
+ self.grid3.addWidget(self.tipdialabel, 1, 0)
|
|
|
|
|
+ self.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'))
|
|
@@ -1798,8 +1598,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)
|
|
|
|
|
|
|
|
- grid3.addWidget(self.tipanglelabel, 2, 0)
|
|
|
|
|
- grid3.addWidget(self.tipangle_entry, 2, 1)
|
|
|
|
|
|
|
+ self.grid3.addWidget(self.tipanglelabel, 2, 0)
|
|
|
|
|
+ self.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'))
|
|
@@ -1819,8 +1619,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
|
|
|
|
|
self.cutz_entry.setSingleStep(0.1)
|
|
self.cutz_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- grid3.addWidget(self.cutzlabel, 3, 0)
|
|
|
|
|
- grid3.addWidget(self.cutz_entry, 3, 1)
|
|
|
|
|
|
|
+ self.grid3.addWidget(self.cutzlabel, 3, 0)
|
|
|
|
|
+ self.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"))
|
|
@@ -1845,8 +1645,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])
|
|
|
|
|
|
|
|
- grid3.addWidget(self.mpass_cb, 4, 0)
|
|
|
|
|
- grid3.addWidget(self.maxdepth_entry, 4, 1)
|
|
|
|
|
|
|
+ self.grid3.addWidget(self.mpass_cb, 4, 0)
|
|
|
|
|
+ self.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'))
|
|
@@ -1864,8 +1664,8 @@ class GeometryObjectUI(ObjectUI):
|
|
|
|
|
|
|
|
self.travelz_entry.setSingleStep(0.1)
|
|
self.travelz_entry.setSingleStep(0.1)
|
|
|
|
|
|
|
|
- grid3.addWidget(self.travelzlabel, 5, 0)
|
|
|
|
|
- grid3.addWidget(self.travelz_entry, 5, 1)
|
|
|
|
|
|
|
+ self.grid3.addWidget(self.travelzlabel, 5, 0)
|
|
|
|
|
+ self.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'))
|
|
@@ -1878,8 +1678,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)
|
|
|
|
|
|
|
|
- grid3.addWidget(self.frlabel, 10, 0)
|
|
|
|
|
- grid3.addWidget(self.cncfeedrate_entry, 10, 1)
|
|
|
|
|
|
|
+ self.grid3.addWidget(self.frlabel, 10, 0)
|
|
|
|
|
+ self.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'))
|
|
@@ -1893,8 +1693,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)
|
|
|
|
|
|
|
|
- grid3.addWidget(self.frzlabel, 11, 0)
|
|
|
|
|
- grid3.addWidget(self.feedrate_z_entry, 11, 1)
|
|
|
|
|
|
|
+ self.grid3.addWidget(self.frzlabel, 11, 0)
|
|
|
|
|
+ self.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'))
|
|
@@ -1910,8 +1710,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)
|
|
|
|
|
|
|
|
- grid3.addWidget(self.fr_rapidlabel, 12, 0)
|
|
|
|
|
- grid3.addWidget(self.feedrate_rapid_entry, 12, 1)
|
|
|
|
|
|
|
+ self.grid3.addWidget(self.fr_rapidlabel, 12, 0)
|
|
|
|
|
+ self.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()
|
|
@@ -1936,8 +1736,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.")
|
|
|
)
|
|
)
|
|
|
- grid3.addWidget(self.extracut_cb, 13, 0)
|
|
|
|
|
- grid3.addWidget(self.e_cut_entry, 13, 1)
|
|
|
|
|
|
|
+ self.grid3.addWidget(self.extracut_cb, 13, 0)
|
|
|
|
|
+ self.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'))
|
|
@@ -1952,8 +1752,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)
|
|
|
|
|
|
|
|
- grid3.addWidget(self.spindle_label, 14, 0)
|
|
|
|
|
- grid3.addWidget(self.cncspindlespeed_entry, 14, 1)
|
|
|
|
|
|
|
+ self.grid3.addWidget(self.spindle_label, 14, 0)
|
|
|
|
|
+ self.grid3.addWidget(self.cncspindlespeed_entry, 14, 1)
|
|
|
|
|
|
|
|
# Dwell
|
|
# Dwell
|
|
|
self.dwell_cb = FCCheckBox('%s:' % _('Dwell'))
|
|
self.dwell_cb = FCCheckBox('%s:' % _('Dwell'))
|
|
@@ -1973,8 +1773,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])
|
|
|
|
|
|
|
|
- grid3.addWidget(self.dwell_cb, 15, 0)
|
|
|
|
|
- grid3.addWidget(self.dwelltime_entry, 15, 1)
|
|
|
|
|
|
|
+ self.grid3.addWidget(self.dwell_cb, 15, 0)
|
|
|
|
|
+ self.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"))
|
|
@@ -1987,8 +1787,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)
|
|
|
|
|
|
|
|
- grid3.addWidget(self.pdepth_label, 17, 0)
|
|
|
|
|
- grid3.addWidget(self.pdepth_entry, 17, 1)
|
|
|
|
|
|
|
+ self.grid3.addWidget(self.pdepth_label, 17, 0)
|
|
|
|
|
+ self.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)
|
|
@@ -2003,8 +1803,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)
|
|
|
|
|
|
|
|
- grid3.addWidget(self.feedrate_probe_label, 18, 0)
|
|
|
|
|
- grid3.addWidget(self.feedrate_probe_entry, 18, 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_label.hide()
|
|
|
self.feedrate_probe_entry.setVisible(False)
|
|
self.feedrate_probe_entry.setVisible(False)
|