]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Merge from V5_1_5_BR 23/11/2010 V5_1_main_20101125 V5_1_main_20101126 V5_1_main_20101129 V5_1_main_20101130 V5_1_main_20101201 before_mergefrom_V5_1_5_BR_26Nov10 mergefrom_V5_1_5_BR_23Nov10 mergefrom_V5_1_5_BR_26Nov10 mergeto_V6_main_24Nov10 mergeto_V6_main_26Nov10
authorvsr <vsr@opencascade.com>
Tue, 23 Nov 2010 16:51:21 +0000 (16:51 +0000)
committervsr <vsr@opencascade.com>
Tue, 23 Nov 2010 16:51:21 +0000 (16:51 +0000)
src/PIPELINE/VISU_ColoredPL.cxx
src/PIPELINE/VISU_ColoredPL.hxx
src/VISUGUI/VISU_msg_en.ts
src/VISUGUI/VISU_msg_fr.ts
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_TimeAnimation.cxx
src/VISU_I/VISU_ColoredPrs3dCache_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.cc
src/VISU_I/VISU_ColoredPrs3d_i.hh

index a14d401efd47dc69b0f82453107b6758d4363546..ec81c1fd5248cc0621b1acdbf27b347de0ca9eaa 100644 (file)
@@ -517,3 +517,12 @@ VISU_ColoredPL
   GetSourceRange( aRange );
   SetScalarRange( aRange );
 }
+
+//----------------------------------------------------------------------------
+void
+VISU_ColoredPL
+::UpdateMapperLookupTable()
+{
+  //rnv: This method update pointer to the myMapperTable in the MapperHolder
+  GetMapperHolder()->SetLookupTable(GetMapperTable());
+}
index e577196912cbcf327ba87469e2a2ff6f85d10a59..a43c157e3d1c5ae7095594e937c81e0170aa0dd0 100644 (file)
@@ -141,6 +141,11 @@ public:
   void
   SetSourceRange();
 
+  virtual
+  void
+  UpdateMapperLookupTable();
+  
+
 protected:
   //----------------------------------------------------------------------------
   VISU_ColoredPL();
index 61b0e2e2d817461c41f3baa371bb872cc1c1c183..b67b34b77f178f8229577cb041d0a1b52f62d85d 100644 (file)
@@ -612,6 +612,10 @@ Input value precision can be adjusted using
         <source>WRN_NO_APPROPRIATE_SELECTION</source>
         <translation>No appropriate objects selected</translation>
     </message>
+    <message>
+        <source>VISU_PLUGINS_OTHER</source>
+        <translation>VISU plugins</translation>
+    </message>  
 </context>
 <context>
     <name>VisuGUI</name>
index 30953b5cec650f8c789627b003a27e37d8a82357..6f07d2eb86872f73ba1331b7d4c0120f1e05c598 100755 (executable)
@@ -611,6 +611,10 @@ le &apos;%1&apos; paramètre des préférences du module Post-Pro.</translation>
         <source>WRN_NO_APPROPRIATE_SELECTION</source>
         <translation>Les objets appropriés ne sont pas choisis</translation>
     </message>
+    <message>
+        <source>VISU_PLUGINS_OTHER</source>
+        <translation>Extensions VISU</translation>
+    </message>   
 </context>
 <context>
     <name>VisuGUI</name>
index fd8d1557d9d4cbb5764bfd9d6c239c0eb3f3f0b8..3b23f2c80c46c6c7b7a51297dec22c198c37b4b3 100644 (file)
 //  File   : VisuGUI.cxx
 //  Author :
 //  Module : VISU
-//
+
+#include <Standard_math.hxx>  // E.A. must be included before Python.h to fix compilation on windows
+#include "Python.h"
+
 #include "VisuGUI.h"
 
 // STL Includes
@@ -3657,6 +3660,21 @@ VisuGUI
   setMenuShown( true );
   setToolShown( true );
 
+  // import Python module that manages VISU plugins (need to be here because SalomePyQt API uses active module)
+  PyGILState_STATE gstate = PyGILState_Ensure();
+  PyObject* pluginsmanager=PyImport_ImportModule((char*)"salome_pluginsmanager");
+  if(pluginsmanager==NULL)
+    PyErr_Print();
+  else
+    {
+      PyObject* result=PyObject_CallMethod( pluginsmanager, (char*)"initialize", (char*)"isss",1,"visu",tr("MEN_VISUALIZATION").toStdString().c_str(),tr("VISU_PLUGINS_OTHER").toStdString().c_str());
+      if(result==NULL)
+        PyErr_Print();
+      Py_XDECREF(result);
+    }
+  PyGILState_Release(gstate);
+  // end of GEOM plugins loading
+
   // Reset actions accelerator keys
   QList<QKeySequence> shortcuts;
   shortcuts.append( QKeySequence(Qt::CTRL + Qt::Key_I) );
index 30c672db292c9107a1ec2a7f4c535eae76522a74..bfbcfc7ae00eebc1d4e3012cc3b639736c0c5147 100644 (file)
@@ -1150,6 +1150,13 @@ namespace
       for (long aFrameId = 1; aFrameId < theData.myNbFrames; aFrameId++){
         VISU::ColoredPrs3d_i* aColoredPrs3d = theData.myPrs[aFrameId];
         aColoredPrs3d->SameAs(aPrs3d);
+       // rnv: fix for the 20870: EDF 1410 VISU: Anomaly in the Gauss point representation.
+       // special case for the "Gauss Points" presentation,
+       // update the LookupTable in the mapper, after assign properties of the presentation
+       // using SameAs(...) method.
+       if(theData.myPrsType == VISU::TGAUSSPOINTS) {
+         aColoredPrs3d->UpdateMapperLookupTable();
+       }
       }
 
       if ( theAnimator->getAnimationMode() == VISU::Animation::SUCCESSIVE ) {
@@ -1158,7 +1165,15 @@ namespace
           for (long aFrameId = 0; aFrameId < aFieldData.myNbFrames; aFrameId++) {
             VISU::ColoredPrs3d_i* aColoredPrs3d = aFieldData.myPrs[aFrameId];
             std::string aTitle = aColoredPrs3d->GetCTitle();
-            aColoredPrs3d->SameAs(aPrs3d);
+            aColoredPrs3d->SameAs(aPrs3d);         
+           // rnv: fix for the 20870: EDF 1410 VISU: Anomaly in the Gauss point representation.
+           // special case for the "Gauss Points" presentation,
+           // update the LookupTable in the mapper, after assign properties of the presentation
+           // using SameAs(...) method.
+           if(theData.myPrsType == VISU::TGAUSSPOINTS) {
+             aColoredPrs3d->UpdateMapperLookupTable();
+           }
+
             aColoredPrs3d->SetTitle(aTitle.c_str());
           }
         }
index 82ae9dfd28b4193c0195e70e2f73affacd220d11..532e18dd27314fcc9e14a8f73d2e87f0697b1723 100644 (file)
@@ -673,6 +673,15 @@ VISU::ColoredPrs3dCache_i
     
     aPrs3d->SameAs(thePrs);
     
+    // rnv: fix for the 20870: EDF 1410 VISU: Anomaly in the Gauss point representation.
+    // special case for the "Gauss Points" presentation,
+    // update the LookupTable in the mapper, after assign properties of the presentation
+    // using SameAs(...) method.
+    VISU::GaussPoints_i* gPoints  = dynamic_cast<VISU::GaussPoints_i*>( aPrs3d.get() );
+    if(gPoints) {
+      gPoints->UpdateMapperLookupTable();
+    }
+    
     // special case for deformed shape
     VISU::DeformedShapeAndScalarMap_i* dShape =
       dynamic_cast<VISU::DeformedShapeAndScalarMap_i*>( aPrs3d.get() );
index cbf800a33dc7cda558ba61677ba4a273c8f50107..3b32d82ea9282acd2ade293504bb1012a511af0e 100644 (file)
@@ -2158,3 +2158,12 @@ VISU::ColoredPrs3d_i
 
 //----------------------------------------------------------------------------
 
+void
+VISU::ColoredPrs3d_i
+::UpdateMapperLookupTable()
+{
+  ProcessVoidEvent(new TVoidMemFunEvent<VISU_ColoredPL>
+    (GetSpecificPL(), &VISU_ColoredPL::UpdateMapperLookupTable));
+}
+
+//----------------------------------------------------------------------------^
index ae796d2fc755ca5c6ef97f64313321383aca3428..dbae3b8b915f7652c3aae474ad67a1a143b25b0b 100644 (file)
@@ -628,6 +628,11 @@ namespace VISU
     SetValLblFontColor( const vtkFloatingPointType theR, 
                        const vtkFloatingPointType theG, 
                        const vtkFloatingPointType theB );
+
+    virtual
+    void
+    UpdateMapperLookupTable();
+
     
     //----------------------------------------------------------------------------
   protected: