MadMax50 Posted April 29, 2023 Share Posted April 29, 2023 Hello,I am trying to set a point attribute based on the points that the nearpoints function found. This gives me an error. I am not sure why. Any help would be appreciated , thank you i[]@neigh= nearpoints(1,@P, chf("Max")); int setpointattrib(0,"start", i[]@neigh, 1, "set"); setpointattrib.hipnc Quote Link to comment Share on other sites More sharing options...
Atom Posted April 30, 2023 Share Posted April 30, 2023 (edited) You don't have to use a setpointattrib on input 0, because you're already running over those points. You can assign the attribute directly. i@start = @neigh[1]; Edited April 30, 2023 by Atom 1 Quote Link to comment Share on other sites More sharing options...
MadMax50 Posted April 30, 2023 Author Share Posted April 30, 2023 @Atom, thank you Quote Link to comment Share on other sites More sharing options...
animatrix Posted May 1, 2023 Share Posted May 1, 2023 (edited) As @Atom mentioned, you don't have to use setpointattib in this case. But just for completeness, it was erroring because the order of arguments is wrong and you included the return type in the function call. It should be like this: setpointattrib ( 0,"start", @ptnum, i[]@neigh ); Edited May 1, 2023 by animatrix 1 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.