Group Points by Distance (VEX)
4529 4 0-
- ude-p
- Member
- 9 posts
- Joined: Nov. 2021
- Offline
Hello folks, is there a method for grouping points based on their distance? I have a solution in mind that involves using the nearpoints and max functions to assign an integer attribute value to each cluster of points, but I'm not sure how to implement it. Please see the help file linked below.
Thanks for checking it out.
Thanks for checking it out.
-
- tamte
- Member
- 9268 posts
- Joined: July 2007
- Offline
let's say your original points is geoA
now branch out Fuse SOP and adjust the distance so that desired cluster of points snap together, let's call this geoB
geoB will have 5 points in your example
now do Point Wrangle on geoA and connect geoB to second input
now branch out Fuse SOP and adjust the distance so that desired cluster of points snap together, let's call this geoB
geoB will have 5 points in your example
now do Point Wrangle on geoA and connect geoB to second input
i@cluster = nearpoint(1, v@P);
Edited by tamte - March 15, 2023 19:02:35
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- ude-p
- Member
- 9 posts
- Joined: Nov. 2021
- Offline
Thanks a lot for your assistance; the above issue aims to provide a third option (group by distance) for imported assets with no name, class, or string attribute. The idea is to group these assets based on their proximity to one another. This is accomplished by packing all primitives, calculating the proximity value of each point, and assigning an attribute value to each cluster of points (which is where I am stuck).
Please see hip file for more info.
Please see hip file for more info.
Edited by ude-p - March 15, 2023 19:56:29
-
- tamte
- Member
- 9268 posts
- Joined: July 2007
- Offline
UdeI don't really understand what you are asking now
This is accomplished by packing all primitives, calculating the proximity value of each point, and assigning an attribute value to each cluster of points (which is where I am stuck).
did the previous description not work?
did you have a look at the file I provided?
here is exactly the same nodes applied to your file, but if it's not what you are after, please clarify more
Edited by tamte - March 15, 2023 20:22:52
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- ude-p
- Member
- 9 posts
- Joined: Nov. 2021
- Offline
-
- Quick Links