Changed Cutting Edge Angle to be the full bit angle and renamed label.
This commit is contained in:
@@ -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 >=0°") % tool.CuttingEdgeAngle)
|
||||
if tool.CuttingEdgeAngle <= 0 or tool.CuttingEdgeAngle >= 180:
|
||||
PathLog.error(translate("Path", "Invalid Cutting Edge Angle %.2f, must be >0° and <=180°") % 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
|
||||
|
||||
Reference in New Issue
Block a user