diff --git a/README.md b/README.md index 7c8f6e48..deee786d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/flatcamTools/ToolCutout.py b/flatcamTools/ToolCutout.py index 0926d969..4d2e7dbd 100644 --- a/flatcamTools/ToolCutout.py +++ b/flatcamTools/ToolCutout.py @@ -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