- fixed error in CutOut Tool when trying to create a FreeFrom Cutout out of a Gerber object with the Convex Shape checked

This commit is contained in:
Marius Stanciu 2020-02-29 22:21:09 +02:00 committed by Marius
parent 2c7dff5dbe
commit acc61d460b
5 changed files with 32 additions and 26 deletions

View File

@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing.
29.02.2020
- compacted the NCC Tool UI by replacing some Radio buttons with Combo boxes due of too many elements
- fixed error in CutOut Tool when trying to create a FreeFrom Cutout out of a Gerber object with the Convex Shape checked
28.02.2020

View File

@ -5407,12 +5407,12 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
self.select_combo.addItems(
[_("Itself"), _("Area Selection"), _("Reference Object")]
)
select_label = QtWidgets.QLabel('%s:' % _("Reference"))
select_label = QtWidgets.QLabel('%s:' % _("Selection"))
select_label.setToolTip(
_("Selection of area to be cleared of copper."
"- 'Itself' - the non copper clearing extent is based on the object that is copper cleared.\n "
"- 'Area Selection' - left mouse click to start selection of the area to be painted.\n"
"- 'Reference Object' - will do non copper clearing within the area specified by another object.")
_("Selection of area to be processed.\n"
"- 'Itself' - the processing extent is based on the object that is processed.\n "
"- 'Area Selection' - left mouse click to start selection of the area to be processed.\n"
"- 'Reference Object' - will process the area specified by another object.")
)
grid0.addWidget(select_label, 18, 0)
@ -5905,14 +5905,14 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
# Polygon selection
selectlabel = QtWidgets.QLabel('%s:' % _('Selection'))
selectlabel.setToolTip(
_("How to select Polygons to be painted.\n"
"- 'Polygon Selection' - left mouse click to add/remove polygons to be painted.\n"
"- 'Area Selection' - left mouse click to start selection of the area to be painted.\n"
_("Selection of area to be processed.\n"
"- 'Polygon Selection' - left mouse click to add/remove polygons to be processed.\n"
"- 'Area Selection' - left mouse click to start selection of the area to be processed.\n"
"Keeping a modifier key pressed (CTRL or SHIFT) will allow to add multiple areas.\n"
"- 'All Polygons' - the Paint will start after click.\n"
"- 'Reference Object' - will do non copper clearing within the area\n"
"specified by another object.")
"- 'All Polygons' - the process will start after click.\n"
"- 'Reference Object' - will process the area specified by another object.")
)
# self.selectmethod_combo = RadioSet(
# [
# {"label": _("Polygon Selection"), "value": "single"},

View File

@ -521,13 +521,19 @@ class CutOut(FlatCAMTool):
gapsize = gapsize / 2 + (dia / 2)
def geo_init(geo_obj, app_obj):
solid_geo = []
solid_geo = list()
if isinstance(cutout_obj, FlatCAMGerber):
if convex_box:
object_geo = cutout_obj.solid_geometry.convex_hull
else:
object_geo = cutout_obj.solid_geometry
if isinstance(cutout_obj.solid_geometry, list):
cutout_obj.solid_geometry = MultiPolygon(cutout_obj.solid_geometry)
try:
if convex_box:
object_geo = cutout_obj.solid_geometry.convex_hull
else:
object_geo = cutout_obj.solid_geometry
except Exception as e:
log.debug("CutOut.on_freeform_cutout().geo_init() --> %s" % str(e))
else:
object_geo = cutout_obj.solid_geometry

View File

@ -534,10 +534,10 @@ class NonCopperClear(FlatCAMTool, Gerber):
self.select_label = QtWidgets.QLabel('%s:' % _("Selection"))
self.select_label.setToolTip(
_("Selection of area to be cleared of copper."
"- 'Itself' - the non copper clearing extent is based on the object that is copper cleared.\n "
"- 'Area Selection' - left mouse click to start selection of the area to be painted.\n"
"- 'Reference Object' - will do non copper clearing within the area specified by another object.")
_("Selection of area to be processed.\n"
"- 'Itself' - the processing extent is based on the object that is processed.\n "
"- 'Area Selection' - left mouse click to start selection of the area to be processed.\n"
"- 'Reference Object' - will process the area specified by another object.")
)
self.grid3.addWidget(self.select_label, 26, 0,)
self.grid3.addWidget(self.select_combo, 26, 1)

View File

@ -453,13 +453,12 @@ class ToolPaint(FlatCAMTool, Gerber):
# Polygon selection
selectlabel = QtWidgets.QLabel('%s:' % _('Selection'))
selectlabel.setToolTip(
_("How to select Polygons to be painted.\n"
"- 'Polygon Selection' - left mouse click to add/remove polygons to be painted.\n"
"- 'Area Selection' - left mouse click to start selection of the area to be painted.\n"
_("Selection of area to be processed.\n"
"- 'Polygon Selection' - left mouse click to add/remove polygons to be processed.\n"
"- 'Area Selection' - left mouse click to start selection of the area to be processed.\n"
"Keeping a modifier key pressed (CTRL or SHIFT) will allow to add multiple areas.\n"
"- 'All Polygons' - the Paint will start after click.\n"
"- 'Reference Object' - will do non copper clearing within the area\n"
"specified by another object.")
"- 'All Polygons' - the process will start after click.\n"
"- 'Reference Object' - will process the area specified by another object.")
)
# grid3 = QtWidgets.QGridLayout()