Connecting disconnected points on a mesh without duplicates

   1605   1   1
User Avatar
Member
29 posts
Joined: Oct. 2015
Offline
I'm trying to "partition" a mesh so that the findshortestpath sop runs over a portion of the mesh's points at a time.
In the partitioning process, some of the points of the mesh become disconnected, and I can't find a clean way to reconnect them. I tried connectadjacentpieces, but:

- when used with connectino type: adjacent points, it almost doubles the number of primitives, instead of only connecting the points that are missing (in the following image, I'd expect to see the just one added polyline)

- when used with connectino type: adjacent pieces from points, it doesn't generate any lines - I'm probably not creating the name attribute correctly...

Is the connectadjacentpieces sop the correct tool for this? Or is there a better way?
Edited by Lyubomir Popov - Jan. 24, 2021 11:43:49

Attachments:
shortest-path-partitioned.hipnc (262.0 KB)
connect adjacent pieces question.jpg (276.1 KB)

User Avatar
Member
142 posts
Joined: Aug. 2009
Offline
int pts[] = pcfind (0,"P",@P,ch('s_r'),2);
int no_pts[];
foreach (int pt;pts){

        if (pt> @ptnum) {
         
        addprim(0,"polyline",@ptnum,pt);
        append (no_pts,pt);
        }
        
    }    

I like this Process last Post in Topic ..
maybe you can adapt to yours and make something Nice ..Have Fun
https://forums.odforce.net/topic/47093-hud-fui-ui-design-in-houdini/?do=findComment&comment=222002 [forums.odforce.net]
Edited by Librarian - Jan. 24, 2021 17:22:32

Attachments:
addasfssss.gif (4.5 MB)

  • Quick Links