From: rnv Date: Tue, 15 Jul 2008 07:41:38 +0000 (+0000) Subject: Fix for issue 0019937: EDF 790 VISU : ScalarMapondeformed of ELNO field. X-Git-Tag: V4_1_0_maintainance_20080716~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=92697527b30bb98b23cbfdb5efd16fd1f5140ec4;p=modules%2Fvisu.git Fix for issue 0019937: EDF 790 VISU : ScalarMapondeformed of ELNO field. --- diff --git a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx index 20824113..b807671e 100644 --- a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx +++ b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx @@ -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 @@ -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(); } diff --git a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx index 6319c49c..b3d454a2 100644 --- a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx +++ b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx @@ -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