Commit 833dd869 authored by sumpfralle's avatar sumpfralle

refuse to do any operation with a wrong safety-height


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@583 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 63600773
...@@ -225,6 +225,10 @@ def generate_toolpath(model, tool_settings=None, ...@@ -225,6 +225,10 @@ def generate_toolpath(model, tool_settings=None,
if (overlap < 0) or (overlap >= 1): if (overlap < 0) or (overlap >= 1):
return "Invalid overlap value (%f): should be greater or equal 0 " \ return "Invalid overlap value (%f): should be greater or equal 0 " \
+ "and lower than 1" + "and lower than 1"
if safety_height < maxz:
return ("Safety height (%.4f) is within the bounding box height " \
+ "(%.4f) - this can cause collisions of the tool with " \
+ "the material.") % (safety_height, maxz)
# factor "2" since we are based on radius instead of diameter # factor "2" since we are based on radius instead of diameter
stepping = 2 * number(tool_settings["tool_radius"]) * (1 - overlap) stepping = 2 * number(tool_settings["tool_radius"]) * (1 - overlap)
if path_generator == "DropCutter": if path_generator == "DropCutter":
...@@ -235,10 +239,6 @@ def generate_toolpath(model, tool_settings=None, ...@@ -235,10 +239,6 @@ def generate_toolpath(model, tool_settings=None,
else: else:
return "Invalid direction value (%s): not one of %s" \ return "Invalid direction value (%s): not one of %s" \
% (direction, DIRECTIONS) % (direction, DIRECTIONS)
if safety_height < maxz:
return ("Safety height (%.4f) is within the bounding box height " \
+ "(%.4f) - this can cause collisions of the tool with " \
+ "the material.") % (safety_height, maxz)
toolpath = generator.GenerateToolPath(minx, maxx, miny, maxy, minz, toolpath = generator.GenerateToolPath(minx, maxx, miny, maxy, minz,
maxz, stepping, stepping, direction_param, callback) maxz, stepping, stepping, direction_param, callback)
elif path_generator == "PushCutter": elif path_generator == "PushCutter":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment