]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0019296: EDF 681 SMESH - Pre-evaluation of the number of elements before mesh
authoreap <eap@opencascade.com>
Wed, 27 Jan 2010 10:09:15 +0000 (10:09 +0000)
committereap <eap@opencascade.com>
Wed, 27 Jan 2010 10:09:15 +0000 (10:09 +0000)
  Assure that this submesh is evaluated once

src/SMESH/SMESH_subMesh.cxx

index 5fba40c2b71e4c6e13cd72538ec26dc7b6c643ca..7a2c07db4ed0ff7aa102235e974014bffef95c9f 100644 (file)
@@ -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<int>(0)));
+    }
   }
 
   return ret;