Sorting curves after nesting

Hello everyone,

I’ve been trying lately to find a way to nest two sets of curves (x and y) to later distinguish them once in their nested position. My first idea was to set a list of each curve’s length to subtract to the result, but don’t really know how to achieve that.

Thanks for the help!

This sounds like something for the new meta data componnents. You can add an atribute to the curves befor the nesting and read it after.

1 Like

This is not a native GH component, but a Pancake addon one, am I right?

1 Like

Hi @Walter_Drillon,

how is your data stored before you use the nesting ?
Are your curves x / y not in a seperate list already ?
I think open nest can handle tree structures and if not it should be no problem to guide a flat list of curves to a new structure…every item in the list keeps the same index.

You’re correct, these are two sets (two curve elements) which so far I’ve merged before going in the nesting component. Since I’m new to this programmation language, could you develop a bit more?

Best

Are these two sets of curves or two lists of curves.
Sets have no index and no order …i guess you talking about two lists with curves.
If you merge two list to one list you get listlength 1+2 if you split the new list at listlength 1 you get the same structure before.

This is a very good video of datamanagment in grasshopper.

I’ll have a look. Thanks for the explanation! :slight_smile:

If you hover with the cursor over the open nest input you get a small description what type of data and how many ( item,list,tree)

In rhino 8 you have attrinutes built in. Look for the rhino tab in grasshopper.