neighbours function for primitives?

   2392   3   0
User Avatar
Member
1177 posts
Joined: April 2017
Offline
Hi!

I would like to create an array containing all the neighbour primitives of each primitive. Is there already a function for that?

-Olivier
User Avatar
Member
1177 posts
Joined: April 2017
Offline
…I should clarify why I need this. I was using the Instant Meshes sop and noticed weird polygons. 2 primitives share 3 points with each-other. I tried using polyDoctor and Clean but they don't fix that problem.

That's why I would like to find primitive neighbours so I can group those specific primitives.

-Olivier
Edited by olivierth - Feb. 28, 2019 21:00:59

Attachments:
instant_meshes_bad_polyons.JPG (29.6 KB)

User Avatar
Member
9380 posts
Joined: July 2007
Offline
depends on what you define as neighbours, but to get polygons that share an edge with the current polygon
i[]@nbrs = polyneighbours(0, @primnum);
Edited by tamte - Feb. 28, 2019 23:20:51
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
1177 posts
Joined: April 2017
Offline
Ah nice!

The goal of finding neighbour prims is just to have quicler cook times by avoiding to pass over all prims.

Thanks.

-Olivier
  • Quick Links