algorithmic modeling for Rhino
Thanks a lot.
For some reason the Member index does not return an index. It seems like there is something wrong with the datatype coming out of the List item... If I manually write the value I am searching for in a panel the index is return correctly, but the way it is set up at the moment does not return the index.
Never mind. I solved it.
But thanks again! :)
When you say "the index of the first value in M_Rd which is bigger", I thought you meant index of first item in the list that is bigger? So for your example, the index would be 1 and the value=70.68?
Or did you mean index of smallest value which is bigger, as Hyungsoo Kim did it?
In other words, while it does affect the index if you reverse the list, does the sequence of the M_Rd list affect the value?
Here is a slightly different arrangement of Hyungsoo Kim's code - same result:
It looks like you interpreted the problem as I did - find the first value in the sequence that is larger rather than the smallest value that is larger. I hope the OP (Rasmus Bendtsen) will clarify his intention, and perhaps post his solution?
Your Python code initially failed for me when I applied the data I used in previous post. Appears to be a data type problem as I was able to fix it by running the 'X' value through a 'Num' param:
Ah yeah, I think I didn't explicitly set type hints, so the data will be passed as a string when coming from a Panel (just right-click the input parameters and set them to float to fix).
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