damonmaster Posted October 22, 2021 Share Posted October 22, 2021 Hi everyone, I use “setdetailattrib” to get the maximum(or minimum) value of an attribute in VEX,but how can I get it in same “attribute wrangle” node?because I need execute this every time in the for loop. Quote Link to comment Share on other sites More sharing options...
kstrev Posted October 26, 2021 Share Posted October 26, 2021 if you still need a solution on this can you add a simple example of what you are trying to achieve? Quote Link to comment Share on other sites More sharing options...
animatrix Posted October 27, 2021 Share Posted October 27, 2021 Hi, setdetailattrib will resolve the final result after the node finishes executing. If you want to get the min and max values inside the same wrangle node, you would have to loop over the values yourself, which would obviously be extremely inefficient performance wise. I would recommend doing it in another wrangle. This used to be the fastest method but the latest performance improvements SESI did to Attribute Promote SOP should now be the fastest of all. 2 Quote Link to comment Share on other sites More sharing options...
damonmaster Posted October 28, 2021 Author Share Posted October 28, 2021 I want to achieve this effect. The points in group A are connected to the nearest points in group B, starting with the smallest serial number. Each point can only be connected once. This can be achieved when the number of points is small, but when the number of points exceeds one million, Running in the solver, my method is too inefficient to be applicable, is there any good way Quote Link to comment Share on other sites More sharing options...
DASD Posted December 21, 2021 Share Posted December 21, 2021 I guess you mean you are looking for the points that are closest? I would check the nearpoint() function and run that per point and have the points in the target group on the second input of the wrangle. In a detail wrangle, you might try something with pcopen where you open the point cloud of targets and iterate over that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.