'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 oNor = XSIMath.CreateVector3()
' Loop on all the 2D Component
for i = 0 to oNb2D - 1
oNb0D2DSubComp = o2DComponent.Nb0D2D( i )
for j = 0 to oNb0D2DSubComp - 1
if o2DComponent.SubComponent0D2DNormal( i, j, oNor ) then
LogMessage "Component [" & i & "] SubComponent [" & j & "] normal : " & oNor.x & " | " & oNor.y & " | " & oNor.z
end if
next
next
|