Verifies that all knots in a knot vector have multiplicity equal to degree. This method works either curve or surface knots.
For more information on knots, see RhinoScript Fundamentals.
Rhino.KnotVectorHasBezierSpans (intDegree, intCVCount, arKnots)
intDegree |
Required. Number. The degree. |
intCVCount |
Required. Number. The number of control points. |
arrKnots |
Required. Array. The knot vector. |
Boolean |
True if all knots have multiplicity = degree, False otherwise. |
Null |
On error. |
Dim strCurve, intDegree, intCVCount, arrKnots, blnResult
strCurve = Rhino.GetObject("Select curve", 4)
If Not IsNull(strCurve) Then
intDegree = Rhino.CurveDegree(strCurve)
intCVCount = Rhino.CurvePointCount(strCurve)
arrKnots = Rhino.CurveKnots(strCurve)
blnResult = Rhino.KnotVectorHasBezierSpans(intDegree, intCVCount, arrKnots)
If blnResult = True Then
Rhino.Print "The knot vector has bezier spans."
Else
Rhino.Print "The knot vector does not have bezier spans.
End If
End If