Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I am having an issue with the angleTo() funciton, it is returning 'nan'. Am I doing something wrong?
# Define Stock
stockCenter = adsk.core.Vector3D.create(0,0,0)
# Define Part
partBox = partBoundingBox.copy()
partMax = partBox.maxPoint
partMin = partBox.minPoint
partCenterX = partMax.x - ((partMax.x - partMin.x)/2)
partCenterY = partMax.y - ((partMax.y - partMin.y)/2)
partCenterZ = partMax.z - ((partMax.z - partMin.z)/2)
partCenter = adsk.core.Vector3D.create(partCenterX,partCenterY,partCenterZ)
angle = stockCenter.angleTo(partCenter)
Solved! Go to Solution.