Choose curve from centroid


I have a set of closed curves from which I have extracted their centroids through the Area component.
I have split the centroids in three different lists (with some design criteria irrelevant to this post) and now that I have the three lists of points, I would like to generate the equivalent three lists of curves.

My question is, is there a way to choose the curves through their centroids?

Hope this is clear and thanks a lot!

I think i understand what you’re looking for; 3 sets of curves matching the centroids lists.
You could use the the pattern of the centroid list to sort the initial list with closed curves.

Does this make any sense?

or play with MatchTree


Thank you for the answer. I am attaching a simplified version of my GH script to make it more clear.

I tried with the Match Tree component that you proposed but I do not get a filtered per centroid list of curves as an output…

Thank you for your time! (7.3 KB)

Why not just apply a copy of Split to the circles?

Hi Joseph,

I am afraid that would not work in all cases as on the script that I am currently working on, the list of points have not occurred through Split but through more complex processes. I just uploaded this script as a simplified version to show where I am trying to get…

Member Index (12.6 KB)

looks solid @Joseph_Oster

maybe Point in Curve can be helpful too

Sure, InCurve (cyan group) works fine and could be more robust. (12.4 KB)

Hi both!

Thanks a lot for the input.

I am finally attaching the original script I am working on, where I tried both solutions
(Member Index & Point in Curve) and they appear to be giving me a random output.

As you will see on the script I have generated 3 lists of points, the blacks, the greys and the whites. From these points I want to generate the equivalent three lists of curves that these points correspond to (blacks, greys & whites).

Sorry for attaching this file in delay, hoped we could resolve it on the simplified version.

Thank you for your time!!! (143.7 KB)

I think this gives what you (144.8 KB)

1 Like

Don’t know why InCurve fails? (146.2 KB)

Yes! This workings perfectly!

(I am a bit surprised because I applied the same Member Index action on my script and the output is not controlled.)

In any case thanks a lot for your time.

The indices for the boundary surfaces differ from the curves for some reason, so either use the curves or the boundary surfaces.

Using entwine like @Joseph_Oster did, reduces the number of components quite a lot: (142.3 KB)

1 Like

It’s clear! Thanks a lot again!