Commit 0198d027 authored by sumpfralle's avatar sumpfralle

check for safety height before running a dropcutter operation


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@334 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 505dc9d4
...@@ -94,6 +94,8 @@ def generate_toolpath(model, tool_settings=None, bounds=None, direction="x", ...@@ -94,6 +94,8 @@ def generate_toolpath(model, tool_settings=None, bounds=None, direction="x",
direction_param = 1 direction_param = 1
else: else:
return "Invalid direction value (%s): not one of %s" % (direction, DIRECTIONS) return "Invalid direction value (%s): not one of %s" % (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, maxz, toolpath = generator.GenerateToolPath(minx, maxx, miny, maxy, minz, maxz,
effective_toolradius, effective_toolradius, direction_param, callback) effective_toolradius, effective_toolradius, direction_param, callback)
else: else:
......
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