Check for CuttingEdgeAngle existance before using it for drill tip calculation.

This commit is contained in:
Markus Lampert
2021-01-01 20:53:28 -08:00
parent 01072f3709
commit c077672add

View File

@@ -745,7 +745,7 @@ def guessDepths(objshape, subs=None):
def drillTipLength(tool):
"""returns the length of the drillbit tip."""
if tool.CuttingEdgeAngle == 180 or tool.CuttingEdgeAngle == 0.0 or float(tool.Diameter) == 0.0:
if not hasattr(tool, 'CuttingEdgeAngle') or tool.CuttingEdgeAngle == 180 or tool.CuttingEdgeAngle == 0.0 or float(tool.Diameter) == 0.0:
return 0.0
else:
if tool.CuttingEdgeAngle <= 0 or tool.CuttingEdgeAngle >= 180: