# Pick curves

im trying to pick curves (x,y) out of surfaces (rectangular) has different edges numbers.

Good morning @kais_saab
Welcome to the community.
Just a heads up you should almost always post minimal amounts of relevant code pertaining to your problem.

thanks Ryan,i was just unaware of the attachment and post it fast sorry ! and here are attachments of script and model of what im trying to achieve basically is to break this surfaces into lines and have separate parameter for each group . sorry again

1 Like

So is your question analogous to â€śhow do I filter all lines from a giant list of lines whose tangent direction is close to a given vectorâ€ť?

@kais_saab
When I said code I guess I meant file. If you could upload your file with internalized geometry, that would be really helpful. So sorry, I will try and be a little clearer.

Hi @DavidRutten and thanks , i had this boxes and wanted to pick each of its surfaces edges , but the surfaces edges has different numbers of elements in each Brunch and not in order â€¦ my question is how can i collect the blue, black and red edges each in separate group / tree i have tried to pick based on the angle but i still think its not efficient way since i hit the wall again coz blue and black edges came in same group
trial002.3dm (422.1 KB)
trial 002.gh (15.6 KB)

@Ryan14

1 Like

@kais_saab
Here is a possible but (Personal opinion) really bad solution.
trial 002 Try.gh (28.2 KB)

Thanks @Ryan14 Ryan, wouldnâ€™t call it bad, but it miss the main concept of what i want from this script, what im trying till the moment is to keep (1,2,3â€¦)each in certain brunch having a control over blue, black and red separation. they are already have several edges and not in order as example 2 has 6 edges 1 has 4â€¦ having said this even if they are similar edges numbers i cant list item them because they not in order clockwise or anticlockwise. again thank you and hope somebody can help with anyway possibleâ€¦

This will get the edges of the bottom faces from the breps in your file and sort their positions. The breps in your file were not ordered, so I sorted them as well.

trial 002_re.gh (15.4 KB)

Not sure what kind of structure you want for output, but with ordered curves you should be able to organize the output any way you want.

-Kevin

thanks @kev.r this s a cleaver and simple way to sort geo havenâ€™t thought about it. but edges of red and blue stil same group what im trying is to have them separateâ€¦ the main idea is that i need each of the geometry element/edge as a wall and have control over the edges parameter separately in order to create rooms out of each geometry with different definition of walls . imag01

thanks again for your effort Kevin â€¦

In the file I uploaded in my previous post, the curves with preview colors red and blue are in the same DataTree branch with red at index 0 and blue at index 1. If you want them on separate branches, all that is needed is to graft the DataTree.

trial 002_re2.gh (19.9 KB)

Once you have geometry that is properly sorted, you can group it any way you want (if you understand grasshopper data management).

-Kevin

1 Like

thanks @kevin i was trying split the tree since i got your reply â€¦ thank you very much!!