Path: add feature for drill tip calculation

This commit is contained in:
sliptonic
2017-07-08 17:54:29 -05:00
committed by Yorik van Havre
parent 6c52548750
commit 9874444dba
3 changed files with 42 additions and 9 deletions

View File

@@ -730,6 +730,15 @@ def guessDepths(objshape, subs=None):
return depth_params(clearance, safe, start, 1.0, 0.0, final, user_depths=None, equalstep=False)
def drillTipLength(tool):
"""returns the length of the drillbit tip.
"""
if tool.CuttingEdgeAngle == 0.0 or tool.Diameter == 0.0:
return 0.0
else:
theta = math.radians(tool.CuttingEdgeAngle)
return (tool.Diameter/2) / math.tan(theta)
class depth_params:
'''calculates the intermediate depth values for various operations given the starting, ending, and stepdown parameters