Extracts a segment curve from a polycurve object. A polycurve is a curve consisting of two or more curves joined together
Rhino.ExtractPolyCurveSegment (strObject, intSegment)
Rhino.ExtractPolyCurveSegment (strObject, arrSegments)
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. |
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. |
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