Returns a 3-D vector that is the normal to a surface at a parameter.
rhinoscriptsyntax.SurfaceNormal (surface_id, uv_parameter)
rhinoscript.surface.SurfaceNormal (surface_id, uv_parameter)
surface_is |
Required. String or Guid. The object's identifier. |
uv_parameter |
Required. List of 2 numbers containing the UV parameter to evaluate. |
Vector3d |
A 3-D vector if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select a surface", rs.filter.surface)
if obj:
point = rs.GetPointOnSurface(obj)
if point:
param = rs.SurfaceClosestPoint(obj, point)
normal = rs.SurfaceNormal(obj, param)
rs.AddPoints( [point, point + normal] )