Parameter Ranges for Curves and Surfaces
 
 
 

Methods that deal with points in the parameter space of a curve work with arguments in U. Methods that deal with points in the parameter space of surfaces deal with arguments in U and V. For example, the function NURBSSurfConstPoint::SetUParam() sets the position of a dependent point in the parent surface's U parameter space. The valid U and V values that may be passed to this method must be obtained by calling NURBSSurface::GetParameterRange() on the parent surface. This methods retrieves the minimum and maximum values for U and V that may be used. For curves there is a similar function for getting the valid range for U. This is NURBSCurve::GetParameterRange().

Developers should be aware that a curve or surface needs to be instantiated in the 3ds Max data base before it is okay to call these methods (for example by calling CreateNURBSObject()). Prior to the object existing in the data base these calls will fail.

Generally, when CV curves and surfaces are created, the valid parameter range is known because they were specified in the beginning and ending knot values. In cases where they are not known, one can instantiate a NURBSSet that has just the base curves or surfaces. Once instantiated GetParameterRange() can be used. Then one can build the rest of the parametric model by making additions and/or modifiications to the already instantiated object. The global function AddNURBSObjects() makes this easy to do.