# Group vectors

(alexduro) #1

Hello,

I’ve created a list of vectors as in the image but they have no order, now I would like to group them all. I am struggling trying to know how to do it, what I want is to have groups of 2,3,4… vectors. The rule would be that each group is made from the vectors which start on the same point.

Thoughts? Many many thanks!

vectors.gh (123.9 KB)

(David Rutten) #2

Vectors do not start anywhere, they are relative coordinates in space. This is why if you wish to draw vectors you have to provide anchor points as well as the vectors themselves. Vectors can only be grouped by properties they actually have, such as direction or magnitude.

But I see you have anchor points, so you’ll want to merge these into groups where the defining characteristic of group membership is distance to other points in the same group? There’s a component for this called Point Groups. However I noticed your point and vector data have a lot of structure to them already (they are all organised in different branches under properly hierarchical paths. Yet you also seem to have about 14 vectors for every 5 points. Are you sure this layout is correct?

At any rate, do you wish to remove all your structure and just group these points and vectors using the entire collection at once?

(alexduro) #3

Hey David!

Thank you very much for your response! I see what you explain about vectors, know I have a better understanding of problem that I have.

Yes, I have several vectors for each point, what I am trying to parametrize is a structure as below:

Beams are made by plates following three directions - the one to the center of each collindant polyhedron. And nodes are made from the planes of the faces of the collindant polyhedrons.

So I have the same issue with grouping the vectors for the nodes, as I want to have the anchor point in the vertex and control all the adjacent directions so I can create the node. Maybe my strategy is completely wrong.

So my “groups” would be as marked by the colours above.

I reattach the complete file,

Many many thanks for your time!!

test7.gh (151.8 KB)