- refactored the imports in the Plugins, moved almost all imports in the AppTool file

- fixed a number of issues, mostly leftovers from moving the UI of a Plugin in its own class
- fixed some bugs in the Punch Gerber plugin
- fixed some bugs where the 'pool' parameter was not passed when creating shapes collections (in 3D graphic mode); I wonder how it worked until now
- added a new feature in the Isolation Plugin: now for all the isolation Geometry objects this plugin can do a supplementary simplification of the geometry using the tolerance parameter defined in the General Parameters. This should lead to a reduced number of tool lifts when doing corners
This commit is contained in:
Marius Stanciu
2022-03-31 19:28:19 +03:00
committed by Marius Stanciu
parent e1824a09f7
commit ada48269a9
43 changed files with 378 additions and 797 deletions

View File

@@ -316,6 +316,8 @@ class PreferencesUIManager(QtCore.QObject):
"tools_iso_poly_ints": self.ui.plugin_eng_pref_form.tools_iso_group.poly_int_cb,
"tools_iso_force": self.ui.plugin_eng_pref_form.tools_iso_group.force_iso_cb,
"tools_iso_area_shape": self.ui.plugin_eng_pref_form.tools_iso_group.area_shape_radio,
"tools_iso_simplification": self.ui.plugin_eng_pref_form.tools_iso_group.simplify_cb,
"tools_iso_simplification_tol": self.ui.plugin_eng_pref_form.tools_iso_group.sim_tol_entry,
"tools_iso_plotting": self.ui.plugin_eng_pref_form.tools_iso_group.plotting_radio,
# #########################################################################################################

View File

@@ -295,6 +295,20 @@ class ToolsISOPrefGroupUI(OptionsGroupUI):
gen_grid.addWidget(self.valid_cb, 2, 0, 1, 3)
# Simplification Tolerance
self.simplify_cb = FCCheckBox('%s' % _("Simplify"))
self.simplify_cb.setToolTip(
_("All points in the simplified object will be\n"
"within the tolerance distance of the original geometry.")
)
self.sim_tol_entry = FCDoubleSpinner()
self.sim_tol_entry.set_precision(self.decimals)
self.sim_tol_entry.setSingleStep(10 ** -self.decimals)
self.sim_tol_entry.set_range(0.0000, 10000.0000)
gen_grid.addWidget(self.simplify_cb, 4, 0)
gen_grid.addWidget(self.sim_tol_entry, 4, 1)
# Isolation Scope
self.select_label = FCLabel('%s:' % _("Selection"))
self.select_label.setToolTip(
@@ -309,8 +323,8 @@ class ToolsISOPrefGroupUI(OptionsGroupUI):
[_("All"), _("Area Selection"), _("Polygon Selection"), _("Reference Object")]
)
gen_grid.addWidget(self.select_label, 4, 0)
gen_grid.addWidget(self.select_combo, 4, 1, 1, 2)
gen_grid.addWidget(self.select_label, 6, 0)
gen_grid.addWidget(self.select_combo, 6, 1, 1, 2)
# Area Shape
self.area_shape_label = FCLabel('%s:' % _("Shape"))
@@ -321,8 +335,8 @@ class ToolsISOPrefGroupUI(OptionsGroupUI):
self.area_shape_radio = RadioSet([{'label': _("Square"), 'value': 'square'},
{'label': _("Polygon"), 'value': 'polygon'}])
gen_grid.addWidget(self.area_shape_label, 6, 0)
gen_grid.addWidget(self.area_shape_radio, 6, 1, 1, 2)
gen_grid.addWidget(self.area_shape_label, 8, 0)
gen_grid.addWidget(self.area_shape_radio, 8, 1, 1, 2)
# Polygon interiors selection
self.poly_int_cb = FCCheckBox(_("Interiors"))
@@ -338,13 +352,13 @@ class ToolsISOPrefGroupUI(OptionsGroupUI):
"interiors of a polygon (holes in the polygon) could not be isolated.\n"
"Works when 'rest machining' is used.")
)
gen_grid.addWidget(self.poly_int_cb, 8, 0)
gen_grid.addWidget(self.force_iso_cb, 8, 1)
gen_grid.addWidget(self.poly_int_cb, 10, 0)
gen_grid.addWidget(self.force_iso_cb, 10, 1)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
gen_grid.addWidget(separator_line, 10, 0, 1, 3)
gen_grid.addWidget(separator_line, 12, 0, 1, 3)
# ## Plotting type
self.plotting_radio = RadioSet([{'label': _('Normal'), 'value': 'normal'},
@@ -354,8 +368,8 @@ class ToolsISOPrefGroupUI(OptionsGroupUI):
_("- 'Normal' - normal plotting, done at the end of the job\n"
"- 'Progressive' - each shape is plotted after it is generated")
)
gen_grid.addWidget(plotting_label, 12, 0)
gen_grid.addWidget(self.plotting_radio, 12, 1, 1, 2)
gen_grid.addWidget(plotting_label, 14, 0)
gen_grid.addWidget(self.plotting_radio, 14, 1, 1, 2)
FCGridLayout.set_common_column_size([par_grid, tool_grid, gen_grid], 0)