ExtractPolyCurveSegment

Extracts a segment curve from a polycurve object. A polycurve is a curve consisting of two or more curves joined together

Syntax

Rhino.ExtractPolyCurveSegment (strObject, intSegment)

Rhino.ExtractPolyCurveSegment (strObject, arrSegments)

Parameters

strObject

Required.  String.  The object's identifier.

intSegment

Required.  Number.  The zero-based index of the segment curve to extract.

arrSegments

Required.  Array.  The zero-based indices of the segment curves to extract.

Returns

String

If intSegment is specified, then the identifier of the extracted segment curve if successful.

Array

If arrSegments is specified, then the identifiers of the extracted segment curves if successful.

Null

If not successful, or on error.

Example

Sub ExplodePolyCurve

  Dim curve, i, count

  curve = Rhino.GetObject("Select polycurve to explode", 4, True)

  If IsNull(curve) Then Exit Sub

  If Not  Rhino.IsPolyCurve(curve) Then Exit Sub

  count = Rhino.PolyCurveCount(curve)

  For i = 0 To count - 1

    Call Rhino.ExtractPolyCurveSegment(curve, i)

  Next

  Call Rhino.DeleteObject(curve)

End Sub

Also See

IsPolyCurve

PolyCurveCount