
v3.0
Return a collection of PolygonFace objects for all neighbors within a given distance.
oReturn = EdgeCollection.NeighborPolygons( [Distance] ); |
| Parameter | Type | Description |
|---|---|---|
| Distance | Integer | Distance is an integer value representing the degree of
neighborhood (eg: degree=2 for a polygon means its adjacent
polygons plus the adjacent polygons of the adjacent polygons).
Default Value: 1 |
set oCube = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" )
set oGeometry = oCube.ActivePrimitive.Geometry
set oPolygons = oGeometry.Polygons
set oNeighborEdges = oPolygons(0).NeighborEdges(1)
set oNeighborPolygons = oNeighborEdges.NeighborPolygons( 1 )
str = "Polygons neighbors of this EdgeCollection are :"
for each n in oNeighborPolygons
str = str & " " & n.index
next
logmessage str
|