- added protection so the Cutout (either Freeform or Rectangular) cannot be done on a multigeo Geometry
This commit is contained in:
parent
be2ecaa152
commit
e3d51c9da5
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue