algorithmic modeling for Rhino
Hello everyone!
i'm struggling with this:
i have a list of values in branches of different sizes (picture attached), sometimes 6 values in one branch, sometimes 3, etc.
I'm looking for the value that is repeated 3 times in a row (easy thing where it's just three of them, but they are always mixed with other branches of different sizes), so for instance the value in bold in the picture.
ps. the values correspond to a X coordinate of points, i need to extract all the points with the same X coordinate. Points are in a 3x3 grid, and not all the cells are "full" (attachement 2)
Thanks!
Tags:
And each list contains at most three identical values? Are they always consecutive?
Yes, i mean, the fact that they are consecutive is because i sorted them, before are not.
Here s the definition
Works great!
Thank you very much, as always! :))
One last thing. Would it be possible to assign "Null" to those that don't have 3 equal numbers?
So later if i need to create a pattern i can assign "0" to the Nulls.
thanks
maybe something like this...
cheers,
RM
Thanks RM, somehow this option of yours doesn't work if you have other numbers (i have tried to add a third branch with (12;12;12;5;8) (randomly) and the result goes to 0
I solved it by connecting the set output to the y input of the evaluation component.
The problem is that now it says "1. Data conversion failed from Text to Number" if i want to compare the numbers
yes, because 0 is the first index of 12
Now everything works. Connecting the set to the y solves the first issue, then instead of typing "null", i typed "0" and that makes everything into numbers.
thanks everyone for the help!
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