From wrangle, get point list from a group sop?

   1968   4   0
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Hi!

I'm processing some photogrammetry scans with millions of polygons and I'd like to choose 3 points and create a triangle out of those with a Detail Wrangle.

Is there a way my wrangle could search for the “Base Group” information found in the node called “pick_3_points” from the detail wrangle?


-Olivier

Attachments:
Houdini_getGroupInfo_fromDetailWrangle.jpg (115.1 KB)

User Avatar
Member
8518 posts
Joined: July 2007
Online
you can use expandpointgroup() [www.sidefx.com] VEX function
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Amazing!

Thanks again!

-Olivier
User Avatar
Member
133 posts
Joined: March 2016
Offline
Is this what you were thinking - see attached?

Detail wrangle 1
i[]@pointnumbers;

for(int i = 0; i < npoints(0); i++){
    if(inpointgroup(0,"pick_3_points",i)){
    append(i[]@pointnumbers,i);
    }
}

int firstindex = i[]@pointnumbers[0];
push(i[]@pointnumbers, firstindex);

Detail wrangle 2
addprim(0,"polyline",i[]@pointnumbers);

Attachments:
vex-test.hiplc (132.1 KB)

Love Houdini
User Avatar
Member
1004 posts
Joined: April 2017
Offline
Thanks. It looks like it would work but the expandpointgroup function does all that.
  • Quick Links