CurveTangent

Returns a 3-D vector that is the tangent to a curve at a parameter.

Syntax

rhinoscriptsyntax.CurveTangent (curve_id, parameter, segment_index=-1)

rhinoscript.curve.CurveTangent (curve_id, parameter, segment_index=-1)

Parameters

curve_id

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

parameter

Required.  Number.  The parameter to evaluate.

segment_index

Optional. Number. If curve_id identifies a polycurve object, then segment_index identifies the curve segment of the polycurve to query.

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 curve", rs.filter.curve)

if obj:

    point = rs.GetPointOnCurve(obj)

    if point:

        param = rs.CurveClosestPoint(obj, point)

        normal = rs.CurveTangent(obj, param)

        print normal

Also See

CurveClosestPoint

CurveDomain