AddSubCrv

Adds a new curve object based on a portion, or interval, of an existing curve object. This function is similar in operation to Rhino's SubCrv command.

Syntax

rhinoscriptsyntax.AddSubCrv ( curve_id, param0, param1 )

rhinoscript.curve.AddSubCrv ( curve_id, param0, param1 )

Parameters

curve_id

Required.  The identifier of a closed, planar curve object.

param0

Required.  Number.  The first parameter on the source curve.

param1

Required.  Number.  The second parameter on the source curve.

Returns

Guid

The identifier of the new object if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

getresult = rs.GetCurveObject()

if getresult:

    curve_id = retresult[0]

    point0 = rs.GetPointOnCurve( curve_id )

    if point0:

        point1 = rs.GetPointOnCurve( curve_id )

        if point1:

            t0 = rs.CurveClosestPoint( curve_id, point0)

            t1 = rs.CurveClosestPoint( curve_id, point1)

            rs.AddSubCrv( curve_id, t0, t1 )

Also See

CurveClosestPoint

GetCurveObject

GetPointOnCurve