algorithmic modeling for Rhino
Hi All,
I'm wondering what is the easiest way to filter and sort a set of real numbers by their value while keeping their original index number. The purpose of the exercise is to pick certain objects out of a larger set based on some attributes, and then be able to find them in the original list, using the index number.
Here is the example: I created a large set of geometries. then I created a list from their volumes. My approach was to take this list and use "Dispatch" tool to filter and then rank results. First problem; I don't know how exactly I should write the expression for F(x) that filters results for " x < 10000 ". Second I don't know how to keep the original index numbers in the two resulting lists. I would like these original indexes to refer to the same values even after I sort them by their value.
I appreciate any help.
Best,
Yavar
Tags:
Hi Yavar,
there's two common ways to approach this.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks David. I tired the first method and it worked beautifully.
Yavar
For this to work you would need to put the Distance output into synchronous A Sort and then Sort A output into L List Item
Alternatively use Find Similar Member instead of List Index
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by