'See the Neighborhood1D for the use with a simple index argument
set oCube = Application.ActiveProject.ActiveScene.Root.AddGeometry("Cube", "MeshSurface")
set oGeometry = oCube.obj
set o0DGeometry = oGeometry.Geometry0D
'Get the array of indices from that item
set oSubComponent = getvalue(oCube.FullName & ".pnt[6]")
aIndices = oSubComponent.SubElements
a1DNeighbors = o0DGeometry.Neighbors1D( aIndices, 1 )
for j = LBound( a1DNeighbors, 1 ) to UBound( a1DNeighbors, 1 )
LogMessage "Component [" & j & "] 1D neighbor : " & a1DNeighbors(j)
next
|