Returns an Array of indices (Integers) of the 2D neighborhood of a given 1D component within a given distance (see Geometry1D.Neighborhood2D) ->a given safe array of given 1D components within a given distance.
| Parameter | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
| compIdx / compIdxArray | Variant | Index of the component or Array of component indices
|
||||||
| distance | Integer | Distance to take into account |
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
a2DNeighbors = o1DGeometry.Neighbors2D( aIndices, 1 )
for j = LBound( a2DNeighbors, 1 ) to UBound( a2DNeighbors, 1 )
LogMessage "Component [" & j & "] 2D neighbor : " & a2DNeighbors(j)
next
|