Salome HOME
Issue 0019818: EDF 703 SMESH VISU : Display Mesh Groups names in viewer (as a caption)
[modules/visu.git] / src / PIPELINE / VISU_Plot3DPL.cxx
index 7696d62e5d5453ae344ec30efd6e543808ef9011..8c3d9aeac9cfb9693c3e56e537d53b88805d3f4a 100644 (file)
@@ -1,6 +1,6 @@
-//  VISU OBJECT : interactive object for VISU entities implementation
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
 //  This library is free software; you can redistribute it and/or
 //  License along with this library; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+//  VISU OBJECT : interactive object for VISU entities implementation
 // File:    VISU_PipeLine.cxx
 // Author:  Alexey PETROV
 // Module : VISU
-
-
+//
 #include "VISU_Plot3DPL.hxx"
 #include "VISU_CutPlanesPL.hxx"
 #include "VISU_PipeLineUtils.hxx"
@@ -56,9 +55,11 @@ VISU_Plot3DPL
   myIsRelative(true),
   myIsContour(false),
   myPosition(0.5),
-  myScaleFactor(1.0)
+  myScaleFactor(1.0),
+  myMapScaleFactor(1.0)
 {
   SetIsShrinkable(false);
+  SetIsFeatureEdgesAllowed(false);
 
   myCellDataToPointData->Delete();
   myAppendPolyData->Delete();
@@ -151,13 +152,14 @@ VISU_Plot3DPL
 //----------------------------------------------------------------------------
 vtkFloatingPointType
 VISU_Plot3DPL
-::GetScaleFactor(vtkDataSet* theDataSet)
+::GetScaleFactor( VISU_ColoredPL* theColoredPL,
+                 vtkDataSet* theDataSet )
 {
   theDataSet->Update();
   vtkFloatingPointType aLength = theDataSet->GetLength(); // diagonal length
 
   vtkFloatingPointType aScalarRange[2];
-  GetSourceRange(aScalarRange);
+  theColoredPL->GetSourceRange(aScalarRange);
 
   static vtkFloatingPointType EPS = 0.3;
   vtkFloatingPointType aRange = aScalarRange[1];
@@ -176,7 +178,7 @@ VISU_Plot3DPL
   Superclass::Init();
 
   myOrientation = GetOrientation(GetMergedInput());
-  SetScaleFactor(GetScaleFactor(GetMergedInput()));
+  SetScaleFactor( GetScaleFactor( this, GetMergedInput() ) );
 }
 
 
@@ -314,7 +316,7 @@ VISU_Plot3DPL
 ::SetScaleFactor(vtkFloatingPointType theScaleFactor)
 {
   myScaleFactor = theScaleFactor;
-  myWarpScalar->SetScaleFactor(theScaleFactor);
+  myWarpScalar->SetScaleFactor(theScaleFactor*myMapScaleFactor);
 }
 
 
@@ -523,6 +525,7 @@ void
 VISU_Plot3DPL
 ::SetMapScale(vtkFloatingPointType theMapScale)
 {
+  myMapScaleFactor = theMapScale;
   Superclass::SetMapScale(theMapScale);
 
   if ( myIsContour ) {