Can i group this data in Grasshopper?

Hello, I’m really newbie to Grasshopper and Rhino.

Can i make this data

test1

Grouped like this?

test2

Yes… There are several ways to do it depends on what you are trying to achieve.

One way is to 1- split the list I to 2 lists using the “dispatch component”
2- graft the outputs from the dispatched list to get each list member to be. In it’s own branch.
3 use the “merge” component to merge the 2 trees again.

Give it a try and let us know.

1 Like

PERFECTA!

Thank you so much :smiley: :smiley:

But in the other hand, there would be some time that i have to make the group in the order like {0, 1}, {2, 3}, {4, 5}. (I think your way is make it {0, 3}, {1, 4}, {2, 5}, each number means data “Column” 's index number in the original)

Am i thinking right?

1 Like

You are so correct. And it is a good practice to use Path Mapper component.
If you master that. You will master data trees.

1 Like

Hello,

For your first example have a look at Partition List.

Also, I may be thinking outside the box here but I’m assuming you are trying to group some columns that are close to each other, or maybe stacked on top of each other ? There may be a better workflow consisting of referencing all of them as a list, no matter the order, and then group them accordingly - probably using Point Groups from the middle of their axis. Of course if you only have a few columns this won’t save time, but if you have much more pieces, selecting them one by one in a specific order in Tekla will be a nightmare.

2 Likes

Partition List, great. It worked perfectly done :smiley:

Actually, i’ve made this parametrically,

then i want to make connections between columns and beams like this.

but with these linear list, each columns makes connections with all the other beams
not only connected beams.

test1

you know, columns can’t make connections with beams far away.

So, i tried to make the columns and beams tree groups and matching each other.

I’m just afraid that i’m doing it proper way.

Hello,

It seems you are trying to apply a component that only has a Main Part and one Secondary Part.
In this case, use the M and 1 inputs of the Component component, both should be lists of equal length.
You have 12 connections, so you have to provide a list of 12 columns, no matter the order, and the list of 12 beams associated with each column.
Since the end points of the beams are the locations of the connections, it’s actually easier to associate them with the beam as reference and the column as target.

For each end point of any beam (=> Graft), you need to calculate the distance to every column (=> Flatten) and take the closest one - see example attached, components fire errors since I’m doing this without a Tekla model opened.

TeklaConnection.gh (12.9 KB)

1 Like

Thanks for the explanation :D:D

BTW, i know that all of the data is aligned as Tree structures.

So i tried to organize like below :

tree

Is this right thing?

Depends on what you want to do… There is no universal tree structure that works for every project.
Your tree only contains 8 items, so if you are still after your connections shown above, it probably won’t work.

Are you trying to create perpendicular beams ? There woud be 8 of them…

1 Like

No, I never use Path Mapper and don’t recommend it. It is complex and fragile, breaks easily if/when the upstream data paths change.

Partition is the correct tool for this job.

1 Like

Okay. I take your word for that.