Path: Apply rotation improvement to B(y) rotations

This commit is contained in:
Russell Johnson
2020-03-21 20:43:02 -05:00
parent 988038c5d2
commit b05361a163
2 changed files with 5 additions and 6 deletions

View File

@@ -3,7 +3,6 @@
# ***************************************************************************
# * *
# * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> *
# * 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 @@ class ObjectPocket(PathPocketBase.ObjectPocket):
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 @@ class ObjectPocket(PathPocketBase.ObjectPocket):
(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')

View File

@@ -141,10 +141,10 @@ class ObjectProfile(PathProfileBase.ObjectProfile):
(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 @@ class ObjectProfile(PathProfileBase.ObjectProfile):
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')