diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.cxx b/src/StdMeshers/StdMeshers_Hexa_3D.cxx index cbbc017cc..21490011b 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.cxx @@ -47,15 +47,15 @@ #include #include #include -#include +//#include #include #include #include -#include -#include -#include -#include +// #include +// #include +// #include +// #include #include #include "utilities.h" @@ -115,18 +115,19 @@ bool StdMeshers_Hexa_3D::ClearAndReturn(FaceQuadStruct* theQuads[6], const bool //============================================================================= bool StdMeshers_Hexa_3D::CheckHypothesis - (SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape, + (SMESH_Mesh& aMesh, + const TopoDS_Shape& aShape, SMESH_Hypothesis::Hypothesis_Status& aStatus) { - //MESSAGE("StdMeshers_Hexa_3D::CheckHypothesis"); + // check nb of faces in the shape + aStatus = SMESH_Hypothesis::HYP_BAD_GEOMETRY; + int nbFaces = 0; + for (TopExp_Explorer exp(aShape, TopAbs_FACE); exp.More(); exp.Next()) + if ( ++nbFaces > 6 ) + return false; - bool isOk = true; - aStatus = SMESH_Hypothesis::HYP_OK; - - // nothing to check - - return isOk; + aStatus = SMESH_Hypothesis::HYP_OK; + return true; } //=======================================================================