Jump to content

Clustering Objects individually


wreath

Recommended Posts

You can cluster per piece by making sure copy numbers are matching between primitives and cluster points.

image.png.9b6a9dd7af71a6e45f13d65236d83acd.png

// 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 2
Link to comment
Share on other sites

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.

image.png.9b6a9dd7af71a6e45f13d65236d83acd.png


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

Link to comment
Share on other sites

15 hours ago, konstantin magnus said:

You can cluster per piece by making sure copy numbers are matching between primitives and cluster points.

image.png.9b6a9dd7af71a6e45f13d65236d83acd.png


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

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