Jump to content

setpointattrib vex not working


Recommended Posts

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");


Link to comment
Share on other sites

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 by Atom
  • Thanks 1
Link to comment
Share on other sites

Posted (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 by animatrix
  • Thanks 1
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.

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