Navigation: Scripting Reference Manual > Functions & Subroutines > GetNURBSurfControlPt

 

GetNURBSurfControlPt

 

Contact Us: fredsupport@photonengr.com

 

Description

This subroutine retrieves the x,y,z position coordinate and weight factor for a specific control point of a NURB surface.  Indexing into the control points list is given by a single value corresponding to the row of the control point as seen in the GUI.

 

Syntax

GetNURBSurfControlPt nurbNode, cpIndex, x, y, z, w

 

Parameters

nurbNode As Long

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

 

cpIndex As Long

Index (0 based) into the control point list of a NURB surface from which the x,y,z position and weight values will be retrieved.  The index value corresponds to the single index as seen in the GUI (i.e. there are N control points, each indexed from 0 to N-1).

 

x As Double

After execution, this variable holds the value of the X position coordinate for the requested control point.

 

y As Double

After execution, this variable holds the value of the Y position coordinate for the requested control point.

 

z As Double

After execution, this variable holds the value of the Z position coordinate for the requested control point.

 

w As Double

After execution, this variable holds the value of the control point weight.

 

Examples

The example below retrieves the 3rd control point (index 2) from a NURB surface, modifies the weight, sets the modified values back to the NURB surface and then updates the model.

 

Sub Main

 

    Dim nurbNode As Long

    nurbNode = FindFullName( "Geometry.Elem 1.Surf 1" )

 

 

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

    GetNURBSurfControlPt( nurbNode, 2, x, y, z, w )

    w = w-0.1

    SetNURBSurfControlPt( nurbNode, 2, x, y, z, w )

    Update

 

End Sub

 

See Also

Surface Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC