X3DObject.AddNurbsSurfaceMesh2
 
 
 

X3DObject.AddNurbsSurfaceMesh2

Description

Creates a NurbsSurfaceMesh object. This method can be used for creating a mesh of multiple nurbs surfaces from a set of geometry data.

C# Syntax

X3DObject X3DObject.AddNurbsSurfaceMesh2( Object in_Count, Object in_ControlPoints, Object in_vsaNbUControlPoints, Object in_vsaNbVControlPoints, Object in_uKnots, Object in_vsaNbUKnots, Object in_vKnots, Object in_vsaNbVKnots, Object in_bUClosed, Object in_bVClosed, Object in_lUDegree, Object in_lVDegree, Object in_uParameterization, Object in_vParameterization, siNurbsFormat in_eNurbsFormat, String in_bstrName );

Scripting Syntax

oReturn = X3DObject.AddNurbsSurfaceMesh2( Count, ControlPoints, [NbUControlPoints], [NbVControlPoints], [UKnots], [NbUKnots], [VKnots], [NbVKnots], [UDegree], [VDegree], [UClosed], [VClosed], [UParam], [VParam], [NurbsFormat], [Name] );

Return Value

Returns the X3DObject object holding the new geometry; the new X3DObject is parented under this X3DObject.

Parameters

Parameter Type Description
Count Long Number of surfaces.
ControlPoints 3D Array The control points are stored in a 3-dimensional array. The array is 4 * (Max Number of V ControlPoints for a NurbsSurface) * (Total Number of U ControlPoints)
NbUControlPoints Array of Longs Specifies the number of U ControlPoints per NurbsCurve. Optional if you have only one NurbsCurve.
NbVControlPoints Array of Longs Specifies the number of V ControlPoints per NurbsCurve. Optional if you have only one NurbsCurve.
UKnots Array A vector of knot values in the U direction.

Default Value: Knots derived from control points.

NbUKnots Array of Longs Specifies the number of U Knots per NurbsCurve. Optional if there's only one NurbsCurve.
VKnots Array A vector of knot values in the V direction.

Default Value: Knots derived from control points.

NbVKnots Array of Longs Specifies the number of V Knots per NurbsCurve. Optional if there's only one NurbsCurve.
UDegree Array of Longs Degree of the nurbs surface in U direction.

Default Value: 3

VDegree Array of Longs Degree of the nurbs surface in V direction.

Default Value: 3

UClosed Array of Boolean Specifies whether the nurbs surface is closed or not in U direction.

Default Value: False

VClosed Array of Boolean Specifies whether the nurbs surface is closed or not in V direction.

Default Value: False

UParam Array of siKnotParameterization The parameterization factor of the nurbs surface in U direction.

Default Value: siNonUniformParameterization

VParam Array of siKnotParameterization The parameterization factor of the nurbs surface in V direction.

Default Value: siNonUniformParameterization

NurbsFormat siNurbsFormat Specifies how the data is formatted.

Default Value: siSINurbs

Name String name of object

Examples

VBScript Example

'
' This example creates a 4x4 nurbs mesh
'
NewScene , false
dim cv( 3, 3, 3 ), ukv, vkv
cv(0,0,0) = -2.0
cv(1,0,0) = 2.0
cv(2,0,0) = 2.0
cv(3,0,0) = 1.00
cv(0,0,1) = -0.666667
cv(1,0,1) = 2.0
cv(2,0,1) = 2.0
cv(3,0,1) = 1.00
cv(0,0,2) = 0.666667
cv(1,0,2) = 2.0
cv(2,0,2) = 2.0
cv(3,0,2) = 1.00
cv(0,0,3) = 2.0
cv(1,0,3) = 2.0
cv(2,0,3) = 2.0
cv(3,0,3) = 1.00
cv(0,1,0) = -2.0
cv(1,1,0) = 0.0
cv(2,1,0) = 0.666667
cv(3,1,0) = 1.00
cv(0,1,1) = -0.666667
cv(1,1,1) = 0.0
cv(2,1,1) = 0.666667
cv(3,1,1) = 1.00
cv(0,1,2) = 0.666667
cv(1,1,2) = 0.0
cv(2,1,2) = 0.666667
cv(3,1,2) = 1.00
cv(0,1,3) = 2.0
cv(1,1,3) = 0.0
cv(2,1,3) = 0.666667
cv(3,1,3) = 1.00
cv(0,2,0) = -2.0
cv(1,2,0) = 0.0
cv(2,2,0) = -0.666667
cv(3,2,0) = 1.00
cv(0,2,1) = -0.666667
cv(1,2,1) = 0.0
cv(2,2,1) = -0.666667
cv(3,2,1) = 1.00
cv(0,2,2) = 0.666667
cv(1,2,2) = 0.0
cv(2,2,2) = -0.666667
cv(3,2,2) = 1.00
cv(0,2,3) = 2.0
cv(1,2,3) = 0.0
cv(2,2,3) = -0.666667
cv(3,2,3) = 1.00
cv(0,3,0) = -2.0
cv(1,3,0) = 1.0
cv(2,3,0) = -2.0
cv(3,3,0) = 1.00
cv(0,3,1) = -0.666667
cv(1,3,1) = 1.0
cv(2,3,1) = -2.0
cv(3,3,1) = 1.00
cv(0,3,2) = 0.666667
cv(1,3,2) = 1.0
cv(2,3,2) = -2.0
cv(3,3,2) = 1.00
cv(0,3,3) = 2.0
cv(1,3,3) = 1.0
cv(2,3,3) = -2.0
cv(3,3,3) = 1.00
ukv = Array( 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 )
vkv = Array( 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 )
set root = application.activeproject.activescene.root
' Create nurbs surface from default values
set ns = root.AddNurbsSurfaceMesh2(1,cv,,,ukv,,vkv,,,,,,,,siSINurbs,"MyDefaultNurbsSurface")
' Create nurbs surface from explicit values
set ns = root.AddNurbsSurfaceMesh2( _
        1, _
        cv, _
        Array(4), Array(4), _
        ukv, Array(6), _
        vkv, Array(6), _
        Array(2), Array(2), _
        Array(False), Array(False), _
        Array(siUniformParameterization), Array(siUniformParameterization), _
        siSINurbs, _
        "MyExplicitNurbsSurface")

See Also

NurbsSurfaceMesh