From 8726d7811f554b1e3f2b5dbf7e4b0db0c745fefa Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 27 Jan 2010 10:09:15 +0000 Subject: [PATCH] 0019296: EDF 681 SMESH - Pre-evaluation of the number of elements before mesh Assure that this submesh is evaluated once --- src/SMESH/SMESH_subMesh.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 5fba40c2b..7a2c07db4 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -1613,11 +1613,13 @@ bool SMESH_subMesh::Evaluate(MapShapeNbElems& aResMap) ret = algo->CheckHypothesis((*_father), _subShape, hyp_status); if (!ret) return false; - TopoDS_Shape shape = _subShape; - - _computeError = SMESH_ComputeError::New(COMPERR_OK,"",algo); + if ( !aResMap.count(this) ) + { + _computeError = SMESH_ComputeError::New(COMPERR_OK,"",algo); + ret = algo->Evaluate((*_father), _subShape, aResMap); - ret = algo->Evaluate((*_father), shape, aResMap); + aResMap.insert( make_pair( this,vector(0))); + } } return ret; -- 2.39.2