From ffe09618533998196b7402d8be278ad2fc27fa73 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Sat, 6 Aug 2022 14:48:25 -0700 Subject: [PATCH] Added check to deal with float nan as cycle time result --- src/Mod/Path/PathScripts/PathOp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathOp.py b/src/Mod/Path/PathScripts/PathOp.py index b39cc3dbe5..dc8e61c5eb 100644 --- a/src/Mod/Path/PathScripts/PathOp.py +++ b/src/Mod/Path/PathScripts/PathOp.py @@ -29,6 +29,7 @@ import PathScripts.PathLog as PathLog import PathScripts.PathPreferences as PathPreferences import PathScripts.PathUtil as PathUtil import PathScripts.PathUtils as PathUtils +import math import time @@ -867,7 +868,7 @@ class ObjectOp(object): # Get the cycle time in seconds seconds = obj.Path.getCycleTime(hFeedrate, vFeedrate, hRapidrate, vRapidrate) - if not seconds: + if not seconds or math.isnan(seconds): return translate("Path", "Cycletime Error") # Convert the cycle time to a HH:MM:SS format