TransformCollection

A collection of transforms applied to the geometry.

Example

application = cf.Application.GetInstance()
project = application:NewProject()

cuboid = project.Contents.Geometry:AddCuboid(cf.Point(0,0,0),1,1,1)

    -- Use the TransformCollection to add a geometry transform

transformGeometryCollection = cuboid.Transforms
transformGeometryCollection:AddTranslate(cf.Point(0,0,0),cf.Point(1,1,1))

    -- Retrieve and delete the transform

transformGeometryCollection:Item(1):Delete()

Inheritance

The TransformCollection object is derived from the AbstractModifiableCollection object.

Usage locations

The TransformCollection object can be accessed from the following locations:

Property List

Count
The number of Transform items in the collection. (Read only number)
Label
The object label. (Read/Write string)
Type
The object type string. (Read only string)

Method List

AddAlign (properties table)
Apply a align using a table defining the properties. (Returns a Align object.)
AddAlign (sourceorigin Point, sourceuvector Vector, sourcevvector Vector, destinationorigin Point, destinationuvector Vector, destinationvvector Vector)
Returns a Align object. (Returns a Align object.)
AddRotate (origin Point, rotationaxis Vector, angle Expression)
Apply a rotation. (Returns a Rotate object.)
AddRotate (properties table)
Apply a rotation using a table defining the properties. (Returns a Rotate object.)
AddScale (origin Point, factor Expression)
Apply a scale. (Returns a Scale object.)
AddScale (properties table)
Apply a scale using a table defining the properties. (Returns a Scale object.)
AddTranslate (from Point, to Point)
Apply a translate between the given coordinates. (Returns a Transform object.)
AddTranslate (properties table)
Apply a translate using a table defining the properties. (Returns a Translate object.)
Delete ()
Deletes the entity.
Duplicate ()
Duplicates the entity. (Returns a Object object.)
GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step. (Returns a table object.)
Item (index number)
Returns the Transform for the given index in the collection. (Returns a Transform object.)
Item (label string)
Returns the Transform for the given label in the collection. (Returns a Transform object.)
Items ()
Returns a table of Transform items. (Returns a UnsupportedType(List of Transform) object.)
SetProperties (properties Object)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.

Static Function List

GetDefaultProperties ()
Creates a table containing the default settings to create an object. (Returns a table object.)

Property Details

Count
The number of Transform items in the collection.
Type
number
Access
Read only
Label
The object label.
Type
string
Access
Read/Write
Type
The object type string.
Type
string
Access
Read only

Method Details

AddAlign (properties table)
Apply a align using a table defining the properties.
Input Parameters
properties(table)
A table of properties defining the align transform.
Return
Align
The align transform.
AddAlign (sourceorigin Point, sourceuvector Vector, sourcevvector Vector, destinationorigin Point, destinationuvector Vector, destinationvvector Vector)
Returns a Align object.
Input Parameters
sourceorigin(Point)
Source origin coordinate.
sourceuvector(Vector)
Source U vector direction.
sourcevvector(Vector)
Source V vector direction.
destinationorigin(Point)
Destination origin coordinate.
destinationuvector(Vector)
Destination U vector direction.
destinationvvector(Vector)
Destination V vector direction.
Return
Align
Returns a Align object.
AddRotate (origin Point, rotationaxis Vector, angle Expression)
Apply a rotation.
Input Parameters
origin(Point)
The coordinates of the origin of the rotation.
rotationaxis(Vector)
The axis of rotation.
angle(Expression)
The angle of rotation (degrees).
Return
Rotate
The rotate transform.
AddRotate (properties table)
Apply a rotation using a table defining the properties.
Input Parameters
properties(table)
A table of properties defining the rotate transform.
Return
Rotate
The rotate transform.
AddScale (origin Point, factor Expression)
Apply a scale.
Input Parameters
origin(Point)
The coordinates of the origin of the scale transformation.
factor(Expression)
The factor to scale by.
Return
Scale
The scale transform.
AddScale (properties table)
Apply a scale using a table defining the properties.
Input Parameters
properties(table)
A table of properties defining the scale transform.
Return
Scale
The scale transform.
AddTranslate (from Point, to Point)
Apply a translate between the given coordinates.
Input Parameters
from(Point)
Translate from coordinate.
to(Point)
Translate to coordinate.
Return
Transform
The translate transform.
AddTranslate (properties table)
Apply a translate using a table defining the properties.
Input Parameters
properties(table)
A table of properties defining the translate transform.
Return
Translate
The translate transform.
Delete ()
Deletes the entity.
Duplicate ()
Duplicates the entity.
Return
Object
The new (duplicated) entity.
GetProperties ()
Returns a table of properties representing the state of the object. The properties table can be used with the SetProperties method to change multiple properties of the object in one step.
Return
table
A table defining the properties.
Item (index number)
Returns the Transform for the given index in the collection.
Input Parameters
index(number)
The index of the Transform.
Return
Transform
The item in the collection
Item (label string)
Returns the Transform for the given label in the collection.
Input Parameters
label(string)
The label of the Transform.
Return
Transform
The item in the collection
Items ()
Returns a table of Transform items.
Return
UnsupportedType(List of Transform)
The list of items in the collection
SetProperties (properties Object)
Modifies the state of the object using the provided table of properties. This method is used to modify multiple properties of the object in a single step.
Input Parameters
properties(Object)
A table of properties defining the new state of the object.

Static Function Details

GetDefaultProperties ()
Creates a table containing the default settings to create an object.
Return
table
A table containing the default properties.