Hello
I need a way to check if two faces IBRepFace_DG are adjacent. What is the way to do it?
Thanks in advance.
Face adjacency
-
- Posts: 1
- Joined: Fri Oct 11, 2024 12:51 am
Re: Face adjacency
Adjacent faces share an edge, so IBRepEdge_DG.GetOtherFace() should be the key here.
Suppose you have faceThis and faceOther. Use faceThis.GetEdges(). Then for every edge call
Suppose you have faceThis and faceOther. Use faceThis.GetEdges(). Then for every edge call
Code: Select all
IBRepFace_DG faceOther = edge.GetOtherFace(faceThis);
IBRepShape_DG shThis = faceThis.As<IBRepShape_DG>();
IBRepShape_DG shOther = faceOther.As<IBRepShape_DG>();
if(shOther.IsEqual(shThis))
adjacent = true;