lulu01 Posted July 30, 2018 Share Posted July 30, 2018 (edited) Recently I started learning VEX, but now and then I hit a wall. In this case I can't find the answer on my own. What I'm trying so solve here, is to read the pscale from the closest point. //PSCALE @pscale = random(@P);; //NEARPOINT string me = itoa(@ptnum); i@near = nearpoint(0,'!'+me,@P); //READ PSCALE FROM NEARPOINT @npt_pscale = point(0, "pscale",@near); Getting an attribute with the point function works fine in most cases, like with the @P or @Cd, but with pscale it gives me a value of 0.0. Not sure I this is the best method, or maybe I'm overlooked something. I really can use some help. nearpoint_pscale.hip Edited July 30, 2018 by lulu01 Quote Link to comment Share on other sites More sharing options...
toadstorm Posted July 30, 2018 Share Posted July 30, 2018 Generate your @pscale in a separate wrangle or Attribute Create SOP, before this wrangle. Wrangles run in parallel, so there's no guarantee that any other nearby point has an initialized @pscale value when the current point runs its search. 1 Quote Link to comment Share on other sites More sharing options...
lulu01 Posted July 31, 2018 Author Share Posted July 31, 2018 I'm still a bit lost on the whole parallel processing concept, but I will do a some more research on the subject. For now it works, THX toadstorm! 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.