Get the diagonal, adjacent face neighbors of a mesh face?

Hi,

Is there a straightforward way to get indices of diagonal, adjacent neighbors to a mesh face that works independently of the mesh topology?

There’s a method for getting the adjacent faces that share an edge with a face, but I haven’t one for getting the diagonal face neighbors.

Thanks.

What would you want it to return for these corners?:

One option could be to GetVertexFaces for all the corners and remove those which are also in the AdjacentFaces of the face. So the highlighted face on the left would have 3 ‘diagonal neighbours’, while the one on the right would have 5.

1 Like

Amazing example, Daniel!

For the left example, it is not necessary to get any of the neighboring faces, since I can get them all as adjacent faces that share an edge with the highlighted face.
The right example should return the two faces that are connected to the corner of the highlighted face, but don’t have an edge in common with it.

Exactly, what I’m looking for! Thank you very much. :slight_smile: