Mdonovan 4 Posted May 2, 2020 (edited) Hi Guys, I am trying to learn more VEX and I am definitely in need of some assistance here. This is very basic. I have stacked rows of curves that have 3 points each. I want to delete from 0 to 2 pts per curve randomly. Curently I am assigning an @del_qty to each primitive that will tell me how many point on that primitive I am to delete. I dont know how to delete the points using a wrangle since my @del_qty lives on the primitive. Below is an imag that show what I am attempting to do (the red x's are deleted points). . Edited May 2, 2020 by Mdonovan bottom image does not represent data in spreadsheet. Share this post Link to post Share on other sites
Mdonovan 4 Posted May 2, 2020 (edited) Here is another image kind of showing my progress .... What I want to do based on this data is randomly delete: 1 point on prim1 2 points on prim2 1 point on prim5 1 point on prim6 1 point on prim9 I underlined some points in the return value from primpoints just to illlustrate possible points to delete. Edited May 2, 2020 by Mdonovan Share this post Link to post Share on other sites
anim 1,262 Posted May 3, 2020 (edited) you can use removepoint() function to delete any input point you want Edited May 3, 2020 by anim Share this post Link to post Share on other sites
Mdonovan 4 Posted May 3, 2020 Maybe this image will help ... I think I need to iterate over each primitive and then get the min and max value of a static id to delete the points. Share this post Link to post Share on other sites
Aizatulin 165 Posted May 3, 2020 (edited) Hi, I would go with two steps: get the number of points to be deleted for each prim (already done) use this number to calculate a random selection of points for each prim (the selection can be obtained using the primpoints() function to get all points from each prim) random_selection.hipnc Edited May 3, 2020 by Aizatulin Share this post Link to post Share on other sites