AverageLocalReferenceFrame (Geometry2D)
Description
Get the average normal of given 2D geometry
Scripting Syntax
Geometry2D.AverageLocalReferenceFrame( compIdxArray, XAxis, XAxisValid, YAxis, YAxisValid, ZAxis, ZAxisValid )
Parameters
|
Parameter |
Type |
Description |
|
compIdxArray |
An array of indices of 2D Component Possible Values: • 0 <= compIdxArray(i) < Number of 2D Component: Each index in the array must be valid |
|
|
XAxis [in/out] |
Upon return, contains the X axis of the average local reference frame of the given 2D geometry |
|
|
XAxisValid [in/out] |
Upon return, contains TRUE if the X axis of the reference frame is valid, else FALSE |
|
|
YAxis [in/out] |
Upon return, contains the Y axis of the average local reference frame of the given 2D geometry |
|
|
YAxisValid [in/out] |
Upon return, contains TRUE if the Y axis of the reference frame is valid, else FALSE |
|
|
ZAxis [in/out] |
Upon return, contains the Z axis of the average local reference frame of the given 2D geometry |
|
|
ZAxisValid [in/out] |
Upon return, contains TRUE if the Z axis of the reference frame is valid, else FALSE |
Examples
VBScript Example
'Create a cube CreatePrim "Cube", "MeshSurface" set oSelList = GetValue("SelectionList") set oItem = oSelList(0) set oGeometry = oItem.obj oNb2D = oGeometry.Nb2D set o2DComponent = oGeometry.Geometry2D set oXAxis = XSIMath.CreateVector3() set oYAxis = XSIMath.CreateVector3() set oZAxis = XSIMath.CreateVector3() ' Construct an array containing the indices 0,1,2,3 dim oIndicesArray oIndicesArray = Array( 0, 1, 2, 3 ) o2DComponent.AverageLocalReferenceFrame oIndicesArray, oXAxis, oXAxisValid, oYAxis, oYAxisValid, oZAxis, oZAxisValid if oXAxisValid then LogMessage "Component (0, 1, 2, 3) average X axis : " & oXAxis.x & " | " & oXAxis.y & " | " & oXAxis.z else LogMessage "Component (0, 1, 2, 3) INVALID average X axis" end if if oYAxisValid then LogMessage "Component (0, 1, 2, 3) average Y axis : " & oYAxis.x & " | " & oYAxis.y & " | " & oYAxis.z else LogMessage "Component (0, 1, 2, 3) INVALID average Y axis" end if if oZAxisValid then LogMessage "Component (0, 1, 2, 3) average Z axis : " & oZAxis.x & " | " & oZAxis.y & " | " & oZAxis.z else LogMessage "Component (0, 1, 2, 3) INVALID average Z axis" end if
See Also
Autodesk Softimage v7.5