]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
PostPro 2005, T1.5: 2D fields displayed in 3D. Fix surface prs for field on cells...
authoreap <eap@opencascade.com>
Fri, 6 May 2005 14:13:47 +0000 (14:13 +0000)
committereap <eap@opencascade.com>
Fri, 6 May 2005 14:13:47 +0000 (14:13 +0000)
src/PIPELINE/VISU_Plot3DPL.cxx

index 69e0fb487cbdef936f775af1b6f76772321e6935..996147e847a8a073ff5fafaccf5a8ffc7510116b 100644 (file)
@@ -177,7 +177,12 @@ Update()
   }
   if ( !myIsContour ) // surface prs
   {
-    myWarpScalar->SetInput(aPolyData);
+    if(aPolyData->GetCellData()->GetNumberOfArrays()) {
+      myCellDataToPointData->SetInput(aPolyData);
+      myCellDataToPointData->PassCellDataOn();
+      myWarpScalar->SetInput(myCellDataToPointData->GetPolyDataOutput());
+    }else
+      myWarpScalar->SetInput(aPolyData);
   }
   else // contour prs
   {
@@ -376,6 +381,13 @@ void VISU_Plot3DPL::SetMapScale(float theMapScale)
 {
   VISU_ScalarMapPL::SetMapScale(theMapScale);
 
+  if ( myIsContour ) {
+    float aRange[2];
+    GetSourceRange(aRange);
+    float aNewRange[] = { aRange[1] - theMapScale*(aRange[1]-aRange[0]), aRange[1] };
+    myContourFilter->GenerateValues(GetNumberOfContours(),aNewRange);
+  }
   myWarpScalar->SetScaleFactor(myScaleFactor*theMapScale);
+
   Modified();
 }