Neighbors1D (Geometry1D)
Description
Returns an Array of indices (Integer) of the 1D neighborhood of a given 1D component within a given distance (see Geometry1D.Neighborhood1D) ->a given safe array of given 1D components within a given distance.
Parameters
|
Parameter |
Type |
Description |
|
compIdx / compIdxArray |
Index of the component or Array of component indices Possible Values: • 0 <= compIdx < Number of 1D Component: The compIdx must be valid • 0 <= compIdxArray[i] < Nb of 1D Component: The compIdxArray[i] must be valid |
|
|
siNeighborType |
Type of neighboring Possible Values: • siAdjacent / siGrow: Select the adjacent or grown neighbors. Currently, siAdjacent and siGrow mode return the exact same indices. |
|
|
distance |
Distance to take into account |
Examples
VBScript Example
set oCube = Application.ActiveProject.ActiveScene.Root.AddGeometry("Cube", "MeshSurface")
set oGeometry = oCube.obj
set o1DGeometry = oGeometry.Geometry1D
'Get the array of indices from that item
set oSubComponent = getvalue(oCube.FullName & ".edge[6]")
aIndices = oSubComponent.SubElements
a1DNeighbors = o1DGeometry.Neighbors1D( aIndices, siAdjacent, 1 )
for j = LBound( a1DNeighbors, 1 ) to UBound( a1DNeighbors, 1 )
LogMessage "Component [" & j & "] 1D neighbor : " & a1DNeighbors(j)
next
See Also
|
|
|
|
SOFTIMAGE|XSI v6.01