Jump to content

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


damonmaster

Recommended Posts

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
Link to comment
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

Link to comment
Share on other sites

  • 1 month later...

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.  

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...