X3DObject.AddNurbsCurveList2

Description

Creates a NurbsCurveList object. This is typically used for creating a nurbs surface from a set of geometry data.

Scripting Syntax

oReturn = X3DObject.AddNurbsCurveList2( Count, ControlPoints, [NbControlPoints], [Knots], [NbKnots], [Closed], [Degree], [Parameterization], [NurbsFormat], [Name] );

Return Value

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

Parameters

Parameter Type Description
Count Long Number of curves.
ControlPoints 2D Array The control points are stored in a 2-dimensional array. The array is 4 x (number of U ControlPoints)
NbControlPoints Array of Longs Specifies the number of ControlPoints per NurbsCurve. Optional if there's only one NurbsCurve.
Knots Array of Doubles An array of knot values.

Default Value: Knots derived from control points.

NbKnots Array of Longs Specifies the number of Knots per NurbsCurve. Optional if there's only one NurbsCurve.
Closed Array of Boolean Specifies whether the nurbs curve is closed .

Default Value: False

Degree Array of Longs Degree of the nurbs curves.

Default Value: 3

Parameterization Array of siKnotParameterization The parameterization factor of the nurbs curve.

Default Value: siNonUniformParameterization

NurbsFormat siNurbsFormat Specifies how the data is formatted.

Default Value: siSINurbs

Name String name of object

Examples

VBScript Example

NewScene , false
dim aControlVertex(3,18), aKnots
aControlVertex(0,0) = 2.44921270764475E-16
aControlVertex(1,0) = 4
aControlVertex(2,0) = 0
aControlVertex(3,0) = 1
aControlVertex(0,1) = 0.130925984580936
aControlVertex(1,1) = 4
aControlVertex(2,1) = 0
aControlVertex(3,1) = 1
aControlVertex(0,2) = 0.392686645860565
aControlVertex(1,2) = 3.987138627451
aControlVertex(2,2) = 0
aControlVertex(3,2) = 1
aControlVertex(0,3) = 0.781619130526076
aControlVertex(1,3) = 3.92944824405423
aControlVertex(2,3) = 0
aControlVertex(3,3) = 1
aControlVertex(0,4) = 1.16300456042221
aControlVertex(1,4) = 3.83391512600961
aControlVertex(2,4) = 0
aControlVertex(3,4) = 1
aControlVertex(0,5) = 1.53319488189217
aControlVertex(1,5) = 3.70145930948035
aControlVertex(2,5) = 0
aControlVertex(3,5) = 1
aControlVertex(0,6) = 1.88861828877126
aControlVertex(1,6) = 3.53335641633986
aControlVertex(2,6) = 0
aControlVertex(3,6) = 1
aControlVertex(0,7) = 2.22585364684673
aControlVertex(1,7) = 3.33122536952072
aControlVertex(2,7) = 0
aControlVertex(3,7) = 1
aControlVertex(0,8) = 2.54165271631229
aControlVertex(1,8) = 3.09701280083833
aControlVertex(2,8) = 0
aControlVertex(3,8) = 1
aControlVertex(0,9) = 2.83297430783163
aControlVertex(1,9) = 2.83297430783163
aControlVertex(2,9) = 0
aControlVertex(3,9) = 1
aControlVertex(0,10) = 3.09701280083833
aControlVertex(1,10) = 2.54165271631228
aControlVertex(2,10) = 0
aControlVertex(3,10) = 1
aControlVertex(0,11) = 3.33122536952073
aControlVertex(1,11) = 2.22585364684672
aControlVertex(2,11) = 0
aControlVertex(3,11) = 1
aControlVertex(0,12) = 3.53335641633986
aControlVertex(1,12) = 1.88861828877126
aControlVertex(2,12) = 0
aControlVertex(3,12) = 1
aControlVertex(0,13) = 3.70145930948036
aControlVertex(1,13) = 1.53319488189217
aControlVertex(2,13) = 0
aControlVertex(3,13) = 1
aControlVertex(0,14) = 3.83391512600961
aControlVertex(1,14) = 1.16300456042221
aControlVertex(2,14) = 0
aControlVertex(3,14) = 1
aControlVertex(0,15) = 3.92944824405423
aControlVertex(1,15) = 0.781619130526073
aControlVertex(2,15) = 0
aControlVertex(3,15) = 1
aControlVertex(0,16) = 3.987138627451
aControlVertex(1,16) = 0.392686645860562
aControlVertex(2,16) = 0
aControlVertex(3,16) = 1
aControlVertex(0,17) = 4
aControlVertex(1,17) = 0.130925984580933
aControlVertex(2,17) = 0
aControlVertex(3,17) = 1
aControlVertex(0,18) = 4
aControlVertex(1,18) = -2.22044604925031E-15
aControlVertex(2,18) = 0
aControlVertex(3,18) = 1
aKnots = Array( 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16  )
set oRoot = Application.ActiveSceneRoot
' creates a nurbs curve list from the default values
set oNurbsCurveList = oRoot.AddNurbsCurveList2(1,aControlVertex,,,,,,,siSINurbs,"MyDefaultNurbsCurve")
' creates a nurbs curve list from explicit values
aKnots = Array( 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16  )
set oNurbsCurveList2 = oRoot.AddNurbsCurveList2( _
        1, aControlVertex, , _
        aKnots, _
        21, _
        Array(True), _
        Array(4), _
        Array(siUniformParameterization), _
        siSINurbs, _
        "MyExplicitNurbsCurve")

See Also

NurbsCurve