Moves, scales, or rotates one or more objects given a 4x4 transformation matrix. The matrix acts on the left. The following table demonstrates the transformation matrix configuration:
rhinoscriptsyntax.TransformObjects (object_ids, matrix, copy=False)
rhinoscript.object.TransformObjects (object_ids, matrix, copy=False)
object_ids |
Required. List. A list of strings or Guids identifying the objects to transform. |
matrix |
Required. 4x4 list of numbers or Transform. The transformation matrix. |
copy |
Optional. Boolean. Copy the objects. If omitted, the objects will not be copied (False). |
List |
A list of Guids identifying the newly transformed objects if successful. |
import rhinoscriptsyntax as rs
# Translate (move) objects by (10,10,0)
xform = rs.XformTranslation([10,10,0])
objs = rs.GetObjects("Select objects to translate")
if objs: rs.TransformObjects(objs, xform)