Salome HOME
To provide a way to customize VISU::ScalarMap_i::Build method
[modules/visu.git] / src / VISU_I / VISU_ScalarMap_i.cc
index b943952ee2396b5a6df340ae307f091d80f53b81..c78a08305cecc0369fad3419c6f9d22fbf82600a 100644 (file)
@@ -464,6 +464,21 @@ VISU::Storable* VISU::ScalarMap_i::Build(int theRestoring){
 }
 
 
+void VISU::ScalarMap_i::DoSetInput(Result_i* theResult){
+  if(theResult->GetInput() == NULL)
+    throw std::runtime_error("Mesh_i::Build - theResult->GetInput() == NULL !!!");
+  myField = theResult->GetInput()->GetField(myMeshName,myEntity,myFieldName);
+  if(myField == NULL) 
+    throw std::runtime_error("There is no Field with the parameters !!!");
+  VISU_Convertor::TOutput *anOutput =
+    theResult->GetInput()->GetTimeStampOnMesh(myMeshName,myEntity,myFieldName,myIteration);
+  if(anOutput == NULL) 
+    throw std::runtime_error("There is no TimeStamp with the parameters !!!");
+  myScalarMapPL->SetInput(anOutput);
+  myScalarMapPL->Build();
+}
+
+
 void VISU::ScalarMap_i::DoHook(){
   if(MYDEBUG)  MESSAGE("ScalarMap_i::DoHook() - "<<myPipeLine);
   if(!myPipeLine) {