Jump to content

primpoints hELP


MitchFields

Recommended Posts

I have multiple lines, 25 primitives all containing a wide range of points. I want to append each point to a group depending on the primitive number.

My initial code looks like this,

int poop[] = primpoints(0,0) 

foreach(int i; poop) {

i@group_primnum_0 = 1;

}

This function grabs all of my points, when I only want specific points for each primitive to create groups out of.

How can I make this procedural to loop over all of my primitives and assign each array it's own group id? 

Thanks!

Still new to vex >:{|

Link to comment
Share on other sites

this is essentially generating group name based on the primnum that the current point belongs to

then just adds the current point to the group of such name

 

i@group_groupname is usually more convenient and direct way to assign current point to specific group however you can't set group membership to other group than "groupname" and to other point than current (@ptnum)

so in this case you want to use setpointgroup() because you can vary groupname per point if you want, also you'd want to use setpointgroup() if you want to set group membership to other point than current

 

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