Geometry2D.LocalReferenceFrame
 
 
 

Geometry2D.LocalReferenceFrame

Description

Get the local reference frame at a given 2D geometry

Scripting Syntax

Geometry2D.LocalReferenceFrame( compIdx, XAxis, XAxisValid, YAxis, YAxisValid, ZAxis, ZAxisValid );

Parameters

Parameter Type Description
compIdx Integer Index of the component

Possible Values:

Description:

0 <= compIdx < Number of 2D Component The compIdx must be valid
XAxis SIVector3 Upon return, contains the X axis of the local reference frame at the (compIdx)th 2D component
XAxisValid Boolean Upon return, contains TRUE if the X axis of the reference frame is valid, else FALSE
YAxis SIVector3 Upon return, contains the Y axis of the local reference frame at the (compIdx)th 2D component
YAxisValid Boolean Upon return, contains TRUE if the Y axis of the reference frame is valid, else FALSE
ZAxis SIVector3 Upon return, contains the Z axis of the local reference frame at the (compIdx)th 2D component
ZAxisValid Boolean 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()
' Loop on all the 2D Component
for i = 0 to oNb2D - 1
o2DComponent.LocalReferenceFrame i, oXAxis, oXAxisValid, oYAxis, oYAxisValid, oZAxis, oZAxisValid
if oXAxisValid then
LogMessage "Component [" & i & "] X axis : " & oXAxis.x & " | " & oXAxis.y & " | " & oXAxis.z 
else
LogMessage "Component [" & i & "] INVALID X axis"
end if
if oYAxisValid then
LogMessage "Component [" & i & "] Y axis : " & oYAxis.x & " | " & oYAxis.y & " | " & oYAxis.z 
else
LogMessage "Component [" & i & "] INVALID Y axis"
end if
if oZAxisValid then
LogMessage "Component [" & i & "] Z axis : " & oZAxis.x & " | " & oZAxis.y & " | " & oZAxis.z 
else
LogMessage "Component [" & i & "] INVALID Z axis"
end if
next

See Also

Geometry2D.AverageLocalReferenceFrame Geometry2D Geometry_V1.Nb2D SIVector3