- added protection so the Cutout (either Freeform or Rectangular) cannot be done on a multigeo Geometry

This commit is contained in:
Marius Stanciu 2019-01-29 22:03:24 +02:00 committed by Marius S
parent be2ecaa152
commit e3d51c9da5
2 changed files with 13 additions and 0 deletions

View File

@ -21,6 +21,7 @@ CAD program, and create G-Code for Isolation routing.
- more changes in Edit -> Preferences -> Geometry, Gerber and in CNCJob
- added new option for Cutout Tool Freeform Gaps in Edit -> Preferences -> Tools
- fixed Freeform Cutout gaps issue (it was double than the value set)
- added protection so the Cutout (either Freeform or Rectangular) cannot be done on a multigeo Geometry
28.01.2018

View File

@ -253,6 +253,12 @@ class ToolCutout(FlatCAMTool):
"Fill in a correct value and retry. ")
return
if cutout_obj.multigeo is True:
self.app.inform.emit("[error]Cutout operation cannot be done on a multi-geo Geometry.\n"
"Optionally, this Multi-geo Geometry can be converted to Single-geo Geometry,\n"
"and after that perform Cutout.")
return
# Get min and max data for each object as we just cut rectangles across X or Y
xmin, ymin, xmax, ymax = cutout_obj.bounds()
px = 0.5 * (xmin + xmax) + margin
@ -363,6 +369,12 @@ class ToolCutout(FlatCAMTool):
self.app.inform.emit("[error_notcl]Tool Diameter is zero value. Change it to a positive integer.")
return "Tool Diameter is zero value. Change it to a positive integer."
if cutout_obj.multigeo is True:
self.app.inform.emit("[error]Cutout operation cannot be done on a multi-geo Geometry.\n"
"Optionally, this Multi-geo Geometry can be converted to Single-geo Geometry,\n"
"and after that perform Cutout.")
return
def geo_init(geo_obj, app_obj):
real_margin = margin + (dia / 2)
real_gap_size = gapsize + dia