Salome HOME
Merge branch 'V7_dev' of https://git.salome-platform.org/git/modules/smesh into V7_dev
[modules/smesh.git] / src / SMESH / SMESH_MesherHelper.cxx
index 3703a7215de3c4d0e89733d5da826d9c539f0615..3877d8a7bf9f90a51a631cabc7b59224616be80e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -2904,6 +2904,10 @@ 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)
+            if ( SMESHDS_SubMesh* sm = GetMeshDS()->MeshElements( E ))
+              if ( sm->NbElements() > 0 && !GetMeshDS()->FindEdge( nn[0], nn[1] ))
+                ok = false;
             if ( ok )
             {
               isReversed = ( u0 > u1 );