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

# NURBSSurface : NURBSObject

This is the parent class for all the NURBS surface classes and so is not directly constructable. The class describes the common properties of all NURBS surfaces. This includes its material ID, texture/tiling options, renderable state, and open/closed state, and normal inverted state. The evalPos() , evalUTangent() , and evalVTangent() methods are used to compute points and tangents on the surface.

Properties

All NURBS surface classes have the following properties.

    <nurbssurface>.renderable : boolean

Specifies whether the surface is renderable. true if the surface is renderable, false if not.

    <nurbssurface>.flipNormals : boolean

Specifies whether all the surface’s surface normals are flipped. true if the surface normals are to be flipped, false if not.

    <nurbssurface>.generateUVs1 : boolean

If true , enables the generation of UV mapping coordinates for UVW channel 1. See the getGenerateUVs() and setGenerateUVs() methods for generalized mapping channel access.

    <nurbssurface>.generateUVs2 : boolean

If true , enables the generation of UV mapping coordinates for UVW channel 2. See the getGenerateUVs() and setGenerateUVs() methods for generalized mapping channel access.

    <nurbssurface>.matID : integer

The material ID of the surface.

    <nurbssurface>.closedInU : boolean, read-only

true if the surface is closed in the U direction, false if open.

    <nurbssurface>.closedInV : boolean, read-only

true if the surface is closed in the V direction, false if open.*

    <nurbssurface>.uParameterRangeMin : float, read-only <nurbssurface>.uParameterRangeMax : float, read-only

Contains the minimum and maximum valid values for <u_parm> in the methods associated with NURBS Surfaces.

    <nurbssurface>.vParameterRangeMin : float, read-only <nurbssurface>.vParameterRangeMax : float, read-only

Contains the minimum and maximum valid values for <v_param> in the methods associated with NURBS Surfaces.

    <nurbssurface>.textureSurface1 : NURBSTextureSurface <nurbssurface>.textureSurface2 : NURBSTextureSurface

Used to get and set the texture surfaces for the two mapping channels. These properties take and return instances of the NURBSTextureSurface class. .textureSurface1 accesses mapping channel 1 and .textureSurface2 accesses mapping channel 2. See NURBSTextureSurface : Value. See the getTextureSurface() and setTextureSurface() methods for generalized mapping channel access.

It is not possible to assign texture surfaces to NURBS objects present in the scene. You can create new NURBSSets and the texture surface is used when you call createNURBSObject() . However, if you do a getNURBSSet() and assign a NURBSTextureSurface to these properties, nothing happens.

Methods

All NURBS surface classes have the following methods:

    evalPos <nurbssurface> <u_param> <v_param>

Returns the coordinates in space of the point at the given U and V parametric position on the surface.

    evalUTangent <nurbssurface> <u_param> <v_param>

Returns the U tangent vector of the surface at the given U and V parametric position on the surface.

    evalVTangent <nurbssurface> <u_param> <v_param>

Returns the V tangent vector of the surface at the given U and V parametric position on the surface.

    getTiling <nurbssurface> [channel:<index>] setTiling <nurbssurface> <ut> <vt> [channel:<index>]

These methods get and set the tiling factor on the surface in the u and v directions. These methods return or take a point2 value, with u tiling in the x component and v tiling in the y component of the point2. The optional channel keyword argument can be used to select the mapping channel which defaults to 1.

    getTilingOffset <nurbssurface> [channel:<index>] setTilingOffset <nurbssurface> <uo> <vo> [channel:<index>]

These methods get and set the tiling offset on the surface for the selected channel. These methods return or take a point2 value, with u offset in the x component and v offset in the y component of the point2. The optional channel keyword argument can be used to select the mapping channel which defaults to 1.

    getGenerateUVs <nurbssurface> <channel_index> setGenerateUVs <nurbssurface> <channel_index> <boolean>

These methods get and set whether the generation of UV mapping coordinates for the selected channel is enabled.

    getTextureUVs <nurbssurface> <index> [channel:<index>] setTextureUVs <nurbssurface> <index> <point2> [channel:<index>]

These methods get and set the texture UV as a point2 value for the indexed coordinate and selected channel. The 1-based index of the texture coordinate must be >= 1 and <= 4. The optional channel keyword argument can be used to select the mapping channel which defaults to 1.

    getTextureSurface <nurbssurface> <channel_index> setTextureSurface <nurbssurface> <channel_index> <NURBSTextureSurface>

These methods get and set texture surfaces for the selected channel. These methods return or take an instance of the NURBSTextureSurface class. See NURBSTextureSurface : Value.

    getProdTess <nurbssurface> <tessType_name> setProdTess <nurbssurface> <tessType_name> <NURBSSurfaceApproximation> getViewTess <nurbssurface> <tessType_name> setViewTess <nurbssurface> <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 <nurbssurface> <tessType_name> clearViewTess <nurbssurface> <tessType_name>

Resets the surface approximation settings for the surface 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

- NURBSObject

- Value Common Properties, Operators, and Methods