MAXScript Language Reference > 3ds Max Objects > NURBS > The NURBS Classes > NURBS Associated Classes >

# NURBSSet : Value

This is the class used to create NURBS objects, or retrieve data from existing NURBS objects. The NURBSSet acts as a container for the other objects.

This class contains a table of the various NURBSObject derived entities (points, curves, surfaces) used to make up the set. Additionally it has two 'fuse' tables: one for fuse curves and one for fuse surfaces. These are used to allow the CVs in the curves or surfaces to be 'stitched' or 'fused' together so that if one curve or surface moves the other moves with it. This class also has the surface-approximation properties that control the object's tessellation into triangle meshes for use in the viewports and the production renderer.

NURBSSet values are mappable.

Constructors

    NURBSSet [<property>:<val>]...

any of the object's properties may be set via optional keyword arguments on the constructor

    getNURBSSet <node> [	 #relational]

This function is used to retrieve a NURBSSet that corresponds to the specified NURBS scene node. This allows access the internal objects inside a 3ds Max editable NURBS object.

If the optional #relational parameter is not supplied, the returned NURBSSet will contain only independent curves and surfaces, all dependent objects will be decomposed into corresponding independent objects. So for example, if you pass an object that has a relational model (perhaps two CV surfaces and a dependent blend surface) it will decompose them into three CV surfaces. This will be the CV surfaces that represent the two surfaces and the blend, but you won't have the blend relational data. If the #relational argument is supplied, you get back two CV surfaces and a NURBS blend surface and the NURBSSet is an active representative for the scene object -- any changes you make to the properties of it's constituent NURBSObjects will be reflected directly in the source scene object.

Properties

    <nurbsset>.numObjects : integer, read-only
    <nurbsset>.count : integer, read-only

The number of internal objects in the NURBSSet.

The following properties control the surface approximation tessellation. There are dual sets of properties, one for controlling viewport tessellation, the other for controlling renderer tessellation. The properties correspond directly to the surface approximation controls in the NURBS surface modifier panel. See NURBSSurfaceApproximation for a description of these properties.

    <nurbsset>.viewConfig : #isoOnly, #isoAndMesh, #meshOnly
    <nurbsset>.viewIsoULines : integer
    <nurbsset>.viewIsoVLines : integer
    <nurbsset>.viewMeshUSteps : integer
    <nurbsset>.viewMeshVSteps : integer
    <nurbsset>.viewMeshApproxType : #parametric, #spatial, #curvature, #regular, #spatialAndCurvature
    <nurbsset>.viewSpacialEdge : float
    <nurbsset>.viewCurvatureAngle : float
    <nurbsset>.viewCurvatureDistance : float
    <nurbsset>.viewViewDependent : boolean
    <nurbsset>.renderConfig : #isoOnly, #isoAndMesh, #meshOnly, #regular, #spatialAndCurvature
    <nurbsset>.renderIsoULines : integer
    <nurbsset>.renderIsoVLines : integer
    <nurbsset>.renderMeshUSteps : integer
    <nurbsset>.renderMeshVSteps : integer
    <nurbsset>.renderMeshApproxType : #parametric, #spatial, #curvature, #regular, #spatialAndCurvature
    <nurbsset>.renderSpacialEdge : float
    <nurbsset>.renderCurvatureAngle : float
    <nurbsset>.renderCurvatureDistance : float
    <nurbsset>.renderViewDependent : boolean

    <nurbsset>.display : NURBSDisplay

Takes and returns instances of the NURBSDisplay class that controls visibility of various components of a NURBS object's display in the viewports.

    <nurbsset>.viewApproximation : NURBSSurfaceApproximation
    <nurbsset>.renderApproximation : NURBSSurfaceApproximation

These properties are used to access and control surface approximation using the NURBSSurfaceApproximation class, instances of which encapsulate all the approximation settings for either viewports or rendering. You can construct a surface approximation setup in one of these instances and use it to set the surface approximation for many objects.

    <nurbsset>.merge : float

Controls the tessellation of surface sub-objects whose edges are joined or very nearly joined. When input to a modifier as Mesh Select which requires a mesh, and when NURBS surfaces are tessellated for production rendering, by default 3ds Max adjusts the tessellation of adjoining surfaces to match each other in terms of the number of faces along the edges. The merge value controls how this is done. If merge is zero, adjoining faces are unchanged. Increasing the value of merge increases the distance 3ds Max uses to calculate how edges should match, guaranteeing no gaps between the surfaces when they are rendered.

Operators

    <nurbsset>[<index>] <nurbsset>[<index>] = <nurbsobj>

The sub-objects in a NURBSSet can be accessed using the standard MAXScript array indexing operator, [] . This is equivalent to using the getObject() and setObject() methods described below.

Methods

    appendObject <nurbsset> <nurbsobj>

Appends the given NURBSObject (instances of any of the subclasses of NURBSObject and their subclasses, all the points, curves, surfaces) as a new sub-object to the NURBSSet. The new sub-object receives the next available index.

    setObject <nurbsset> <index> <nurbsobj>

Set the indexed sub-object to the given NURBSObject; indexes are 1-based. You use this function to replace a previously appended object.

    getObject <nurbsset> (<index> | <NURBSSelection>)

Retrieves the indexed sub-object or the set of sub-objects specified by the NURBSSelection from the NURBSSet; sub-object indexes are 1-based. If the NURBSSelection specifies no sub-objects, undefined is returned. If one sub-object is specified, a value of that sub-object’s class is returned. If multiple sub-objects are specified, a NURBSSet value is returned.

    removeObject <nurbsset> <index>

Removes the given sub-object from the NURBSSet. The indexes of all the remaining higher-indexed sub-objects are renumbered down.

    disconnect <nurbsset>

Disconnect a relational NURBS set from its scene object, turning it into a non-relational set.

    deleteObjects <nurbsset>

This method deletes all the NURBSObjects in a NURBSSet, and frees its memory.

    getProdTess <nurbsset> <tessType_name>
    setProdTess <nurbsset> <tessType_name> <NURBSSurfaceApproximation>
    getViewTess <nurbsset> <tessType_name>
    setViewTess <nurbsset> <tessType_name> <NURBSSurfaceApproximation>

These methods get and set renderer and viewport NURBSSurfaceApproximation values for individual surfaces, where <tessType_name> is one of #surface , #displacement , or #curve corresponding to the 3 kinds of tessellation that can be controlled on a surface.

    clearProdTess <nurbsset> <tessType_name>
    clearViewTess <nurbsset> <tessType_name>

Resets the surface approximation settings for the surfaces in the NURBSet for the given tessellation type, where <tessType_name> is one of #surface , #displacement , or #curve corresponding to the 3 kinds of tessellation that can be controlled on a surface.

#### See Also

- Value Common Properties, Operators, and Methods