Returns the curvature of a surface at a U,V parameter. See the Rhino help file for details on surface curvature.
rhinoscriptsyntax.SurfaceCurvature (surface_id, parameter)
rhinoscript.surface.SurfaceCurvature (surface_id, parameter)
surface_id |
Required. String or Guid. The object's identifier. |
parameter |
Required. List or tuple of two numbers containing the U,V parameter to evaluate. |
Tuple |
A tuple of curvature information if successful. The tuple will contain the following information:
|
|||||||||||||||||||||||||||
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
srf = rs.GetObject("Select a surface", rs.filter.surface)
if rs.IsSurface(srf):
point = rs.GetPointOnSurface(srf, "Pick a test point")
if point:
param = rs.SurfaceClosestPoint(srf, point)
if param:
data = rs.SurfaceCurvature(srf, param)
if data:
print "Surface curvature evaluation at parameter", param, ":"
print " 3-D Point:", data[0]
print " 3-D Normal:", data[1]
print " Maximum principal curvature:", data[2], " ", data[3]
print " Minimum principal curvature:", data[4], " ", data[5]
print " Gaussian curvature:", data[6]
print " Mean curvature:", data[7]