Face adjacency find out

Technical discussions
Post Reply
Jack Zheng
Posts: 2
Joined: Fri Oct 16, 2020 2:42 am

Face adjacency find out

Post by Jack Zheng »

Hello,
i'm trying to identify the adjacency between two IBRepFace_DG faces. Is there any API? I was thinking to search all faces in the solid and check same.
Is there better or more efficient way?

Thanks a lot.

Mike Gershon
Posts: 4
Joined: Thu Nov 28, 2013 8:06 am

Re: Face adjacency find out

Post by Mike Gershon »

Hello Jack

i-th neighbor can be accessed via (C#):
IBRepFace_DG face;
IShapeArray_DG edges = face.GetEdges();
IBRepEdge_DG edge = edges.GetAt(i) as IBRepEdge_DG;
IBRepFace_DG faceAdjacent = edge.GetOtherFace(face);

If there is more than one wire and/or you need to be more specific, use:
IBRepEdge_DG edge = face.GetWire(indexWire).GetEdge(i);
IBRepFace_DG faceAdjacent = edge.GetOtherFace(face);

In case of an open surface faceAdjacent can be null.

Good luck

Jack Zheng
Posts: 2
Joined: Fri Oct 16, 2020 2:42 am

Re: Face adjacency find out

Post by Jack Zheng »

Nice.
Thank You, Mike

Post Reply