CurveCurvature

Returns the curvature of a curve at a parameter.  See the Rhino help file for details on curve curvature.

Syntax

rhinoscriptsyntax.CurveCurvature (curve_id, parameter)

rhinoscript.curve.CurveCurvature (curve_id, parameter)

Parameters

curve_id

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

parameter

Required.  Number.  The parameter to evaluate.

Returns

Tuple

A tuple of curvature information if successful.  The tuple will contain the following information:

Element

Type

Description

0

Point3d

3-D point at the specified parameter

1

Vector3d

Tangent vector

2

Point3d

Center of radius of curvature

3

Number

Radius of curvature

4

Vector3d

Curvature vector

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select a curve")

if rs.IsCurve(obj):

    point = rs.GetPointOnCurve(obj, "Pick a test point")

    if point:

        param = rs.CurveClosestPoint(obj, point)

        if param:

            data = rs.CurveCurvature(obj, param)

            if data:

                print "Curve curvature evaluation at parameter", param, ":"

                print "  3-D Point:", data[0]

                print "  3-D Tangent:", data[1]

                print "  Center of radius of curvature:", data[2]

                print "  Radius of curvature:", data[3]

                print "  3-D Curvature:", data[4]

Also See

SurfaceCurvature