Skip to content

Commit

Permalink
Path: Apply rotation improvement to B(y) rotations
Browse files Browse the repository at this point in the history
  • Loading branch information
Russ4262 committed Mar 26, 2020
1 parent 9239c67 commit 9b4b8fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/Mod/Path/PathScripts/PathPocketShape.py
Expand Up @@ -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 *
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down
6 changes: 3 additions & 3 deletions src/Mod/Path/PathScripts/PathProfileFaces.py
Expand Up @@ -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:
Expand All @@ -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')
Expand Down

0 comments on commit 9b4b8fb

Please sign in to comment.