From a273bef210b62231eac46e6d26ff3a212590403b Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Fri, 23 Oct 2020 09:52:14 -0500 Subject: [PATCH] Path: Fix div by zero error Fix MillFace div by zero error reported in forum at https://forum.freecadweb.org/viewtopic.php?f=15&t=51415. Rotational-related variables were exposed to non-rotational code block. They have been moved into correct rotational code block. --- src/Mod/Path/PathScripts/PathAreaOp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathAreaOp.py b/src/Mod/Path/PathScripts/PathAreaOp.py index 1144a44c8a..2626aa71f9 100644 --- a/src/Mod/Path/PathScripts/PathAreaOp.py +++ b/src/Mod/Path/PathScripts/PathAreaOp.py @@ -383,10 +383,10 @@ class ObjectOp(PathOp.ObjectOp): if PathLog.getLevel(PathLog.thisModule()) == 4: self.visualAxis() - # Set axial feed rates based upon horizontal feed rates - safeCircum = 2 * math.pi * obj.SafeHeight.Value - self.axialFeed = 360 / safeCircum * self.horizFeed # pylint: disable=attribute-defined-outside-init - self.axialRapid = 360 / safeCircum * self.horizRapid # pylint: disable=attribute-defined-outside-init + # Set axial feed rates based upon horizontal feed rates + safeCircum = 2 * math.pi * obj.SafeHeight.Value + self.axialFeed = 360 / safeCircum * self.horizFeed # pylint: disable=attribute-defined-outside-init + self.axialRapid = 360 / safeCircum * self.horizRapid # pylint: disable=attribute-defined-outside-init # Initiate depthparams and calculate operation heights for rotational operation self.depthparams = self._customDepthParams(obj, obj.StartDepth.Value, obj.FinalDepth.Value)