Salome HOME
Regression SALOME_TESTS/Grids/smesh/3D_mesh_HEXA3D_00/C2
authoreap <eap@opencascade.com>
Mon, 18 Nov 2013 14:55:27 +0000 (14:55 +0000)
committereap <eap@opencascade.com>
Mon, 18 Nov 2013 14:55:27 +0000 (14:55 +0000)
Fix GetAngle() to take Orientation() of input edges as is and not
using GetSubShapeOri() which is wrong for the seam edge

src/SMESH/SMESH_MesherHelper.cxx

index 2e8d707ae62d70117ed4dd7a349f174069859ce6..75cbbeeff5212c2ebd165d969b110af172a742c5 100644 (file)
@@ -2666,6 +2666,8 @@ double SMESH_MesherHelper::MaxTolerance( const TopoDS_Shape& shape )
  *        of the FACE normal
  *  \return double - the angle (between -Pi and Pi), negative if the angle is concave,
  *                   1e100 in case of failure
  *        of the FACE normal
  *  \return double - the angle (between -Pi and Pi), negative if the angle is concave,
  *                   1e100 in case of failure
+ *  \waring Care about order of the EDGEs and their orientation to be as they are
+ *          within the FACE!
  */
 //================================================================================
 
  */
 //================================================================================
 
@@ -2699,9 +2701,9 @@ double SMESH_MesherHelper::GetAngle( const TopoDS_Edge & theE1,
     TopoDS_Face F = theFace;
     if ( F.Orientation() == TopAbs_INTERNAL )
       F.Orientation( TopAbs_FORWARD );
     TopoDS_Face F = theFace;
     if ( F.Orientation() == TopAbs_INTERNAL )
       F.Orientation( TopAbs_FORWARD );
-    if ( GetSubShapeOri( F, theE1 ) == TopAbs_REVERSED )
+    if ( theE1.Orientation() /*GetSubShapeOri( F, theE1 )*/ == TopAbs_REVERSED )
       vec1.Reverse();
       vec1.Reverse();
-    if ( GetSubShapeOri( F, theE2 ) == TopAbs_REVERSED )
+    if ( theE2.Orientation() /*GetSubShapeOri( F, theE2 )*/ == TopAbs_REVERSED )
       vec2.Reverse();
     angle = vec1.AngleWithRef( vec2, vecRef );
   }
       vec2.Reverse();
     angle = vec1.AngleWithRef( vec2, vecRef );
   }