NurbsSurfaceMesh.AddSurface operator

Description

Adds a surface to the mesh.

C# Syntax

NurbsSurface NurbsSurfaceMesh.AddSurface( Object in_vsaControlPoints, Object in_vsadUKnots, Object in_vsadVKnots, Boolean in_bUClosed, Boolean in_bVClosed, Int32 in_lUDegree, Int32 in_lVDegree, siKnotParameterization in_eUParam, siKnotParameterization in_eVParam, siNurbsFormat in_eNurbsFormat );

Scripting Syntax

oReturn = NurbsSurfaceMesh.AddSurface( [ControlPoints], [UKnots], [VKnots], [UClosed], [VClosed], [UDegree], [VDegree], [UParam], VParam, [NurbsFormat] );

Return Value

NurbsSurface

Parameters

Parameter Type Description
ControlPoints 1D or 3D Array The control points used for creating the nurbs surface. The control points can be stored in a 1 dimensional array or in a 3 dimensional matrix (UxVx4) of x,y,z,w values. The 1 dimensional array should contain the number of points in U and V at the beginning followed by a sequence of x,y,z,w values e.g. {U,V,Xo,Yo,Zo,...X(uv-1),Y(uv-1),Z(uv-1),W(uv-1)}.
UKnots Array of Doubles A vector of knot values in the U direction.
VKnots Array of Doubles An array of knot values in the V direction.
UClosed Boolean Specifies whether the nurbs surface is closed or not in U direction.
VClosed Boolean Specifies whether the nurbs surface is closed or not in V direction.
UDegree Long Degree of the nurbs surface in U direction.
VDegree Long Degree of the nurbs surface in V direction.
UParam siKnotParameterization The parameterization factor of the nurbs surface in U direction.
VParam siKnotParameterization The parameterization factor of the nurbs surface in V direction.
NurbsFormat siNurbsFormat Specifies how the data is formatted.

Default Value: siSINurbs

Examples

VBScript Example

Dim oRoot, oSphere, oNurbsSurfaceMesh, oNurbsSurface,  _
	lDegree(2), bClosed(2), eParameterization(2), aControlPoints, aKnots(2)
set oRoot = Application.activeproject.activescene.root
set oSphere = oRoot.AddGeometry( "Sphere", "NurbsSurface" )
set oNurbsSurfaceMesh = oRoot.AddNurbsSurfaceMesh
oSphere.ActivePrimitive.Geometry.Surfaces(0).GetData _		
	aControlPoints, _
	aKnots(siUDirection),aKnots(siVDirection) , _
	bClosed(siUDirection),bClosed(siVDirection), _
	lDegree(siUDirection),lDegree(siVDirection), _
	eParameterization(siUDirection),eParameterization(siVDirection), _
	siSINurbs
' add nurbs surfaces from sphere data.
set oNurbsSurface = oNurbsSurfaceMesh.activeprimitive.geometry.AddSurface( _
	aControlPoints, _
	aKnots(siUDirection),aKnots(siVDirection), _
	bClosed(siUDirection),bClosed(siVDirection), _
	lDegree(siUDirection),lDegree(siVDirection), _
	eParameterization(siUDirection),eParameterization(siVDirection), _
	siSINurbs )