X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH%2FSMESH_MesherHelper.cxx;h=d6cd15d3ef8b4402873367a33b9d233304055947;hp=390278faaa18f6717b8668e5d3fd45013ea5f5b2;hb=f0f37f1fc7fbd05cd41cb532bb297897dcfc1725;hpb=e63b88c7f344d9a9a6b398b25305c8c610dfcdf0 diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index 390278faa..d6cd15d3e 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -4646,6 +4646,7 @@ namespace { // Structures used by FixQuadraticElements() const SMDS_MeshElement* f = faceIt->next(); if ( !faceSM->Contains( f ) || f->NbNodes() < 6 || // check quadratic triangles only + f->NbNodes() > 7 || !checkedFaces.insert( f ).second ) continue; @@ -4857,7 +4858,12 @@ namespace { // Structures used by FixQuadraticElements() gp_Pnt pMedium = SMESH_TNodeXYZ( linkIt->second ); double hMedium = faceNorm * gp_Vec( pOnFace0, pMedium ).XYZ(); double hVol = faceNorm * gp_Vec( pOnFace0, pInSolid ).XYZ(); - isDistorted = ( Abs( hMedium ) > Abs( hVol * 0.75 )); + if ( Abs( hMedium ) > Abs( hVol * 0.75 )) + { + SMESH_TNodeXYZ pI( nOnFace[i]), pJ( nOnFace[j]); + double angle = gp_Vec( pI, pMedium ).Angle( gp_Vec( pI, pJ )); + isDistorted = ( angle > M_PI / 20 ); + } } } }