Returns an Array of indices (Integers) of the 1D neighborhood of a given 2D component within a given distance (see Geometry2D.Neighborhood1D) ->a given safe array of given 2D 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 o2DGeometry = oGeometry.Geometry2D 'Get the array of indices from that item set oSubComponent = getvalue(oCube.FullName & ".poly[1]") aIndices = oSubComponent.SubElements a1DNeighbors = o2DGeometry.Neighbors1D( aIndices, 1 ) for j = LBound( a1DNeighbors, 1 ) to UBound( a1DNeighbors, 1 ) LogMessage "Component [" & j & "] 1D neighbor : " & a1DNeighbors(j) next |