- added the ability to add exclusion areas from the Excellon object too. Now there is a different in color to differentiate from which type of object the exclusion areas were added but they all serve the same purpose
This commit is contained in:
@@ -1292,10 +1292,89 @@ class ExcellonObjectUI(ObjectUI):
|
||||
self.grid5.addWidget(pp_geo_label, 16, 0)
|
||||
self.grid5.addWidget(self.pp_geo_name_cb, 16, 1)
|
||||
|
||||
# Exclusion Areas
|
||||
self.exclusion_cb = FCCheckBox('%s' % _("Exclusion areas"))
|
||||
self.exclusion_cb.setToolTip(
|
||||
_(
|
||||
"Include exclusion areas.\n"
|
||||
"In those areas the travel of the tools\n"
|
||||
"is forbidden."
|
||||
)
|
||||
)
|
||||
self.grid5.addWidget(self.exclusion_cb, 17, 0, 1, 2)
|
||||
|
||||
# ------------------------------------------------------------------------------------------------------------
|
||||
# ------------------------- EXCLUSION AREAS ------------------------------------------------------------------
|
||||
# ------------------------------------------------------------------------------------------------------------
|
||||
self.exclusion_frame = QtWidgets.QFrame()
|
||||
self.exclusion_frame.setContentsMargins(0, 0, 0, 0)
|
||||
self.grid5.addWidget(self.exclusion_frame, 18, 0, 1, 2)
|
||||
|
||||
self.exclusion_box = QtWidgets.QVBoxLayout()
|
||||
self.exclusion_box.setContentsMargins(0, 0, 0, 0)
|
||||
self.exclusion_frame.setLayout(self.exclusion_box)
|
||||
|
||||
h_lay = QtWidgets.QHBoxLayout()
|
||||
self.exclusion_box.addLayout(h_lay)
|
||||
|
||||
# Button Add Area
|
||||
self.add_area_button = QtWidgets.QPushButton(_('Add area'))
|
||||
self.add_area_button.setToolTip(_("Add an Exclusion Area."))
|
||||
h_lay.addWidget(self.add_area_button)
|
||||
|
||||
# Button Delete Area
|
||||
self.delete_area_button = QtWidgets.QPushButton(_('Clear areas'))
|
||||
self.delete_area_button.setToolTip(_("Delete all exclusion areas."))
|
||||
h_lay.addWidget(self.delete_area_button)
|
||||
|
||||
grid_l = QtWidgets.QGridLayout()
|
||||
grid_l.setColumnStretch(0, 0)
|
||||
grid_l.setColumnStretch(1, 1)
|
||||
self.exclusion_box.addLayout(grid_l)
|
||||
|
||||
# Area Selection shape
|
||||
self.area_shape_label = QtWidgets.QLabel('%s:' % _("Shape"))
|
||||
self.area_shape_label.setToolTip(
|
||||
_("The kind of selection shape used for area selection.")
|
||||
)
|
||||
|
||||
self.area_shape_radio = RadioSet([{'label': _("Square"), 'value': 'square'},
|
||||
{'label': _("Polygon"), 'value': 'polygon'}])
|
||||
|
||||
grid_l.addWidget(self.area_shape_label, 0, 0)
|
||||
grid_l.addWidget(self.area_shape_radio, 0, 1)
|
||||
|
||||
# Chose Strategy
|
||||
self.strategy_label = FCLabel('%s:' % _("Strategy"))
|
||||
self.strategy_label.setToolTip(_("The strategy followed when encountering an exclusion area.\n"
|
||||
"Can be:\n"
|
||||
"- Over -> when encountering the area, the tool will go to a set height\n"
|
||||
"- Around -> will avoid the exclusion area by going around the area"))
|
||||
self.strategy_radio = RadioSet([{'label': _('Over'), 'value': 'over'},
|
||||
{'label': _('Around'), 'value': 'around'}])
|
||||
|
||||
grid_l.addWidget(self.strategy_label, 1, 0)
|
||||
grid_l.addWidget(self.strategy_radio, 1, 1)
|
||||
|
||||
# Over Z
|
||||
self.over_z_label = FCLabel('%s:' % _("Over Z"))
|
||||
self.over_z_label.setToolTip(_("The height Z to which the tool will rise in order to avoid\n"
|
||||
"an interdiction area."))
|
||||
self.over_z_entry = FCDoubleSpinner()
|
||||
self.over_z_entry.set_range(0.000, 9999.9999)
|
||||
self.over_z_entry.set_precision(self.decimals)
|
||||
|
||||
grid_l.addWidget(self.over_z_label, 2, 0)
|
||||
grid_l.addWidget(self.over_z_entry, 2, 1)
|
||||
|
||||
# -------------------------- EXCLUSION AREAS END -------------------------------------------------------------
|
||||
# ------------------------------------------------------------------------------------------------------------
|
||||
self.ois_exclusion_geo = OptionalHideInputSection(self.exclusion_cb, [self.exclusion_frame])
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
self.grid5.addWidget(separator_line, 17, 0, 1, 2)
|
||||
self.grid5.addWidget(separator_line, 19, 0, 1, 2)
|
||||
|
||||
# #################################################################
|
||||
# ################# GRID LAYOUT 6 ###############################
|
||||
@@ -2025,7 +2104,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
# grid4.addWidget(QtWidgets.QLabel(''), 12, 0, 1, 2)
|
||||
|
||||
# Exclusion Areas
|
||||
self.exclusion_cb = FCCheckBox('%s:' % _("Exclusion areas"))
|
||||
self.exclusion_cb = FCCheckBox('%s' % _("Exclusion areas"))
|
||||
self.exclusion_cb.setToolTip(
|
||||
_(
|
||||
"Include exclusion areas.\n"
|
||||
@@ -2101,7 +2180,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
|
||||
# -------------------------- EXCLUSION AREAS END -------------------------------------------------------------
|
||||
# ------------------------------------------------------------------------------------------------------------
|
||||
self.ois_exclusion_geo = OptionalInputSection(self.exclusion_cb, [self.exclusion_frame])
|
||||
self.ois_exclusion_geo = OptionalHideInputSection(self.exclusion_cb, [self.exclusion_frame])
|
||||
|
||||
warning_lbl = QtWidgets.QLabel(
|
||||
_(
|
||||
|
||||
Reference in New Issue
Block a user