def getRotatedPoint(PivC,angleDiffRad,rotDat,movCo):
axisLk = rotDat.axisLk
vecTmp = movCo - PivC
rotVal = []
if axisLk == '': # arbitrary axis / spherical rotations
rotVal = Quaternion(rotDat.pivNorm, angleDiffRad)
elif axisLk == 'X':
rotVal = Euler((angleDiffRad,0.0,0.0), 'XYZ')
elif axisLk == 'Y':
rotVal = Euler((0.0,angleDiffRad,0.0), 'XYZ')
elif axisLk == 'Z':
rotVal = Euler((0.0,0.0,angleDiffRad), 'XYZ')
vecTmp.rotate(rotVal)
return vecTmp + PivC
# Finds out whether rotDat.newAngR or negative rotDat.newAngR will
# result in desired rotation angle.
# angleEq_0_180 for 0 and 180 degree starting rotations
评论列表
文章目录