旋转一个或多个物件。旋转基于当前的构造平面。
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 |
必须参数。列表。要旋转物件的 Guid 或字符串构成的列表。 |
center_point |
必须参数。三个数字构成的列表或者 Point3d 对象。作为旋转中心点的 3-D 点。 |
rotation_angle |
必须参数。数字。旋转度数(角度值)。 |
axis |
可选参数。三个数构成的列表、Point3d 点或 Vector3d 向量。一个作为旋转轴的 3-D 向量。如果省略,将以当前构造平面的 Z 轴作为旋转轴。 |
copy |
可选参数。布尔值。复制物件。如果省略,执行过程中不复制物件(False)。 |
列表 |
由旋转以后的物件 Guid 构成的列表。 |
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 )