Align

An align transform.

Example

app = cf.GetApplication()
project = app:NewProject()

    -- Create a flare to align
    
flare = project.Geometry:AddFlare(cf.Point(0, 0, 0), 1, 1, 1, 0.5, 0.5)

    -- Create variables to define the source workplane
    
srcOrigin = cf.Point(0, 0, 0)
srcUVec = cf.Point(1, 0, 0)
srcVVec = cf.Point(0, 1, 0)

    -- Create variables to define the destination workplane
    
destOrigin = cf.Point(0, 0, 2)
destUVec = cf.Point(0, 0, 1)
destVVec = cf.Point(-1, -1, 0)

    -- Align the flare 
    
alignOne = flare.Transforms:AddAlign(destOrigin, destUVec, destVVec, srcOrigin, srcUVec, srcVVec)
alignTwo = flare.Transforms:AddAlign(srcOrigin, srcUVec, srcVVec, destOrigin, destUVec, destVVec)

    -- Remove the first align transform
    
alignOne:Delete()

Inheritance

The Align object is derived from the Transform object.

Property List

DestinationWorkplane
The destination workplane. (Read only LocalWorkplane)
SourceWorkplane
The source workplane. (Read only LocalWorkplane)
Type
The object type string. (Read only string)

Method List

Delete ()
Delete the transform.
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.)
SetProperties (properties table)
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

DestinationWorkplane
The destination workplane.
Type
LocalWorkplane
Access
Read only
SourceWorkplane
The source workplane.
Type
LocalWorkplane
Access
Read only
Type
The object type string.
Type
string
Access
Read only

Method Details

Delete ()
Delete the transform.
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 properties table.
SetProperties (properties table)
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(table)
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
The default properties table.