Just ran into something strange with ExplodeCurves method, when having the blnReturnSingles as TRUE.
If my input is a Line or Circle (non-explodable), their IDs just get passed along. In case of non-explodable freeform curve object, a new object is created and it returns a new ID. Can you see it on your end as well ? Rh5 SR 12 64-bit
Let me explain a bit more - the ExplodeCurves behaves as expected with explodable and non-explodable objects, except for non-explodable circles and lines. No matter what parameters are used in Rhino.ExplodeCurves method, circles and lines behave differently than non-explodable elipses, NURBS open- and closed curves.
In case of blnReturnSingles=True:
cirlces and lines original ID get passed along as a result, all other non-explodables get copied and the new ID is returned
In case of blnReturnSingles=False:
cirlces and lines original return Null, all other non-explodables get copied and the new ID is returned
Take a look at this test code and try running it with the attached test file:
Dim arrCurves : arrCurves = Rhino.GetObjects("Curves?", 4)
Dim arrExploded
arrExploded = Rhino.ExplodeCurves(arrCurves, False, True)
If Not isnull(arrExploded) Then
Call Rhino.MoveObjects(arrExploded, array(0, 0, 0), array(0, 0, 10))
Call Rhino.ObjectColor(arrExploded, vbRed)
End If
I think the best behavior would be if all non-explodable curves returned Null with blnReturnSingles=False, and if blnReturnSingles=True then a copy of each non-explodable would be returned.
Passing along the IDs of some input (non-explodable) but not all gets confusing.