From: eap Date: Wed, 27 Jan 2010 10:09:15 +0000 (+0000) Subject: 0019296: EDF 681 SMESH - Pre-evaluation of the number of elements before mesh X-Git-Tag: PARAVIS_29012010~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8726d7811f554b1e3f2b5dbf7e4b0db0c745fefa;p=modules%2Fsmesh.git 0019296: EDF 681 SMESH - Pre-evaluation of the number of elements before mesh Assure that this submesh is evaluated once --- 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;