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.
This commit is contained in:
Russell Johnson
2020-10-23 09:52:14 -05:00
parent 9f13c8c23b
commit a273bef210

View File

@@ -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)