Selection Strategy

Hie,
I have six boxes and two planar yellow curves. The curves are not concentric and not parallel. I like to find a way to separate the boxes in two groups, one with the boxes between first and second yellow line and other group to thes boxes between second and third. Could you give a clue to make it?

Regards

Hi @fceinos,

What do you mean by boxes?
How are the data (boxes) structured, is it a list with a directional order or a random set of items?

So many questions.

Guesswork.
Try to use distance to order your boxes or simple split your box list if they are ordered in direction.

Another solution is to upload a file.

1 Like

Hie,
Thanks.
I attach the file.


image
Regards.
Untitled.3dm (179.1 KB)

@fceinos maybe like this ?

dis.gh (52.4 KB)

Oh the second option is maybe a better solution, just create a vector between the boxes center points and the nearest point on the line between the two others…if x of the vector is + its on the right side and - on left…in this way the middle line doesnt need to be in the middle…only between them.
dis2.gh (53.8 KB)

1 Like

Thanks so much.
Attach a small explanation in case it helps someone.
Here, the first option with a little explanation:


And the second:

Regards

2 Likes