From: eap Date: Wed, 28 Feb 2007 10:12:57 +0000 (+0000) Subject: PAL13460 (force the mesh to go through a point) X-Git-Tag: V3_2_6a1~30 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ced60b03e180d7b46ae3e6f724eddf442aae7d0a;p=modules%2Fsmesh.git PAL13460 (force the mesh to go through a point) check shape topology in CheckHypothesis() --- 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"); - - bool isOk = true; - aStatus = SMESH_Hypothesis::HYP_OK; - - // nothing to check - - return isOk; + // 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; + + aStatus = SMESH_Hypothesis::HYP_OK; + return true; } //=======================================================================