Get the average position of given 0D Component
Geometry0D.AveragePosition( compIdxArray, compPos ); |
Parameter | Type | Description | ||||
---|---|---|---|---|---|---|
compIdxArray | Array of Integer values |
An array of indices of 0D Component
|
||||
compPos | SIVector3 | Upon return, contains the average position of the given 0D Component |
'Create a cube CreatePrim "Cube", "MeshSurface" set oSelList = GetValue("SelectionList") set oItem = oSelList(0) set oGeometry = oItem.obj oNb0D = oGeometry.Nb0D set o0DGeometry = oGeometry.Geometry0D set oPos = XSIMath.CreateVector3() ' Construct an array containing the indices 0,1,2,3 dim oIndicesArray oIndicesArray = Array( 0, 1, 2, 3 ) o0DGeometry.AveragePosition oIndicesArray, oPos LogMessage "Average position of Component (0, 1, 2, 3) : " & oPos.x & " | " & oPos.y & " | " & oPos.z |