Navigation: Scripting Reference Manual > Functions & Subroutines > GetNURBCurveControlPtCount

 

GetNURBCurveControlPtCount

 

Contact Us: fredsupport@photonengr.com

 

Description

This function retrieves the number of control points specified for in a NURB curve.

 

Syntax

nPoints = GetNURBCurveControlPtCount ( nurbNode )

 

Parameters

nPoints (Long)

Returned number of control points in the NURB curve.

 

nurbNode As Long

Node number of the NURB curve whose control point information is being retrieved.

 

 

 

Examples

The example below retrieves the number of control points from a NURB curve and then loops each control point and prints its information to the output window.

 

Sub Main

 

    Dim cNode As Long

    cNode = FindFullName( "Geometry.Elem 1.Curve 1" )

 

    Dim cpCount As Long

    cpCount = GetNURBCurveControlPtCount( cNode )

 

    Dim curPt As Long

    Dim x As Double, y As Double, z As Double, w As Double

    Print "Point";

    Print "X";

    Print "Y";

    Print "Z";

    Print "W"

    For curPt = 0 To cpCount-1

        GetNURBCurveControlPt( cNode, curPt, x, y, z, w )

        Print curPt;

        Print x;

        Print y;

        Print z;

        Print w

    Next

 

End Sub

 

See Also

Curve Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC