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:
Guys thanks everyone for the support!
somehow, when I equalize values, it messes up with true/false.
In attachment you can see an example (branch 25). 940.5 is in position 0, 1 and 4. Somehow, the bool outcome is messed up (position 1 gives false when it should be true).
any ideas?
thanks
That might be what David pointed out in his first reply.
And this is probably why Raul has been working with indices instead of float numbers.
Your definition has two more problems though:
1. You shouldn't use 0 in the expression because if you have a set of 3 points with x=0 it will mess up.
2. If you have 2 sets of points with equal x in the same list, it will not work.
And finally it appears from your screenshot that you are not after the actual number that repeats 3 times but rather a true-false pattern to help you evaluate another list.
So something like this should work:
just notice that you actually want the [Num] component to give an error because this way it turns empty items to nulls.
also notice that the pattern provided by [Null] component is the opposite from the one you want, so you should use the B output.
I already told you, this is probably what David pointed out in his post.
Check these posts out as well:
http://www.grasshopper3d.com/page/search-results?cx=007664031582976...
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