Salome HOME
0021472: EDF 2080 SMESH: Projection1D2D on a Voronoi structure fails
authoreap <eap@opencascade.com>
Wed, 18 Jan 2012 12:42:06 +0000 (12:42 +0000)
committereap <eap@opencascade.com>
Wed, 18 Jan 2012 12:42:06 +0000 (12:42 +0000)
  fix GetMediumPos() to return EDGE instead of FACE for 2 VERTEXes

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
     {