RFNurbsSurface.Add3DTrimLoop2
(Available After RapidForm2002 PlusPack1)
Description
Adds a new trimming loop to the NURBS surface. A loop is defined by a set of 3D NURBS curves which are sequentially connected.
Syntax
Function RFNurbsSurface.Add3DTrimLoop2(curveCount As Long,
pDegree As Long, pKnotType As RFEndKnotType, pKnotCount As Long,
lengthOfKnots As Long, pKnots As Double, pCtrlPtsType As RFControlPointType,
pCtrlPtsCount As Long, pCtrlPtsStride As Long, lengthOfCtrlPts
As Long, pCtrlPts As Double) As RFErrorCode
The Add3DTrimLoop2 syntax has these parts:
| Part |
Description |
| curveCount |
[IN] Long Required. Number of curves composing trimming loop. |
| pDegree |
[IN] Long Required. The first element of Long array containing each NURBS curve's degree. |
| pKnotType |
[IN] RFEndKnotType Required. The first element of RFEndKnotType array containing each NURBS curve's type of knot at end parameters. |
| pKnotCount |
[IN] Long Required. The first element of Long array containing each NURBS curve's number of knots. |
| lengthOfKnots |
[IN] Long Required. The size of
pKnots array. |
| pKnots |
[IN] Double Required. The first element of Double array containing each NURBS curve's knot values. |
| pCtrlPtsType |
[IN] RFControlPointType Required. The first element of RFControlPointType array containing each NURBS curve's control point type. |
| pCtrlPtsCount |
[IN] Long Required. The first element of Long array containing each NURBS curve's number of control points. |
| pCtrlPtsStride |
[IN] Long Required. The first element of Long array containing each NURBS curve's control point stride. |
| lengthOfCtrlPts |
[IN] Long Required. The size of
pCtrlPts array. |
| pCtrlPts |
[IN] Double Required. The first element of Double array containing each NURBS curve's control point coordinates. |
Remarks
- The size of pDegree, pKnotType, pKnotCount, pCtrlPtsType, pCtrlPtsCount, and pCtrlPtsStride array should be curveCount and corresponding values are associated by array element index, that is, pDegree (i) , pKnotType (i) , pKnotCount (i) , pCtrlPtsType(i) , pCtrlPtsCount(i) , and pCtrlPtsStride(i) are i'th NURBS curve's arguments.
The size of pKnots should be the total summation of number of knot values of each NURBS curve, and pKnots should contain knot values in following order.
pKnots (0) = Knot values (0,0)
pKnots (1) = Knot values (0,1)
pKnots (Kn(i) - 1 ) = Knot values (0, Kn(i) - 1)
pKnots (Kn(i) ) = Knot values (1,0)
pKnots (Kn(i) + 1 ) = Knot values (1,1)
where, Kn(i) = the number of knot values of i'th NURBS curve.(= pKnotCount (i) )
Knot values (i,j) = i'th NURBS curve's j'th knot value.
- The size of pCtrlPts should be the total summation of (number of control points of each NURBS curve X control point stride of each NURBS curve), and pCtrlPts should contain knot values in following order.
In case that pCtrlPtsType(i) is RF_CP_NON_RATIONAL(pCtrlPtsStride(i) = 3 )
pCtrlPts (0) = Control Points (0,0).x
pCtrlPts (1) = Control Points (0,0).y
pCtrlPts (3) = Control Points (0,0).z
pCtrlPts (4) = Control Points (0,1).x
pCtrlPts (5) = Control Points (0,1).y
CtrlPts (6) = Control Points (0,1).z
pCtrlPts (Cn(i) X 2 - 3 ) = Control Points (0, Cn(i) - 1).x
pCtrlPts (Cn(i) X 2 - 2 ) = Control Points (0, Cn(i) - 1).y
pCtrlPts (Cn(i) X 2 - 1 ) = Control Points (0, Cn(i) - 1).z
where, Cn(i) = the number of control points of i'th NURBS curve.(= pCtrlPtsCount (i) )
Control Points (i,j) = i'th NURBS curve's j'th control point.
- In case that pCtrlPtsType(i) is not RF_CP_NON_RATIONAL(pCtrlPtsStride(i) = 4 )
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 (Cn(i) X 3 - 4 ) = Control Points (0, Cn(i) - 1).x
pCtrlPts (Cn(i) X 3 - 3 ) = Control Points (0, Cn(i) - 1).y
pCtrlPts (Cn(i) X 3 - 2 ) = Control Points (0, Cn(i) - 1).z
pCtrlPts (Cn(i) X 3 - 1 ) = Control Points (0, Cn(i) - 1).w
where, Cn(i) = the number of control points of i'th NURBS curve.(= pCtrlPtsCount (i) )
Control Points (i,j) = i'th NURBS curve's j'th control point.
- Trimming region is defined by NURBS curves connecting order following right-hand rule. That is, if NURBS curves are connected in the order of outward direction by right-hand rule, the outside of loop is trimmed. If NURBS curves are connected in the order of inward direction by right-hand rule, the inside of loop is trimmed.
- Refer to RFNurbsCurve.CreateCanonical method for more details regarding NURBS curve's arguments.
Return to Rapidform Index