Hello,
I have 4 geometries with two points. I start with one point of the geometry1 (point A) and I need calculate which of the points of the geometry 2 is the closest point of point A (ie point C), select that point and do the same with the geometry 3 calculating the closest point of point C (ie point F),…
I know calculate the length, sort and filter but i don´t know the way to manage the list.
Regards.
it depends mostly with how many points you’re dealing with, using a loop simplifies things a lot:
chain_of_closest_point.gh (13.0 KB)
My target is get order that curves start in the 1 and using clock wise 7 be 2, 5 be 3,… I think that a way is with the distance from one point of a curve to the closet point to the other geometry but…
List Management.gh (8.0 KB)
are those rectangles going to rotate? or are they -eventually- just allowed to translate on XY plane?
because, internally, points looks like they are already well sorted in counterclockwise order starting on the bottom-left corner…
Inno,
I like order the curves between them. Not the vertex.
Regards
this might work in this case, but a lot depends on how your geometries are organized
given a starting curve at index i, it searches the closest curve to i in the whole set of {all_curves - i}… rinse and repeat
chain_of_closest_curves.gh (17.2 KB)
Thanks so much @inno . I have study your reply because i didn´t know the “loop” components of Anemone.
Regards
nice @inno with curve proximity is more precise, anyway here is the nearest neighbour with points and if your geometry has this “radial” location, sort along curve is better.
ListManagement_v2.gh (25.5 KB)
List Management_v3.gh (13.6 KB)
Thanks so much. I write this code how i think the way but i don´t know how to manage the list to avoid repeat ever code for each point.