Jump to content

While loop vex Issue


Recommended Posts

Hi everyone,

I'm trying to set the pscale of every point in a point cloud with the minimum distance between each other. Basically, I want to achieve this tutorial of Javier Toledo but I don't need the growing effect, only the final result as you can see in the video preview.  

 

So I have a point cloud and I wrote this in a point wrangle. I thought it was correct, but for some reason, it doesn't work. Does anyone know why? 

@pscale = 0.0001;
int active = 1;

while(active == 1){
    
    int near_pts[] = pcfind_radius(0,"P","pscale",1,@P,@pscale,2);
    
    @pscale += 0.0001;
    
    if(len(near_pts) > 1){
        active = 0;
        }
        
    }

Thanks in advance!

Flavio Tarantini

 

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...