Changed Cutting Edge Angle to be the full bit angle and renamed label.

This commit is contained in:
Markus Lampert
2018-02-05 15:44:23 -08:00
parent 89275766de
commit 2990e1e7b0
3 changed files with 15 additions and 12 deletions

View File

@@ -781,14 +781,14 @@ def guessDepths(objshape, subs=None):
def drillTipLength(tool):
"""returns the length of the drillbit tip."""
if tool.CuttingEdgeAngle == 0.0 or tool.Diameter == 0.0:
if tool.CuttingEdgeAngle == 180 or tool.CuttingEdgeAngle == 0.0 or tool.Diameter == 0.0:
return 0.0
else:
if tool.CuttingEdgeAngle < 0 or tool.CuttingEdgeAngle >= 90:
PathLog.error(translate("Path", "Invalid Cutting Edge Angle %.2f, must be <90° and >=") % tool.CuttingEdgeAngle)
if tool.CuttingEdgeAngle <= 0 or tool.CuttingEdgeAngle >= 180:
PathLog.error(translate("Path", "Invalid Cutting Edge Angle %.2f, must be >0° and <=18") % tool.CuttingEdgeAngle)
return 0.0
theta = math.radians(tool.CuttingEdgeAngle)
length = (tool.Diameter/2) / math.tan(theta)
length = (tool.Diameter/2) / math.tan(theta/2)
if length < 0:
PathLog.error(translate("Path", "Cutting Edge Angle (%.2f) results in negative tool tip length") % tool.CuttingEdgeAngle)
return 0.0