RFNurbsSurface.CreateCanonical
Description
Creates the NURBS surface equation form specified canonical values.
Syntax
Function RFNurbsSurface.CreateCanonical(uDegree As Long,
vDegree As Long, knotType As RFEndKnotType, uKnotCount As Long,
pUKnots As Double, vKnotCount As Long, pVKnots As Double,
ctrlPtsType As RFControlPointType, uCtrlPtsCount As Long,
vCtrlPtsCount As Long, ctrlPtsStride As Long, pCtrlPts As Double) As RFErrorCode
The CreateCanonical syntax has these parts:
| Part |
Description |
| uDegree |
[IN] Long Required. Degree of NURBS surface in U parametric direction ranging from 1 to 32. |
| vDegree |
[IN] Long Required. Degree of NURBS surface in V parametric direction ranging from 1 to 32. |
| knotType |
[IN] RFEndKnotType Required. Type of knot at end parameters. |
| uKnotCount |
[IN] Long Required. Number of knots in U parametric direction. |
| pUKnots |
[IN] Double Required. The first element of Double array containing knot values in U parametric direction. |
| vKnotCount |
[IN] Long Required. Number of knots in V parametric direction. |
| pVKnots |
[IN] Double Required. The first element of Double array containing knot values in V parametric direction. |
| ctrlPtsType |
[IN] RFControlPointType Required. Control point type. |
| uCtrlPtsCount |
[IN] Long Required. Number of control points in U parametric direction. |
| vCtrlPtsCount |
[IN] Long Required. Number of control points in V parametric direction. |
| ctrlPtsStride |
[IN] Long Required. Number of elements to represent a single control point in control point data array pCtrlPts. |
| pCtrlPts |
[IN] Double Required. The first element of Double array containing control point coordinates. |
Remarks
- Knot value array pUKnots and pVKnots should have proper multiplicities at end parameters according to knotType The size of control point!/s Double array pCtrlPts should be the same as uCtrlPtsCount X vCtrlPtsCount X ctrlPtsStride.
- In case ctrlPtsType is RF_CP_NON_RATIONAL, each control point has {X,Y,Z} coordinate value. ctrlPtsStride should be 3 and pCtrlPts should contain control point coordinates as follows,
pCtrlPts (0) = Control Points (0,0).x
pCtrlPts (1) = Control Points (0,0).y
pCtrlPts (2) = Control Points (0,0).z
pCtrlPts (3) = Control Points (0,1).x
pCtrlPts (4) = Control Points (0,1).y
pCtrlPts (5) = Control Points (0,1).z
pCtrlPts (Vn X 3 - 3 ) = Control Points (0, Vn - 1).x
pCtrlPts (Vn X 3 - 2 ) = Control Points (0, Vn - 1).y
pCtrlPts (Vn X 3 - 1 ) = Control Points (0, Vn - 1).z
pCtrlPts (Un X Vn X 3 - 3) = Control Points (Un - 1, Vn - 1 ).x
pCtrlPts (Un X Vn X 3 - 2) = Control Points (Un - 1, Vn - 1 ).y
pCtrlPts (Un X Vn X 3 - 1 ) = Control Points (Un- 1, Vn - 1 ).z
where, Un = the number of control points in U parametric direction.
Vn = the number of control points in V parametric direction.
Control Points (i,j) = i'th in U parametric direction and j!/th in V parametric direction control point of NURBS surface.
- In case ctrlPtsType is not RF_CP_NON_RATIONAL, each control point has {X,Y,Z,W} coordinate value.
ctrlPtsStrideshould be 4 and pCtrlPts should contain control point coordinates as follows,
pCtrlPts (0) = Control Points (0,0).x
pCtrlPts (1) = Control Points (0,0).y
pCtrlPts (2) = Control Points (0,0).z
pCtrlPts (3) = Control Points (0,0).w
pCtrlPts (4) = Control Points (0,1).x
pCtrlPts (5) = Control Points (0,1).y
pCtrlPts (6) = Control Points (0,1).z
pCtrlPts (7) = Control Points (0,1).w
pCtrlPts (Vn X 4 - 4 ) = Control Points (0, Vn - 1).x
pCtrlPts (Vn X 4 - 3 ) = Control Points (0, Vn - 1).y
pCtrlPts (Vn X 4 - 2 ) = Control Points (0, Vn - 1).z
pCtrlPts (Vn X 4 - 1 ) = Control Points (0, Vn- 1).w
pCtrlPts (Un X Vn X 4 - 4) = Control Points (Un - 1, Vn - 1 ).x
pCtrlPts (Un X Vn X 4 - 3) = Control Points (Un - 1, Vn - 1 ).y
pCtrlPts (Un X Vn X 4 - 2) = Control Points (Un - 1, Vn - 1 ).z
pCtrlPts (Un X Vn X 4 - 1) = Control Points (Un - 1, Vn - 1 ).w
where, Un = the number of control points in U parametric direction.
Vn = the number of control points in V parametric direction.
Control Points (i,j) = i'th in U parametric direction and j!/th in V parametric direction control point of NURBS surface.
Return to Rapidform Index