From: eap Date: Fri, 14 Mar 2014 10:26:49 +0000 (+0400) Subject: Regression SALOME_TESTS/Grids/smesh/3D_mesh_NETGEN_02/C7 X-Git-Tag: V7_4_0a1~34 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=38ef3e316cd161424fb1156df3c223ad9de29780;p=modules%2Fsmesh.git Regression SALOME_TESTS/Grids/smesh/3D_mesh_NETGEN_02/C7 Box with composite sides is acceptable --- diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.cxx b/src/StdMeshers/StdMeshers_Hexa_3D.cxx index d63ed2641..0271fc41c 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.cxx @@ -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 ) { - TopoDS_Vertex theVertex0, theVertex1; - TopTools_IndexedMapOfOrientedShape theShapeIDMap; - bool isCurShellApp; - int nbFoundShells = 0; TopExp_Explorer exp0( aShape, TopAbs_SOLID ); if ( !exp0.More() ) return false; + for ( ; exp0.More(); exp0.Next() ) { - nbFoundShells = 0; - isCurShellApp = false; + int nbFoundShells = 0; TopExp_Explorer exp1( exp0.Current(), TopAbs_SHELL ); for ( ; exp1.More(); exp1.Next(), ++nbFoundShells) if ( nbFoundShells == 2 ) break; @@ -769,11 +765,11 @@ bool StdMeshers_Hexa_3D::IsApplicable( const TopoDS_Shape & aShape, bool toCheck if ( toCheckAll ) return false; continue; } - exp1.Init( exp0.Current(), TopAbs_SHELL ); - const TopoDS_Shell& shell = TopoDS::Shell(exp1.Current()); - isCurShellApp = SMESH_Block::FindBlockShapes(shell, theVertex0, theVertex1, theShapeIDMap ); - if ( toCheckAll && !isCurShellApp ) return false; - if ( !toCheckAll && isCurShellApp ) return true; + exp1.Init( exp0.Current(), TopAbs_FACE ); + int nbEdges = SMESH_MesherHelper::Count( exp1.Current(), TopAbs_EDGE, /*ignoreSame=*/true ); + bool ok = ( nbEdges > 3 ); + if ( toCheckAll && !ok ) return false; + if ( !toCheckAll && ok ) return true; } return toCheckAll; };