Determine which BrepFace is on the left side of the BrepEdge


#1

Hi all

I have one issue. I have ON_Brep object and I need to determine which face is on left side and which face is on right side of each BrepEdge (exept boundary edges) according to edge direction.

I tried in this way:
int loopIndex1 = Brep->m_T[Brep->m_E[edgeIndex].m_ti[0]].m_li;
int loopIndex2 = Brep->m_T[Brep->m_E[edgeIndex].m_ti[1]].m_li;
int rightFaceIndex = Brep->m_L[loopIndex1].m_fi;
int leftFaceIndex = Brep->m_L[loopIndex2].m_fi;

But it gives me bad results.


(Dale Fugier) #4

Hi Biljana,

The left side will have Trim.m_bRev == Face.m_bFlip. The right side has them not equal.

This is assuming that the face normals are consistent across the edge when taking m_bFlip into consideration.

Does this help?

– Dale


#5

Yes. It helps.
Thank you very mach Dale