It seems like a simple task. All I want to do is to select the shortest edge of multiple closed curves in grasshopper. I deconstructed them, sorted them, picked up the first one on the list and now I want to gain its index for another selection which would finally be the shortest one in the first list but “item Index” is giving -1 for all the curves. What am I doing wrong?
I also tried item index with a bunch of numbers to see if it shows the same behavior and yes it gives -1 there too
Shortest edge.gh (22.6 KB)
Not sure why item index fails, though you can create a list of indices, sort them as well and pick the first one:
Shortest_edge_02.gh (19.9 KB)
1 Like
Adam_M
(Adam Mounsey)
January 10, 2023, 9:00am
3
Something like this should work with Item Index.
See the post below for a better explanation (its not a bug).
Greetings,
I would appreciate some [Capture] help.
I’ve used grasshopper for years, but this is the first time I have been stumped so hard, as I’d have to back-track a huge script to get things to work the way they should. Somewhere along the way in my script the Item Index managed to break and no matter what sort of information I feed into it, it will give a -1 value.
Before posting: Item Index always returns -1 - I’ve looked at the forum and found different answers, but they involve not us…
1 Like
@Abolghasem_Raeis_Sam ,You can also try this method. Use the Node “Find Similar member” under the Sets>>Sets tab
1 Like
I didn’t know what is the A parameter in the sort list component. Now I get it. Thank you so much
all right now I got the difference between item index and member index
Thanks alot
1 Like