|
SAA_nurbsSurfaceGetKnots
SAA_nurbsSurfaceSetKnots()
Sets and retrieves knot values for a NURBS surface.
set scene [SAA_AllocScene]
set nurbsSurface [SAA_AllocElem]
.
.
.
set shape_id [shape_id] or "NULL"
set nbKnotsU [get_number_of_U_knots]
set nbKnotsU [get_number_of_V_knots]
set knotsU [SAA_AllocDouble nbKnotsU]
set knotsV [SAA_AllocDouble nbKnotsV]
SAA_nurbsSurfaceGetKnots $scene $nurbsSurface $SAA_Constants(SAA_GEOM_xxx) $shape_id $nbKnotsU $nbKnotsV $knotsU $knotsV
set scene [SAA_AllocScene]
set nurbsSurface [SAA_AllocElem]
.
.
.
set shape_id [shape_id] or "NULL"
set nbKnotsU [get_number_of_U_knots] set nbKnotsU [get_number_of_V_knots]
set knotsU [SAA_AllocDouble nbKnotsU] set knotsV [SAA_AllocDouble nbKnotsV] .
.
SAA_nurbsSurfaceSetKnots $scene $nurbsSurface $SAA_Constants(SAA_GEOM_xxx)
$shape_id $nbKnotsU $nbKnotsV $knotsU $knotsV
nurbsSurface
A NURBS surface.
geomtype
- Specifies the geometry type:
SAA_GEOM_ORIGINAL for the original non-deformed geometry.
SAA_GEOM_DEFORMED for the deformed geometry (if any deformation is
applied).
SAA_GEOM_SHAPE to access shapes, if any.
shape_id
- Identifies the shape if the geometry type is
SAA_GEOM_SHAPE. To get the
shape ids, use SAA_modelGetNbShapes.
nbKnotsU
- Number of knots in the U direction. To get this number, use
SAA_nurbsSurfaceGetNbKnots.
nbKnotsV
- Number of knots in the V direction. To get this number, use
SAA_nurbsSurfaceGetNbKnots.
knotsU
- Array of knot values in the U direction. The calling function is responsible for
allocating this array (the required size is
nbKnotsU).
knotsV
- Array of knot values in the U direction. The calling function is responsible for
allocating this array (the required size is
nbKnotsV).
Return Value
Return correct usage if incorrect parameters are passed
Notes
The size of a knot vector depends on the order of the curve and whether it is open or
closed. As well, SOFTIMAGE 3D uses different start and end knot values depending on
whether the curve is open or closed.
If M is the number of knots, N is the number of control
vertices, and O is the order of the curve (order = degree + 1), then:
| |
Closed |
Open |
| Number of knots (M) |
N + 1 |
N + O - 2 |
| Start knot value |
knots[0] |
knots[O - 2] |
| End knot value |
knots[M - 1] |
knots[M - O + 1] |
|