NeighborPolygons (PolygonFaceCollection) *

Introduced

3.0

Description

Returns a collection of PolygonFace objects for all neighbors within a given distance.

Scripting Syntax

PolygonFaceCollection.NeighborPolygons( [Distance] )

C# Syntax

PolygonFaceCollection PolygonFaceCollection.NeighborPolygons( Int32 in_lDistance );

Parameters

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

Return Value

PolygonFaceCollection

Examples

VBScript Example

   set oCube = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" )
   set oGeometry = oCube.ActivePrimitive.Geometry
   set oVertices = oGeometry.Vertices

   set oNeighborPolygons = oVertices(0).NeighborPolygons
   set oNeighbors = oNeighborPolygons.NeighborPolygons

   str = "PolygonFace neighbors of this PolygonFaceCollection are :"
   for each polygon in oNeighbors
        str = str & " " & polygon.index
   next
   logmessage str

See Also

PolygonFace.NeighborPolygons

PolygonFaceCollection.NeighborVertices

PolygonFaceCollection.NeighborEdges

PolygonFaceCollection.GrowNeighborPolygons



Autodesk Softimage v7.5