Skip to content

Commit

Permalink
Check for CuttingEdgeAngle existance before using it for drill tip ca…
Browse files Browse the repository at this point in the history
…lculation.
  • Loading branch information
mlampert committed Jan 2, 2021
1 parent 01072f3 commit c077672
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mod/Path/PathScripts/PathUtils.py
Expand Up @@ -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:
Expand Down

0 comments on commit c077672

Please sign in to comment.