Rotates one or more objects. Rotation is based on the active construction plane.
rhinoscriptsyntax.RotateObjects (object_ids, center_point, rotation_angle, axis=None, copy)
rhinoscript.object.RotateObjects (object_ids, center_point, rotation_angle, axis=None, copy)
object_is |
Required. List. A list of strings or Guids identifying the objects to rotate. |
center_point |
Required. List of three numbers or Point3d. The 3-D center point of the rotation. |
rotation_angle |
Required. Number. The rotation angle in degrees. |
axis |
Optional. List of 3 numbers, Point3d, or Vector3d. A 3-D vector that identifies the axis of rotation. If omitted, the Z axis of the active construction plane is used as the rotation axis. |
copy |
Optional. Boolean. Copy the object. If omitted, the objects will not be copied (False). |
List |
A list of Guids identifying the rotated objects if successful. |
import rhinoscriptsyntax as rs
objs = rs.GetObjects("Select objects to rotate")
if objs:
point = rs.GetPoint("Center point of rotation")
if point:
rs.RotateObjects( objs, point, 45.0, None, True )