I'm trying to use the nearpoints function in a Solver SOP to get the nearest point and do something with it. So I use the 2nd element of the nearpoints result because the first element is the current point itself. However, that only works for the first point because once the code runs on the next point, it's 2nd element from the nearest point result is the previous point that the code ran on because it also is this current points nearest neighbor. Hopefully that makes sense.
So my question is how can I make the code disregard a point once it has ran over it so that it doesn't get considered in the nearest points function? what would be the logic or maybe there is a totally different way of doing this. Any help would be much appreciated. Thanks.
See attached file.
Nearpoints and Array Vex Problems
2703 2 1-
- traileverse
- Member
- 369 posts
- Joined: Nov. 2015
- Offline
-
- mestela
- Member
- 1850 posts
- Joined: May 2006
- Online
-
- traileverse
- Member
- 369 posts
- Joined: Nov. 2015
- Offline
mestela@mestela Thanks for the link, I've been reading and trying to compare the points from input1 to prevfram but with no luck. So essentially I tied the @ptnum to an id attribute then try to check if that point (the current point) is in the array and if it is then it should remove it from the array, but I'm not having any luck with making it work.
This might help?
https://www.tokeru.com/cgwiki/index.php?title=The_solver_sop#Another_take_on_updating_the_inputs [www.tokeru.com]
Edited by traileverse - April 1, 2021 10:15:48
hou.f*ckatdskmaya().forever()
-
- Quick Links

