NbPoints (Facet) *

Introduced

4.2

Description

Returns the number of points in a given facet as an Integer.

C# Syntax

    // get accessor
    Int32 rtn = Facet.NbPoints;

Examples

1. VBScript Example

    set oRoot = ActiveProject.ActiveScene.Root
    set oSphere = oRoot.AddGeometry( "Sphere", "MeshSurface" )
    set oGeometry = oSphere.ActivePrimitive.Geometry
    set oFacets = oGeometry.Facets
    for each oFacet in oFacets
       logMessage "Facet #" & oFacet.Index & " has " & oFacet.NbPoints & " points."
    next

    ' Expected Result:
    'INFO : Facet #0 has 3 points.
    'INFO : Facet #1 has 4 points.
    'INFO : Facet #2 has 4 points.
    '  <snip>
    'INFO : Facet #61 has 4 points.
    'INFO : Facet #62 has 4 points.
    'INFO : Facet #63 has 3 points.

2. JScript Example

    var oRoot = ActiveProject.ActiveScene.Root;
    var oSphere = oRoot.AddGeometry( "Sphere", "MeshSurface" );
    var oGeometry = oSphere.ActivePrimitive.Geometry;
    var oFacets = oGeometry.Facets;

    facetEnum = new Enumerator(oFacets);
    var oFacet;

    for( ; !facetEnum.atEnd(); facetEnum.moveNext() ) {
       oFacet = facetEnum.item();
       LogMessage( "Facet #" + oFacet.Index + " has " + oFacet.NbPoints + " points." );
    }

    // Expected result:
    //INFO : Facet #0 has 3 points.
    //INFO : Facet #1 has 4 points.
    //INFO : Facet #2 has 4 points.
    // <snip>
    //INFO : Facet #61 has 4 points.
    //INFO : Facet #62 has 4 points.
    //INFO : Facet #63 has 3 points.

Autodesk Softimage v7.5