*surfacecreatenurbs

Create a NURBS surface using input parameters.

Syntax

*surfacecreatenurbs udegree vdegree uk_count vk_count up_count vp_count ratnl double_array number_of_doubles

Type

HyperMesh Tcl Modify

Description

This command creates generic NURBS type surface using input parameters.

Inputs

udeg
Polynomial degree of u parameter.
vdeg
Polynomial degree of v parameter.
uk_count
Number of u parameter NURBS knots.
vk_count
Number of v parameter NURBS knots.
up_count
Number of NURBS control points in u parametric direction.
vp_count
Number of NURBS control points in v parametric direction.
ratnl
Parameter that specifies whether weights are used in addition to control points. Valid values are:
0 – Use weights
1 – Do not use weights
double_array
The ID of the double array that contains the value of the knots, control points and weights (if ratnl is 1). The double array is created using the *createdoublearray command. This should always be set to 1.
number_of_doubles
Integer indicating the size (number of doubles) in the double array created using *createdoublearray.

To reduce input, the usual NURBS convention that for the curve with polynomial degree degree first and last degree+1 knots must have the same value is enforced internally. Input for this command should only contain one value. For all internal knot values, multiplicity should still be provided explicitly. All knot values must be provided in non-decreasing order.

Values in double_array array should be arranged as follows:

First uk_count entries – u parameter knot values.

Next vk_count entries – v parameter knot values.

Next up_count×vp_count×3 values are x, y, z values of control points.

If ratnl is not zero then next up_count×vp_count entries are NURBS weights values.

The poles and weights (if present) are arranged as a sequence of rows of a rectangular grid where one row corresponds to a constant v value and increasing u values.

Examples

To create a ruled surface connecting two parabolas:

*createdoublearray 22 0 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 0 2 0 1 2 1
*surfacecreatenurbs 1 2 2 2 2 3 0 1 22

To create a ruled surface connecting two circular arcs:

*createdoublearray 28 0 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 0 2 0 1 2 1 1 1 0.707 0.707 1 1
*surfacecreatenurbs 1 2 2 2 2 3 1 1 28

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

10.0