Navigation Menu

Skip to content

Commit

Permalink
4th-axis rotation analysis Z-orientation fix
Browse files Browse the repository at this point in the history
orientation == 'Z' was failing in some cases due to undefined "axis" variable. "axis" declaration was commented out in an earlier commit. Declaration now restored for all orientations.
  • Loading branch information
Russ4262 committed Jul 12, 2019
1 parent 7eccda3 commit 4e7e9a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/Mod/Path/PathScripts/PathAreaOp.py
Expand Up @@ -43,10 +43,10 @@
__doc__ = "Base class and properties for Path.Area based operations."
__contributors__ = "russ4262 (Russell Johnson)"
__createdDate__ = "2017"
__scriptVersion__ = "2h testing"
__lastModified__ = "2019-06-30 17:17 CST"
__scriptVersion__ = "2j testing"
__lastModified__ = "2019-07-12 00:11 CST"

LOGLEVEL = PathLog.Level.DEBUG
LOGLEVEL = PathLog.Level.INFO
PathLog.setLevel(LOGLEVEL, PathLog.thisModule())
# PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule())

Expand Down Expand Up @@ -578,7 +578,6 @@ def faceRotationAnalysis(self, obj, norm, surf):

praInfo = "faceRotationAnalysis()"
rtn = True
# axis = 'X'
orientation = 'X'
angle = 500.0
precision = 6
Expand Down Expand Up @@ -681,6 +680,8 @@ def roundRoughValues(precision, val):
axis = 'X'
else:
rtn = False
elif orientation == 'Z':
axis = 'X'

if math.fabs(angle) == 0.0:
angle = 0.0
Expand Down
7 changes: 4 additions & 3 deletions src/Mod/Path/PathScripts/PathCircularHoleBase.py
Expand Up @@ -50,8 +50,8 @@
__doc__ = "Base class an implementation for operations on circular holes."
__contributors__ = "russ4262 (Russell Johnson)"
__created__ = "2017"
__scriptVersion__ = "1c testing"
__lastModified__ = "2019-06-25 14:49 CST"
__scriptVersion__ = "1d testing"
__lastModified__ = "2019-07-09 22:59 CST"


# Qt translation handling
Expand Down Expand Up @@ -479,7 +479,6 @@ def faceRotationAnalysis(self, obj, norm, surf):

praInfo = "faceRotationAnalysis(): "
rtn = True
axis = 'X'
orientation = 'X'
angle = 500.0
precision = 6
Expand Down Expand Up @@ -582,6 +581,8 @@ def roundRoughValues(precision, val):
axis = 'X'
else:
rtn = False
elif orientation == 'Z':
axis = 'X'

if math.fabs(angle) == 0.0:
angle = 0.0
Expand Down

0 comments on commit 4e7e9a5

Please sign in to comment.