Returns the curvature of a surface at a U,V parameter. See the Rhino help file for details on surface curvature.
Rhino.SurfaceCurvature (strObject, arrParameter)
strObject |
Required. String. The object's identifier. |
arrParameter |
Required. Array. An array containing the U,V 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. |
Const rhObjectSurface = 8
Dim strObject, arrPoint, arrParam, arrData
strObject = Rhino.GetObject("Select a surface", rhObjectSurface)
If Rhino.IsSurface(strObject) Then
arrPoint = Rhino.GetPointOnSurface(strObject, "Pick a test point")
if IsArray(arrPoint) Then
arrParam = Rhino.SurfaceClosestPoint(strObject, arrPoint)
If IsArray(arrParam) Then
arrData = Rhino.SurfaceCurvature(strObject, arrParam)
If IsArray(arrData) Then
Rhino.Print "Surface curvature evaluation at parameter (" & CStr(arrParam(0)) & ", " & CStr(arrParam(1)) &"):"
Rhino.Print " 3-D Point: (" & Rhino.Pt2Str(arrData(0)) & ")"
Rhino.Print " 3-D Normal: (" & Rhino.Pt2Str(arrData(1)) & ")"
Rhino.Print " Maximum principal curvature: " & CStr(arrData(2)) & " (" & Rhino.Pt2Str(arrData(3)) & ")"
Rhino.Print " Minimum principal curvature: " & CStr(arrData(4)) & " (" & Rhino.Pt2Str(arrData(5)) & ")"
Rhino.Print " Gaussian curvature: " & CStr(arrData(6))
Rhino.Print " Mean curvature: " & CStr(arrData(7))
End If
End If
End If
End If