'Create a cube
CreatePrim "Cube", "MeshSurface"
set oSelList = GetValue("SelectionList")
set oItem = oSelList(0)
set oGeometry = oItem.obj
oNb1D = oGeometry.Nb1D
set o1DGeometry = oGeometry.Geometry1D
set oXAxis = XSIMath.CreateVector3()
set oYAxis = XSIMath.CreateVector3()
set oZAxis = XSIMath.CreateVector3()
' Loop on all the 1D geometry
for i = 0 to oNb1D - 1
o1DGeometry.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
|