mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
Regression SALOME_TESTS/Grids/smesh/3D_mesh_NETGEN_02/C7
Box with composite sides is acceptable
This commit is contained in:
parent
076deefb2b
commit
38ef3e316c
@ -752,16 +752,12 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper
|
|||||||
|
|
||||||
bool StdMeshers_Hexa_3D::IsApplicable( const TopoDS_Shape & aShape, bool toCheckAll )
|
bool StdMeshers_Hexa_3D::IsApplicable( const TopoDS_Shape & aShape, bool toCheckAll )
|
||||||
{
|
{
|
||||||
TopoDS_Vertex theVertex0, theVertex1;
|
|
||||||
TopTools_IndexedMapOfOrientedShape theShapeIDMap;
|
|
||||||
bool isCurShellApp;
|
|
||||||
int nbFoundShells = 0;
|
|
||||||
TopExp_Explorer exp0( aShape, TopAbs_SOLID );
|
TopExp_Explorer exp0( aShape, TopAbs_SOLID );
|
||||||
if ( !exp0.More() ) return false;
|
if ( !exp0.More() ) return false;
|
||||||
|
|
||||||
for ( ; exp0.More(); exp0.Next() )
|
for ( ; exp0.More(); exp0.Next() )
|
||||||
{
|
{
|
||||||
nbFoundShells = 0;
|
int nbFoundShells = 0;
|
||||||
isCurShellApp = false;
|
|
||||||
TopExp_Explorer exp1( exp0.Current(), TopAbs_SHELL );
|
TopExp_Explorer exp1( exp0.Current(), TopAbs_SHELL );
|
||||||
for ( ; exp1.More(); exp1.Next(), ++nbFoundShells)
|
for ( ; exp1.More(); exp1.Next(), ++nbFoundShells)
|
||||||
if ( nbFoundShells == 2 ) break;
|
if ( nbFoundShells == 2 ) break;
|
||||||
@ -769,11 +765,11 @@ bool StdMeshers_Hexa_3D::IsApplicable( const TopoDS_Shape & aShape, bool toCheck
|
|||||||
if ( toCheckAll ) return false;
|
if ( toCheckAll ) return false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
exp1.Init( exp0.Current(), TopAbs_SHELL );
|
exp1.Init( exp0.Current(), TopAbs_FACE );
|
||||||
const TopoDS_Shell& shell = TopoDS::Shell(exp1.Current());
|
int nbEdges = SMESH_MesherHelper::Count( exp1.Current(), TopAbs_EDGE, /*ignoreSame=*/true );
|
||||||
isCurShellApp = SMESH_Block::FindBlockShapes(shell, theVertex0, theVertex1, theShapeIDMap );
|
bool ok = ( nbEdges > 3 );
|
||||||
if ( toCheckAll && !isCurShellApp ) return false;
|
if ( toCheckAll && !ok ) return false;
|
||||||
if ( !toCheckAll && isCurShellApp ) return true;
|
if ( !toCheckAll && ok ) return true;
|
||||||
}
|
}
|
||||||
return toCheckAll;
|
return toCheckAll;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user