PolygonFaceCollection.PolygonNodePolygonFaceIndexArray
 
 
 

PolygonFaceCollection.PolygonNodePolygonFaceIndexArray operator

Description

Returns a 1-dimensional Array containing the number of PolygonNodes on each PolygonFace followed by each index PolygonNode ordered within the PolygonFaceCollection. For example, if you have a mesh containing 3 PolygonNodes you might get this array: '4, 0, 1, 2, 3, 3, 4, 5, 6, 4, 7, 8, 9, 10'.

C# Syntax

// get accessor
Object rtn = PolygonFaceCollection.PolygonNodePolygonFaceIndexArray;

Examples

VBScript Example

NewScene , false
' Create a cube and then slice one of the polygons (to get an irregular # of nodes)
set oObject = Application.ActiveProject.ActiveScene.Root.AddGeometry("Cube","MeshSurface")
ApplyTopoOp "SlicePolygons", oObject & ".poly[4]", siUnspecified, siPersistentOperation
' Get the facets on the mesh
set oPolygonMesh = oObject.ActivePrimitive.Geometry
set oPolygonFaceCollection = oPolygonMesh.Polygons
' Get the node number/index array and loop through the array, printing the info
aPolygonNodePolygonFaceIndexArray = oPolygonFaceCollection.PolygonNodePolygonFaceIndexArray
i = 0
for each oPolygonFace in oPolygonFaceCollection
        Application.LogMessage "There are " & aPolygonNodePolygonFaceIndexArray(i) & " PolygonNodes on this PolygonFace "
        nodecount = aPolygonNodePolygonFaceIndexArray(i)
        i = i + 1
        results = vbTab & "The indices for those PolygonNodes are :"
        for j = 0 to nodecount-1
                results = results & " " & aPolygonNodePolygonFaceIndexArray(i)
                i = i + 1
        next    
        Application.LogMessage results 
next
' Expected results:
'INFO : There are 5 PolygonNodes on this PolygonFace 
'INFO :         The indices for those PolygonNodes are : 0 1 26 2 3
'INFO : There are 4 PolygonNodes on this PolygonFace 
'INFO :         The indices for those PolygonNodes are : 4 5 6 7
'INFO : There are 4 PolygonNodes on this PolygonFace 
'INFO :         The indices for those PolygonNodes are : 8 9 10 11
'INFO : There are 4 PolygonNodes on this PolygonFace 
'INFO :         The indices for those PolygonNodes are : 12 13 14 15
'INFO : There are 4 PolygonNodes on this PolygonFace 
'INFO :         The indices for those PolygonNodes are : 16 17 24 27
'INFO : There are 5 PolygonNodes on this PolygonFace 
'INFO :         The indices for those PolygonNodes are : 20 21 22 25 23
'INFO : There are 4 PolygonNodes on this PolygonFace 
'INFO :         The indices for those PolygonNodes are : 18 19 29 28