Salome HOME
0021480: EDF 2084 SMESH: SIGSEGV when validating Netgen3D hypothesis
[modules/smesh.git] / src / SMESH / SMESH_MesherHelper.cxx
index 43943b31f33446c25f41b0c67effbf594d11ab41..47854cf6e64c877a8bccfdd608a60e3c6d03fdd8 100644 (file)
@@ -948,8 +948,8 @@ std::pair<int, TopAbs_ShapeEnum> SMESH_MesherHelper::GetMediumPos(const SMDS_Mes
     {
       TopoDS_Shape V1 = GetSubShapeByNode( n1, GetMeshDS() );
       TopoDS_Shape V2 = GetSubShapeByNode( n2, GetMeshDS() );
-      shape = GetCommonAncestor( V1, V2, *myMesh, TopAbs_FACE );
-      if ( shape.IsNull() ) shape = GetCommonAncestor( V1, V2, *myMesh, TopAbs_EDGE );
+      shape = GetCommonAncestor( V1, V2, *myMesh, TopAbs_EDGE );
+      if ( shape.IsNull() ) shape = GetCommonAncestor( V1, V2, *myMesh, TopAbs_FACE );
     }
     else // VERTEX and EDGE
     {