CurveRadius

Returns the radius of curvature at a point on a curve.

Syntax

rhinoscriptsyntax.CurveRadius ( curve_id, test_point, segment_index=-1 )

rhinoscript.curve.CurveRadius ( curve_id, test_point, segment_index=-1 )

Parameters

curve_id

Required. String. The object's identifier.

test_point

Required.  List of 3 numbers or Point3d.  The test, or sampling, point.

segment_index

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

Returns

Number

The radius of curvature at the point on the curve if successful.

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:

        radius = rs.CurveRadius(obj, point)

        print "Radius of curvature:", radius

Also See

IsCurve