From cb542a7347c54bc9f4c97fa64a9fbc5db1337302 Mon Sep 17 00:00:00 2001 From: dmv Date: Mon, 26 May 2008 13:23:36 +0000 Subject: [PATCH] Bug NPAL19815 : EDF 733 VISU : Sweep does not work on "ScalarmaponDeformed Shape" and on "Deformed Shape" presentations. --- src/PIPELINE/VISU_DeformedGridPL.cxx | 7 +++++-- src/PIPELINE/VISU_DeformedGridPL.hxx | 1 + src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx | 8 +++++--- src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx | 1 + 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/PIPELINE/VISU_DeformedGridPL.cxx b/src/PIPELINE/VISU_DeformedGridPL.cxx index e9068b9a..72f40c58 100644 --- a/src/PIPELINE/VISU_DeformedGridPL.cxx +++ b/src/PIPELINE/VISU_DeformedGridPL.cxx @@ -46,7 +46,8 @@ VISU_DeformedGridPL myContourFilter(vtkContourFilter::New()), myWarpScalar(vtkWarpScalar::New()), myIsContour(false), - myScaleFactor(1.0) + myScaleFactor(1.0), + myMapScaleFactor(1.0) { SetIsShrinkable(false); SetNumberOfContours(32); @@ -180,8 +181,9 @@ VISU_DeformedGridPL { if ( VISU::CheckIsSameValue( myWarpScalar->GetScaleFactor(), theScaleFactor ) ) return; + myScaleFactor = theScaleFactor; - myWarpScalar->SetScaleFactor(theScaleFactor); + myWarpScalar->SetScaleFactor(theScaleFactor*myMapScaleFactor); } @@ -222,6 +224,7 @@ VISU_DeformedGridPL ::SetMapScale(vtkFloatingPointType theMapScale) { Superclass::SetMapScale(theMapScale); + myMapScaleFactor = theMapScale; if ( myIsContour ) { vtkFloatingPointType aSourceRange[2]; diff --git a/src/PIPELINE/VISU_DeformedGridPL.hxx b/src/PIPELINE/VISU_DeformedGridPL.hxx index 840059a7..4f325949 100644 --- a/src/PIPELINE/VISU_DeformedGridPL.hxx +++ b/src/PIPELINE/VISU_DeformedGridPL.hxx @@ -108,6 +108,7 @@ private: void operator=(const VISU_DeformedGridPL&); // Not implemented. vtkFloatingPointType myScaleFactor; + vtkFloatingPointType myMapScaleFactor; vtkContourFilter* myContourFilter; vtkWarpScalar *myWarpScalar; bool myIsContour; diff --git a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx index 67e1b321..20824113 100644 --- a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx +++ b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx @@ -55,7 +55,8 @@ vtkStandardNewMacro(VISU_DeformedShapeAndScalarMapPL) */ VISU_DeformedShapeAndScalarMapPL ::VISU_DeformedShapeAndScalarMapPL(): - myScaleFactor(0.0) + myScaleFactor(1.0), + myMapScaleFactor(1.0) { myWarpVector = vtkWarpVector::New(); @@ -264,8 +265,8 @@ VISU_DeformedShapeAndScalarMapPL if(VISU::CheckIsSameValue(myScaleFactor, theScale)) return; - myWarpVector->SetScaleFactor(theScale); myScaleFactor = theScale; + myWarpVector->SetScaleFactor(theScale*myMapScaleFactor); } //---------------------------------------------------------------------------- @@ -276,7 +277,7 @@ vtkFloatingPointType VISU_DeformedShapeAndScalarMapPL ::GetScale() { - return myWarpVector->GetScaleFactor(); + return myScaleFactor; } //---------------------------------------------------------------------------- @@ -287,6 +288,7 @@ void VISU_DeformedShapeAndScalarMapPL ::SetMapScale(vtkFloatingPointType theMapScale) { + myMapScaleFactor = theMapScale; Superclass::SetMapScale(theMapScale); myWarpVector->SetScaleFactor(myScaleFactor*theMapScale); } diff --git a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx index e1041b46..6319c49c 100644 --- a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx +++ b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx @@ -135,6 +135,7 @@ private: VISU_DeformedShapeAndScalarMapPL(const VISU_DeformedShapeAndScalarMapPL&); vtkFloatingPointType myScaleFactor; + vtkFloatingPointType myMapScaleFactor; vtkWarpVector *myWarpVector; VISU_MergeFilter *myScalarsMergeFilter; vtkSmartPointer myScalars; -- 2.39.2