X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_MesherHelper.cxx;h=316bcea6291e41a45c3577966e31417912df9202;hb=09020c020647728650fabae698538a869c93f4e3;hp=65a19e286c96bad7e4e20d3433964b09c56187f9;hpb=a77a5a1a512915273cc59fa5032abd5a91e0a48b;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 65a19e286..316bcea62 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -2489,9 +2489,16 @@ bool SMESH_MesherHelper::IsReversedSubMesh (const TopoDS_Face& theFace) { SMESH_TNodeXYZ nPnt[3]; SMDS_ElemIteratorPtr nodesIt = elem->nodesIterator(); + int iNodeOnFace = 0, iPosDim = SMDS_TOP_VERTEX; for ( int iN = 0; nodesIt->more() && iN < 3; ++iN) // loop on nodes + { nPnt[ iN ] = nodesIt->next(); - + if ( nPnt[ iN ]._node->GetPosition()->GetTypeOfPosition() > iPosDim ) + { + iNodeOnFace = iN; + iPosDim = nPnt[ iN ]._node->GetPosition()->GetTypeOfPosition(); + } + } // compute normal gp_Vec v01( nPnt[0], nPnt[1] ), v02( nPnt[0], nPnt[2] ); if ( v01.SquareMagnitude() > RealSmall() && @@ -2499,7 +2506,7 @@ bool SMESH_MesherHelper::IsReversedSubMesh (const TopoDS_Face& theFace) { Ne = v01 ^ v02; if (( normalOK = ( Ne.SquareMagnitude() > RealSmall() ))) - uv = GetNodeUV( theFace, nPnt[0]._node, nPnt[2]._node, &normalOK ); + uv = GetNodeUV( theFace, nPnt[iNodeOnFace]._node, 0, &normalOK ); } } }