From ced60b03e180d7b46ae3e6f724eddf442aae7d0a Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 28 Feb 2007 10:12:57 +0000 Subject: [PATCH] PAL13460 (force the mesh to go through a point) check shape topology in CheckHypothesis() --- src/StdMeshers/StdMeshers_Hexa_3D.cxx | 31 ++++++++++++++------------- 1 file changed, 16 insertions(+), 15 deletions(-) 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; } //======================================================================= -- 2.39.2