]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for issue 0019937: EDF 790 VISU : ScalarMapondeformed of ELNO field.
authorrnv <rnv@opencascade.com>
Tue, 15 Jul 2008 07:41:38 +0000 (07:41 +0000)
committerrnv <rnv@opencascade.com>
Tue, 15 Jul 2008 07:41:38 +0000 (07:41 +0000)
src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx
src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx

index 208241137fbd18684f46a9716349e0a62eeffb80..b807671eda7f6a6f3361e1e18dfe35eaa8158d19 100644 (file)
@@ -32,7 +32,7 @@
 #include "VTKViewer_TransformFilter.h"
 #include "VTKViewer_Transform.h"
 #include "VISU_MergeFilter.hxx"
-
+#include "VISU_ElnoDisassembleFilter.hxx"
 #include "VISU_PipeLineUtils.hxx"
 
 #include <vtkWarpVector.h>
@@ -68,6 +68,7 @@ VISU_DeformedShapeAndScalarMapPL
   myScalarsFieldTransform = VISU_FieldTransform::New();
 
   myCellDataToPointData = vtkCellDataToPointData::New();
+  myScalarsElnoDisassembleFilter = VISU_ElnoDisassembleFilter::New();
 }
 
 //----------------------------------------------------------------------------
@@ -201,9 +202,10 @@ VISU_DeformedShapeAndScalarMapPL
 ::UpdateScalars()
 {
   vtkDataSet* aScalars = GetScalars();
-  myScalarsExtractor->SetInput(aScalars);
+  myScalarsElnoDisassembleFilter->SetInput(aScalars);
+  myScalarsExtractor->SetInput(myScalarsElnoDisassembleFilter->GetOutput());
 
-  if(VISU::IsDataOnCells(aScalars))
+  if(VISU::IsDataOnCells(myScalarsElnoDisassembleFilter->GetOutput()))
     GetMapper()->SetScalarModeToUseCellData();
   else
     GetMapper()->SetScalarModeToUsePointData();
@@ -238,7 +240,7 @@ VISU_DeformedShapeAndScalarMapPL
 {
   if(GetScalars() == theScalars)
     return;
-
+  
   myScalars = theScalars;
   UpdateScalars();
 }
index 6319c49ce49a7a952d841bfbf875ccbe46ee2612..b3d454a201721bd8936d922738f1f051bf409ca5 100644 (file)
@@ -35,6 +35,7 @@ class vtkWarpVector;
 class vtkUnstructuredGrid;
 class vtkCellDataToPointData;
 class vtkPointDataToCellData;
+class VISU_ElnoDisassembleFilter;
 
 
 //----------------------------------------------------------------------------
@@ -142,6 +143,7 @@ private:
   vtkCellDataToPointData* myCellDataToPointData;
   VISU_FieldTransform* myScalarsFieldTransform;
   VISU_Extractor* myScalarsExtractor;
+  VISU_ElnoDisassembleFilter* myScalarsElnoDisassembleFilter;
 };
 
 #endif