TransformObjects

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:

Syntax

rhinoscriptsyntax.TransformObjects (object_ids, matrix, copy=False)

rhinoscript.object.TransformObjects (object_ids, matrix, copy=False)

Parameters

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).

Returns

List

A list of Guids identifying the newly transformed objects if successful.

Example

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)

Also See

TransformObject