Returns the curvature of a curve at a parameter. See the Rhino help file for details on curve curvature.
Rhino.CurveCurvature (strObject, dblParameter)
strObject |
Required. String. The object's identifier. |
dblParameter |
Required. Number. The parameter to evaluate. |
Array |
An array of curvature information if successful. The array will contain the following information:
|
||||||||||||||||||
Null |
If not successful, or on error. |
Dim strObject, arrPoint, dblParam, arrData
strObject = Rhino.GetObject("Select a curve")
If Rhino.IsCurve(strObject) Then
arrPoint = Rhino.GetPointOnCurve(strObject, "Pick a test point")
if IsArray(arrPoint) Then
dblParam = Rhino.CurveClosestPoint(strObject, arrPoint)
If IsNumeric(dblParam) Then
arrData = Rhino.CurveCurvature(strObject, dblParam)
If IsArray(arrData) Then
Rhino.Print "Curve curvature evaluation at parameter " & CStr(dblParam) &":"
Rhino.Print " 3-D Point: (" & Rhino.Pt2Str(arrData(0)) & ")"
Rhino.Print " 3-D Tangent: (" & Rhino.Pt2Str(arrData(1)) & ")"
Rhino.Print " Center of radius of curvature: (" & Rhino.Pt2Str(arrData(2)) & ")"
Rhino.Print " Radius of curvature: " & CStr(arrData(3))
Rhino.Print " 3-D Curvature: (" & Rhino.Pt2Str(arrData(4)) & ")"
End If
End If
End If
End If