From 6905d8308768c9eff58c373f5d4efdd9532dea51 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 6 May 2005 14:13:47 +0000 Subject: [PATCH] PostPro 2005, T1.5: 2D fields displayed in 3D. Fix surface prs for field on cells. Fix sweep for contour prs. --- src/PIPELINE/VISU_Plot3DPL.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/PIPELINE/VISU_Plot3DPL.cxx b/src/PIPELINE/VISU_Plot3DPL.cxx index 69e0fb48..996147e8 100644 --- a/src/PIPELINE/VISU_Plot3DPL.cxx +++ b/src/PIPELINE/VISU_Plot3DPL.cxx @@ -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(); } -- 2.39.2