I’m trying to rotate an object around it’s own center. So I have found the centroid of its bounding box, but I’m stumped as to how I should use the coordinate information of this centroid to define the rotation center:
baseObjects = flattenList(baseObjects) cageObjects = rs.SelectObjects(baseObjects) rs.Command("_BoundingBox _Enter") rs.UnselectAllObjects() Box = rs.LastCreatedObjects() centroid = rs.SurfaceAreaCentroid(Box) rs.RotateObjects(cageObjects, centroid, 45)
Obviously this rotation won’t work, I tried. But what way do I pass the coordinate info of the centroid on to the rotation command?