mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-12 00:29:17 +05:00
Merge branch 'master' into V7_5_BR
This commit is contained in:
commit
5f4aaf693b
@ -2575,7 +2575,7 @@ bool SMESH_MesherHelper::IsDistorted2D( SMESH_subMesh* faceSM,
|
|||||||
if ( !smDS || smDS->NbElements() == 0 ) return false;
|
if ( !smDS || smDS->NbElements() == 0 ) return false;
|
||||||
|
|
||||||
SMDS_ElemIteratorPtr faceIt = smDS->GetElements();
|
SMDS_ElemIteratorPtr faceIt = smDS->GetElements();
|
||||||
double prevArea2D = 0;
|
double prevArea = 0;
|
||||||
vector< const SMDS_MeshNode* > nodes;
|
vector< const SMDS_MeshNode* > nodes;
|
||||||
vector< gp_XY > uv;
|
vector< gp_XY > uv;
|
||||||
bool* toCheckUV = checkUV ? & checkUV : 0;
|
bool* toCheckUV = checkUV ? & checkUV : 0;
|
||||||
@ -2613,15 +2613,15 @@ bool SMESH_MesherHelper::IsDistorted2D( SMESH_subMesh* faceSM,
|
|||||||
uv[ i ] = helper.GetNodeUV( F, nodes[ i ], inFaceNode, toCheckUV );
|
uv[ i ] = helper.GetNodeUV( F, nodes[ i ], inFaceNode, toCheckUV );
|
||||||
|
|
||||||
// compare orientation of triangles
|
// compare orientation of triangles
|
||||||
|
double faceArea = 0;
|
||||||
for ( int iT = 0, nbT = nodes.size()-2; iT < nbT; ++iT )
|
for ( int iT = 0, nbT = nodes.size()-2; iT < nbT; ++iT )
|
||||||
{
|
{
|
||||||
gp_XY v1 = uv[ iT+1 ] - uv[ 0 ];
|
gp_XY v1 = uv[ iT+1 ] - uv[ 0 ];
|
||||||
gp_XY v2 = uv[ iT+2 ] - uv[ 0 ];
|
gp_XY v2 = uv[ iT+2 ] - uv[ 0 ];
|
||||||
double area2D = v2 ^ v1;
|
faceArea += v2 ^ v1;
|
||||||
if (( haveBadFaces = ( area2D * prevArea2D < 0 )))
|
|
||||||
break;
|
|
||||||
prevArea2D = area2D;
|
|
||||||
}
|
}
|
||||||
|
haveBadFaces = ( faceArea * prevArea < 0 );
|
||||||
|
prevArea = faceArea;
|
||||||
}
|
}
|
||||||
|
|
||||||
return haveBadFaces;
|
return haveBadFaces;
|
||||||
|
@ -732,7 +732,7 @@ namespace {
|
|||||||
(( uv - uvBis ).SquareModulus() < tol2d ))
|
(( uv - uvBis ).SquareModulus() < tol2d ))
|
||||||
++nbOkPos;
|
++nbOkPos;
|
||||||
else
|
else
|
||||||
nbOkPos = 0;
|
nbOkPos = -((int) src2tgtNodes.size() );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SMDS_TOP_EDGE:
|
case SMDS_TOP_EDGE:
|
||||||
|
Loading…
Reference in New Issue
Block a user