From a8d87f2c1bf1823ed2db28972109396e595bbfaa Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 5 Mar 2008 14:46:04 +0000 Subject: [PATCH] PAL13464 : SMESH homogenize algorithm hypothesis LengthFromEdges is default hypothesis now --- src/StdMeshers/StdMeshers_MEFISTO_2D.cxx | 13 ++++++------- src/StdMeshers/StdMeshers_MEFISTO_2D.hxx | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx b/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx index 7b76b3545..6307f167e 100644 --- a/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx +++ b/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx @@ -113,6 +113,8 @@ bool StdMeshers_MEFISTO_2D::CheckHypothesis { _hypMaxElementArea = NULL; _hypLengthFromEdges = NULL; + _edgeLength = 0; + _maxElementArea = 0; list ::const_iterator itl; const SMESHDS_Hypothesis *theHyp; @@ -121,8 +123,8 @@ bool StdMeshers_MEFISTO_2D::CheckHypothesis int nbHyp = hyps.size(); if (!nbHyp) { - aStatus = SMESH_Hypothesis::HYP_MISSING; - return false; // can't work with no hypothesis + aStatus = SMESH_Hypothesis::HYP_OK; //SMESH_Hypothesis::HYP_MISSING; + return true; // (PAL13464) can work with no hypothesis, LengthFromEdges is default one } itl = hyps.begin(); @@ -137,7 +139,6 @@ bool StdMeshers_MEFISTO_2D::CheckHypothesis _hypMaxElementArea = static_cast(theHyp); ASSERT(_hypMaxElementArea); _maxElementArea = _hypMaxElementArea->GetMaxArea(); - _edgeLength = 0; isOk = true; aStatus = SMESH_Hypothesis::HYP_OK; } @@ -146,8 +147,6 @@ bool StdMeshers_MEFISTO_2D::CheckHypothesis { _hypLengthFromEdges = static_cast(theHyp); ASSERT(_hypLengthFromEdges); - _edgeLength = 0; - _maxElementArea = 0; isOk = true; aStatus = SMESH_Hypothesis::HYP_OK; } @@ -201,7 +200,7 @@ bool StdMeshers_MEFISTO_2D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh SMESH_Comment("Too few segments: ")<NbSegments()); // compute average edge length - if (_hypLengthFromEdges) + if (!_hypMaxElementArea) { _edgeLength = 0; int nbSegments = 0; @@ -215,7 +214,7 @@ bool StdMeshers_MEFISTO_2D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aSh _edgeLength /= nbSegments; } - if (_hypLengthFromEdges && _edgeLength < DBL_MIN ) + if (/*_hypLengthFromEdges &&*/ _edgeLength < DBL_MIN ) _edgeLength = 100; Z nblf; //nombre de lignes fermees (enveloppe en tete) diff --git a/src/StdMeshers/StdMeshers_MEFISTO_2D.hxx b/src/StdMeshers/StdMeshers_MEFISTO_2D.hxx index bc229bd2c..8ca0b72b8 100644 --- a/src/StdMeshers/StdMeshers_MEFISTO_2D.hxx +++ b/src/StdMeshers/StdMeshers_MEFISTO_2D.hxx @@ -83,7 +83,7 @@ protected: std::list myNodesOnCommonV; - SMESH_MesherHelper* myTool; // toll for working with quadratic elements + SMESH_MesherHelper* myTool; // tool for working with quadratic elements }; #endif -- 2.39.2