etudenc Posted February 19, 2019 Share Posted February 19, 2019 Hi all, Please see the attached picture -- for every three points, I want the second and third to match the position in Y of the first. So I'd like points 1 and 2 to match the Y position of 0, points 4 & 5 to match the Y position of 3, and so on up the row of points. So far I'm not having luck with a wrangle, have tried to use a For-Each but no joy. Any suggestions? Failed attempt in a point wrangle: vector pos, oldPos; int pt; if(@id%3==0) { pt=@id; pos=point(0,"P",0); oldPos=point(0,"P",(pt+1)); setpointattrib(0, "P", 1, set(oldPos.x, pos.y, oldPos.z)); } Quote Link to comment Share on other sites More sharing options...
acey195 Posted February 20, 2019 Share Posted February 20, 2019 when running over points, you should be able to do this in a single line of a wrangle : v@P.y = floor(float(@ptnum)/3) * 2; //if you want 2 y units between every group. Quote Link to comment Share on other sites More sharing options...
Noobini Posted February 20, 2019 Share Posted February 20, 2019 vu_quantizeY.hiplc 2 Quote Link to comment Share on other sites More sharing options...
etudenc Posted February 20, 2019 Author Share Posted February 20, 2019 Thank you both! Noobini, your solution did the trick, and thank you for the HIP file. 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.