From 9b4b8fb920a2520f32f20fd63687f9786a02fd6c Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Sat, 21 Mar 2020 20:43:02 -0500 Subject: [PATCH] Path: Apply rotation improvement to B(y) rotations --- src/Mod/Path/PathScripts/PathPocketShape.py | 5 ++--- src/Mod/Path/PathScripts/PathProfileFaces.py | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathPocketShape.py b/src/Mod/Path/PathScripts/PathPocketShape.py index 56e238b00735..7c98f71d9cbf 100644 --- a/src/Mod/Path/PathScripts/PathPocketShape.py +++ b/src/Mod/Path/PathScripts/PathPocketShape.py @@ -3,7 +3,6 @@ # *************************************************************************** # * * # * Copyright (c) 2017 sliptonic * -# * Copyright (c) 2020 russ4262 (Russell Johnson) * # * Copyright (c) 2020 Schildkroet * # * * # * This program is free software; you can redistribute it and/or modify * @@ -481,7 +480,7 @@ def clasifySub(self, bs, sub): msg = translate("Path", "Consider toggling the 'InverseAngle' property and recomputing.") PathLog.warning(msg) - if angle < -180.0: + if angle < 0.0: angle += 360.0 tup = clnBase, subsList, angle, axis, clnStock @@ -531,7 +530,7 @@ def clasifySub(self, bs, sub): (rtn, praAngle, praAxis, praInfo2) = self.faceRotationAnalysis(obj, norm, surf) # pylint: disable=unused-variable PathLog.debug("follow-up {}".format(praInfo2)) - if praAxis == axis and abs(praAngle) == 180.0: + if abs(praAngle) == 180.0: rtn = False if self.isFaceUp(clnBase, faceIA) is False: PathLog.debug('isFaceUp is False') diff --git a/src/Mod/Path/PathScripts/PathProfileFaces.py b/src/Mod/Path/PathScripts/PathProfileFaces.py index c465b6d16044..6f2233b215f3 100644 --- a/src/Mod/Path/PathScripts/PathProfileFaces.py +++ b/src/Mod/Path/PathScripts/PathProfileFaces.py @@ -141,10 +141,10 @@ def areaOpShapes(self, obj): (rtn, praAngle, praAxis, praInfo2) = self.faceRotationAnalysis(obj, norm, surf) # pylint: disable=unused-variable PathLog.debug("follow-up faceRotationAnalysis: {}".format(praInfo2)) - if praAxis == axis and abs(praAngle) == 180.0: + if abs(praAngle) == 180.0: rtn = False if self.isFaceUp(clnBase, faceIA) is False: - PathLog.debug('isFaceUp is False') + PathLog.debug('isFaceUp 1 is False') angle -= 180.0 if rtn is True: @@ -157,7 +157,7 @@ def areaOpShapes(self, obj): PathLog.warning(msg) if self.isFaceUp(clnBase, faceIA) is False: - PathLog.debug('isFaceUp is False') + PathLog.debug('isFaceUp 2 is False') angle += 180.0 else: PathLog.debug(' isFaceUp')