Triangle.PolygonIndex

Description

Returns the index (as an Integer) of the polygon from which this triangle came.

C# Syntax

// get accessor

Int32 rtn = Triangle.PolygonIndex;

Examples

VBScript Example

set root = Application.ActiveProject.ActiveScene.Root

set obj = root.AddGeometry( "Cube", "MeshSurface" )

set geometry = obj.ActivePrimitive.Geometry

Application.LogMessage "Nb Of Polygons: " & geometry.polygons.Count

set triColl = geometry.triangles

Application.LogMessage "Nb Of Triangles: " & triColl.Count

for each tri in triColl

Application.LogMessage "Name: " & tri & ", PolyIdx : " & tri.PolygonIndex

next

See Also

PolygonFace PolygonFaceCollection PolygonMesh.Polygons Facet FacetCollection Geometry.Facets