]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug NPAL19815 : EDF 733 VISU : Sweep does not work on "ScalarmaponDeformed Shape...
authordmv <dmv@opencascade.com>
Mon, 26 May 2008 13:23:36 +0000 (13:23 +0000)
committerdmv <dmv@opencascade.com>
Mon, 26 May 2008 13:23:36 +0000 (13:23 +0000)
src/PIPELINE/VISU_DeformedGridPL.cxx
src/PIPELINE/VISU_DeformedGridPL.hxx
src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx
src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.hxx

index e9068b9a4a4b43531372c2ea362784ad46d6eafa..72f40c58585f42947d2082ee84311937178e5a82 100644 (file)
@@ -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];
index 840059a785e8a93e75efe9a11b18254402a8badf..4f3259492ed9abe51f191c9f7656406ea4b5ef48 100644 (file)
@@ -108,6 +108,7 @@ private:
   void operator=(const VISU_DeformedGridPL&);  // Not implemented.
 
   vtkFloatingPointType myScaleFactor;
+  vtkFloatingPointType myMapScaleFactor;
   vtkContourFilter* myContourFilter;
   vtkWarpScalar *myWarpScalar;
   bool myIsContour;
index 67e1b321906ced51337c62c1de5d96e37c864d29..208241137fbd18684f46a9716349e0a62eeffb80 100644 (file)
@@ -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);
 }
index e1041b46a09df6b03457e83404ef9a7e8484727e..6319c49ce49a7a952d841bfbf875ccbe46ee2612 100644 (file)
@@ -135,6 +135,7 @@ private:
   VISU_DeformedShapeAndScalarMapPL(const VISU_DeformedShapeAndScalarMapPL&);
 
   vtkFloatingPointType myScaleFactor;
+  vtkFloatingPointType myMapScaleFactor;
   vtkWarpVector  *myWarpVector;
   VISU_MergeFilter *myScalarsMergeFilter;
   vtkSmartPointer<vtkUnstructuredGrid> myScalars;