mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-25 01:32:04 +05:00
0021153: [CEA] non regression test fails
fix TooCloseAdjacent() w/o shape: correct distinction of domains
This commit is contained in:
parent
d8a28e48bb
commit
07112cd8f1
@ -114,12 +114,11 @@ namespace
|
|||||||
bool tooClose = ( angle < 15 * PI180 );
|
bool tooClose = ( angle < 15 * PI180 );
|
||||||
|
|
||||||
// Check if pyramids collide
|
// Check if pyramids collide
|
||||||
bool isOutI, isOutJ;
|
|
||||||
if ( !tooClose && baI * baJ > 0 )
|
if ( !tooClose && baI * baJ > 0 )
|
||||||
{
|
{
|
||||||
// find out if nI points outside of PrmI or inside
|
// find out if nI points outside of PrmI or inside
|
||||||
int dInd = baseNodesIndI[1] - baseNodesIndI[0];
|
int dInd = baseNodesIndI[1] - baseNodesIndI[0];
|
||||||
isOutI = ( abs(dInd)==1 ) ? dInd < 0 : dInd > 0;
|
bool isOutI = ( abs(dInd)==1 ) ? dInd < 0 : dInd > 0;
|
||||||
|
|
||||||
// find out sign of projection of nJ to baI
|
// find out sign of projection of nJ to baI
|
||||||
double proj = baI * nJ;
|
double proj = baI * nJ;
|
||||||
@ -133,12 +132,15 @@ namespace
|
|||||||
// check order of baseNodes within pyramids, it must be opposite
|
// check order of baseNodes within pyramids, it must be opposite
|
||||||
int dInd;
|
int dInd;
|
||||||
dInd = baseNodesIndI[1] - baseNodesIndI[0];
|
dInd = baseNodesIndI[1] - baseNodesIndI[0];
|
||||||
isOutI = ( abs(dInd)==1 ) ? dInd < 0 : dInd > 0;
|
bool isOutI = ( abs(dInd)==1 ) ? dInd < 0 : dInd > 0;
|
||||||
dInd = baseNodesIndJ[1] - baseNodesIndJ[0];
|
dInd = baseNodesIndJ[1] - baseNodesIndJ[0];
|
||||||
isOutJ = ( abs(dInd)==1 ) ? dInd < 0 : dInd > 0;
|
bool isOutJ = ( abs(dInd)==1 ) ? dInd < 0 : dInd > 0;
|
||||||
if ( isOutJ == isOutI )
|
if ( isOutJ == isOutI )
|
||||||
return false; // other domain
|
return false; // other domain
|
||||||
|
|
||||||
|
// direct both normals outside pyramid
|
||||||
|
( isOutI ? nJ : nI ).Reverse();
|
||||||
|
|
||||||
// check absence of a face separating domains between pyramids
|
// check absence of a face separating domains between pyramids
|
||||||
TIDSortedElemSet emptySet, avoidSet;
|
TIDSortedElemSet emptySet, avoidSet;
|
||||||
int i1, i2;
|
int i1, i2;
|
||||||
@ -153,6 +155,9 @@ namespace
|
|||||||
while ( otherNodeInd == i1 || otherNodeInd == i2 ) otherNodeInd++;
|
while ( otherNodeInd == i1 || otherNodeInd == i2 ) otherNodeInd++;
|
||||||
const SMDS_MeshNode* otherFaceNode = f->GetNode( otherNodeInd );
|
const SMDS_MeshNode* otherFaceNode = f->GetNode( otherNodeInd );
|
||||||
|
|
||||||
|
if ( otherFaceNode == nApexI || otherFaceNode == nApexJ )
|
||||||
|
continue; // f is a temporary triangle
|
||||||
|
|
||||||
// check if f is a base face of either of pyramids
|
// check if f is a base face of either of pyramids
|
||||||
if ( f->NbCornerNodes() == 4 &&
|
if ( f->NbCornerNodes() == 4 &&
|
||||||
( PrmI->GetNodeIndex( otherFaceNode ) >= 0 ||
|
( PrmI->GetNodeIndex( otherFaceNode ) >= 0 ||
|
||||||
@ -161,7 +166,6 @@ namespace
|
|||||||
|
|
||||||
// check projections of face direction (baOFN) to triange normals (nI and nJ)
|
// check projections of face direction (baOFN) to triange normals (nI and nJ)
|
||||||
gp_Vec baOFN( base1, SMESH_TNodeXYZ( otherFaceNode ));
|
gp_Vec baOFN( base1, SMESH_TNodeXYZ( otherFaceNode ));
|
||||||
( isOutI ? nJ : nI ).Reverse();
|
|
||||||
if ( nI * baOFN > 0 && nJ * baOFN > 0 )
|
if ( nI * baOFN > 0 && nJ * baOFN > 0 )
|
||||||
{
|
{
|
||||||
tooClose = false; // f is between pyramids
|
tooClose = false; // f is between pyramids
|
||||||
|
Loading…
x
Reference in New Issue
Block a user