mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 13:30:33 +05:00
22516: [CEA 1075] Quadrangle mapping produces a bad mesh without raising error
For a case of a FACE with only concave corners.
This commit is contained in:
parent
b56d0083b9
commit
f90e1ea49e
@ -3971,7 +3971,7 @@ bool StdMeshers_Quadrangle_2D::check()
|
|||||||
|
|
||||||
// find a right angle VERTEX
|
// find a right angle VERTEX
|
||||||
int iVertex;
|
int iVertex;
|
||||||
double maxAngle = 0;
|
double maxAngle = -1e100;
|
||||||
for ( int i = 0; i < wire->NbEdges(); ++i )
|
for ( int i = 0; i < wire->NbEdges(); ++i )
|
||||||
{
|
{
|
||||||
int iPrev = myHelper->WrapIndex( i-1, wire->NbEdges() );
|
int iPrev = myHelper->WrapIndex( i-1, wire->NbEdges() );
|
||||||
@ -3984,7 +3984,7 @@ bool StdMeshers_Quadrangle_2D::check()
|
|||||||
iVertex = i;
|
iVertex = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( maxAngle == 0 ) return isOK;
|
if ( maxAngle < -2*M_PI ) return isOK;
|
||||||
|
|
||||||
// get a sign of 2D area of a corner face
|
// get a sign of 2D area of a corner face
|
||||||
|
|
||||||
@ -4010,6 +4010,9 @@ bool StdMeshers_Quadrangle_2D::check()
|
|||||||
}
|
}
|
||||||
|
|
||||||
okSign = v2 ^ v1;
|
okSign = v2 ^ v1;
|
||||||
|
|
||||||
|
if ( maxAngle < 0 )
|
||||||
|
okSign *= -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Look for incorrectly oriented faces
|
// Look for incorrectly oriented faces
|
||||||
|
Loading…
Reference in New Issue
Block a user