Jump to content
renderfan

Find connected primitives

Recommended Posts

Hello all!
How can I find all connected primitives to given prim in big polygon mesh? For example if I have prim number 10 and want find surrounding prims.

Thank you very much!!!

Share this post


Link to post
Share on other sites

Oh, or did you mean just the immediate connected neighbours? In that case use the primneighbours() expression like this. If you only want ones that share an edge and not just a point, use 2 as the third argument.

ee_select_neighbors.hip

  • Like 1

Share this post


Link to post
Share on other sites

The file provided by eetu work very good but if I use expression `primneighbours(opinputpath(".", 0), $PR, 2)`

in AttribCreate-Sop it is very slow for big mesh. Is there other way to find neighbour primitives for every primitive in mesh?

Thank you very much!!

Share this post


Link to post
Share on other sites

I think Group Edge Depth is the fastest method of all. You have to convert from points to primitives first though which shouldn't be bad.

 

Pvow1to.png

  • Like 1

Share this post


Link to post
Share on other sites

you can also use a connectivity sop,
delete everything but the primitive you are after.
and then have another delete sop that looks at that attribute and delete everything that does not have the same value.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×