Jump to content

VEX - POP group - npointsgroup function


WLVL

Recommended Posts

Hello Everyone!

 

I have a Pop source followed by a pop group;

 

i need the number of points contained in my source group to be stored in a variable that i am using in a fit function.

npointsgroup function returns 0, (tried also with the npoints function)

what am i doing wrong?

 

 

int npts = npointsgroup(0,"stream_chunks");
float ptprog = fit(@Frame, ch("s_frame"), ch("e_frame"), ch("s_value"),npts);  
ingroup = (@id>ptprog);     

PS_i am trying to print the value but also this seem not to work

//void printf("npts= %d", npts);

 

 

Thank you in advance!

Link to comment
Share on other sites

int npts = npointsgroup(0,"stream_chunks");
float ptprog = fit(@Frame, ch("s_frame"), ch("e_frame"), ch("s_value"),npts);  
ingroup = (@id>ptprog);     

If you are doing that business in pops, throw it in a sop solver.

Inside the default sop solver in pops, drop down a wrangle with:


i@numpts = npoints(0); 

and hook it up to the Dop Import "dop_geometry". numpts shows up with the correct count in the geometry spreadsheet.

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