Jump to content
Sign in to follow this  
damonmaster

How to find the max value of an attribute and get it ues VEX in one attribute wrangle

Recommended Posts

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.

Share this post


Link to post
Share on other sites

if you still need a solution on this can you add a simple example of what you are trying to achieve?

Share this post


Link to post
Share on other sites

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.

 

  • Like 2

Share this post


Link to post
Share on other sites

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

无标题.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×