wreath Posted October 12, 2019 Share Posted October 12, 2019 (edited) Hi guys i would like to cluster my objects individually right now it clusters all the nearby pieces that not even the same object (no connectivity) is that a way to solve this without using for each ? thanks! Cluster Problem.hip Edited October 12, 2019 by wreath Quote Link to comment Share on other sites More sharing options...
bunker Posted October 12, 2019 Share Posted October 12, 2019 (edited) you could just separate the 2 pieces before the rbdcluster SOP: Cluster_Problem_2.hiplc or you can make your own clusters: Cluster_Problem_3.hiplc Edited October 12, 2019 by bunker 1 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted October 13, 2019 Share Posted October 13, 2019 You can cluster per piece by making sure copy numbers are matching between primitives and cluster points. // primitive wrangle int pts[] = nearpoints(1, v@P, 1.0); i@cluster = -1; foreach(int pt; pts){ if(point(1, 'copynum', pt) == i@copynum){ i@cluster = pt; break; } } voronoi_per_piece.hipnc 2 Quote Link to comment Share on other sites More sharing options...
wreath Posted October 13, 2019 Author Share Posted October 13, 2019 12 hours ago, bunker said: you could just separate the 2 pieces before the rbdcluster SOP: Cluster_Problem_2.hiplc or you can make your own clusters: Cluster_Problem_3.hiplc 3 hours ago, konstantin magnus said: You can cluster per piece by making sure copy numbers are matching between primitives and cluster points. // primitive wrangle int pts[] = nearpoints(1, v@P, 1.0); i@cluster = -1; foreach(int pt; pts){ if(point(1, 'copynum', pt) == i@copynum){ i@cluster = pt; break; } } voronoi_per_piece.hipnc Thanks a lot for the setups guys those will do that job! cheers Quote Link to comment Share on other sites More sharing options...
wreath Posted October 13, 2019 Author Share Posted October 13, 2019 15 hours ago, konstantin magnus said: You can cluster per piece by making sure copy numbers are matching between primitives and cluster points. // primitive wrangle int pts[] = nearpoints(1, v@P, 1.0); i@cluster = -1; foreach(int pt; pts){ if(point(1, 'copynum', pt) == i@copynum){ i@cluster = pt; break; } } voronoi_per_piece.hipnc Konstantin hi again i need a bit more help on the file and did not wanted to create a new topic How can I create a new name attribute based on those created clusters just like the "cluster sop" does ? Because right now if i send these to a dop sim its recognized as individual chunks instead of clusters.. Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted October 14, 2019 Share Posted October 14, 2019 7 hours ago, wreath said: How can I create a new name attribute based on those created clusters Add this before the break: s@name = 'cluster_' + itoa(pt); 1 Quote Link to comment Share on other sites More sharing options...
wreath Posted October 14, 2019 Author Share Posted October 14, 2019 14 hours ago, konstantin magnus said: Add this before the break: s@name = 'cluster_' + itoa(pt); Thanks a lot! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.