SurfaceNormal

Returns a 3-D vector that is the normal to a surface at a parameter.

Syntax

rhinoscriptsyntax.SurfaceNormal (surface_id, uv_parameter)

rhinoscript.surface.SurfaceNormal (surface_id, uv_parameter)

Parameters

surface_is

Required.  String or Guid.  The object's identifier.

uv_parameter

Required.  List of 2 numbers containing the UV parameter to evaluate.

Returns

Vector3d

A 3-D vector if successful.

None

If not successful, or on error.

Example

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] )

Also See

SurfaceClosestPoint

SurfaceDomain