X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH%2FSMESH_MesherHelper.cxx;h=e9e9f58b62b6a572fbe351c7693e6f1828c0e235;hp=b9a0e942d0e97d5461a9bded7557d43e803ea694;hb=766145cb04300b6ea67d075737a2c4d474db2ef5;hpb=1a1b88b9cf10382f90a5e34f4ca8777b8b8550d8 diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index b9a0e942d..e9e9f58b6 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -2944,12 +2944,16 @@ bool SMESH_MesherHelper::IsReversedSubMesh (const TopoDS_Face& theFace) bool ok = true; double u0 = GetNodeU( TopoDS::Edge( E ), nn[0], nn[1], &ok ); double u1 = GetNodeU( TopoDS::Edge( E ), nn[1], nn[0], &ok ); - // check that the 2 nodes are connected with a segment (IPAL53055) - const SMDS_MeshElement* seg; - if ( SMESHDS_SubMesh* sm = GetMeshDS()->MeshElements( E )) - if (( sm->NbElements() > 0 ) && - ( seg = GetMeshDS()->FindEdge( nn[0], nn[1] ))) - ok = sm->Contains( seg ); + if ( ok ) + { + // check that the 2 nodes are connected with a segment (IPAL53055) + ok = false; + const SMDS_MeshElement* seg; + if ( SMESHDS_SubMesh* sm = GetMeshDS()->MeshElements( E )) + if (( sm->NbElements() > 0 ) && + ( seg = GetMeshDS()->FindEdge( nn[0], nn[1] ))) + ok = sm->Contains( seg ); + } if ( ok ) { isReversed = ( u0 > u1 );