]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for Bug IPAL11536:
authorenk <enk@opencascade.com>
Tue, 7 Feb 2006 12:13:08 +0000 (12:13 +0000)
committerenk <enk@opencascade.com>
Tue, 7 Feb 2006 12:13:08 +0000 (12:13 +0000)
About creation Scalar Map on Deformed shape

src/VISU_I/VISU_Gen_i.cc
src/VISU_I/VISU_Gen_i.hh
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc

index bf51d9b34e449fb8c4741f20949d88aa9af68e45..ff03f9f2b308cc3d799fbdef92e285ac6e3f781b 100644 (file)
@@ -42,6 +42,7 @@
 #include "VISU_Plot3D_i.hh"
 #include "VISU_Table_i.hh"
 #include "VISU_TimeAnimation.h"
+#include "VISU_ScalarMapOnDeformedShape_i.hh"
 
 #include "VISU_Actor.h"
 
@@ -200,6 +201,7 @@ namespace VISU
     Storable::Registry(Table_i::myComment.c_str(),&(Table_i::Restore));
     Storable::Registry(Curve_i::myComment.c_str(),&(Curve_i::Restore));
     Storable::Registry(Container_i::myComment.c_str(),&(Container_i::Restore));
+    Storable::Registry(ScalarMapOnDeformedShape_i::myComment.c_str(),&(Restore<ScalarMapOnDeformedShape_i>));
   }
 
 
@@ -668,6 +670,15 @@ namespace VISU
     return Prs3dOnField<VISU::DeformedShape_i>(theResult,theMeshName,theEntity,theFieldName,theIteration)._retn();
   }
 
+  ScalarMapOnDeformedShape_ptr VISU_Gen_i::ScalarMapOnDeformedShapeOnField(Result_ptr theResult,
+                                                                          const char* theMeshName,
+                                                                          VISU::Entity theEntity,
+                                                                          const char* theFieldName,
+                                                                          CORBA::Double theIteration)
+  {
+    return Prs3dOnField<VISU::ScalarMapOnDeformedShape_i>(theResult,theMeshName,theEntity,theFieldName,theIteration)._retn();
+  }
+  
   Vectors_ptr VISU_Gen_i::VectorsOnField(Result_ptr theResult,
                                         const char* theMeshName,
                                         VISU::Entity theEntity,
index d1ab542439b44692d4c010201fe7bffe3d85db4b..1f4f921268ae509bbeb556e10bd70889a75a516a 100644 (file)
@@ -178,6 +178,13 @@ namespace VISU
                         CORBA::Double theIteration);
 
     virtual
+    ScalarMapOnDeformedShape_ptr
+    ScalarMapOnDeformedShapeOnField(Result_ptr theResult,
+                                   const char* theMeshName, 
+                                   VISU::Entity theEntity,
+                                   const char* theFieldName, 
+                                   CORBA::Double theIteration);
+    virtual
     Vectors_ptr
     VectorsOnField(Result_ptr theResult,
                   const char* theMeshName, 
index 3246f8f2997de4061a96aaa81cec0540b35bba70..9b8868e34f352262ec469a5c9453892e8edd94bb 100644 (file)
@@ -53,6 +53,9 @@ int VISU::ScalarMapOnDeformedShape_i::IsPossible(Result_i* theResult, const char
   try{
     aResult = VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theIteration,false);
     if(isMemoryCheck && aResult){
+      const VISU::PField aField = theResult->GetInput()->GetField(theMeshName,(VISU::TEntity)theEntity,theFieldName);
+      if(aField->myNbComp <= 1)
+       return false;
       float aSize = INCMEMORY*
        theResult->GetInput()->GetTimeStampSize(theMeshName,(VISU::TEntity)theEntity,theFieldName,theIteration);
       aResult = VISU_PipeLine::CheckAvailableMemory(aSize);