Geometry1D.ExtremitiesPositions
 
 
 

Geometry1D.ExtremitiesPositions

Description

Get the extremities positions of a given 1D geometry

Scripting Syntax

Geometry1D.ExtremitiesPositions( compIdx, startPos, endPos );

Parameters

Parameter Type Description
compIdx Integer Index of the component

Possible Values:

Description:

0 <= compIdx < Number of 0D geometry The compIdx must be valid
startPos SIVector3 Upon return, contains the start position of the (compIdx)th 1D geometry
endPos SIVector3 Upon return, contains the end position of the (compIdx)th 1D geometry

Examples

VBScript Example

'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 oStartPos = XSIMath.CreateVector3()
set oEndPos = XSIMath.CreateVector3()
' Loop on all the 1D geometry
for i = 0 to oNb1D - 1
o1DGeometry.ExtremitiesPositions i, oStartPos, oEndPos
LogMessage "Component [" & i & "] start position : " & oStartPos.x & " | " & oStartPos.y & " | " & oStartPos.z 
LogMessage "Component [" & i & "] end position : " & oEndPos.x & " | " & oEndPos.y & " | " & oEndPos.z 
next