TrimCurve

Trims a curve by removing portions of the curve outside the specified interval.

Syntax

Rhino.TrimCurve (strObject, arrInterval [, blnDelete])

Parameters

strObject

Required.  String.  The object's identifier.

arrInterval

Required.  Array.  An array of two numbers identifying the interval to keep. Portions of the curve before domain(0) and after domain(1) will be removed. If the input curve is open, the interval must be increasing. If the input curve is closed and the interval is decreasing, then the portion of the curve across the start and end of the curve is returned.

blnDelete

Optional. Boolean. Delete the input curve. The default is to delete the input curve (True).

Returns

String

The identifier of the newly created curve object, if successful.

Null

If not successful, or on error.

Example

Const rhCurveObject = 4

Dim strObject, arrDomain, dblParameter

strObject = Rhino.GetObject("Select a curve to trim", rhCurveObject)

If Rhino.IsCurve(strObject) Then

arrDomain = Rhino.CurveDomain(strObject)

arrDomain(1) = arrDomain(1) / 2

Rhino.TrimCurve strObject, arrDomain

End If

Also See

SplitCurve