From: eap Date: Fri, 6 May 2005 14:13:47 +0000 (+0000) Subject: PostPro 2005, T1.5: 2D fields displayed in 3D. Fix surface prs for field on cells... X-Git-Tag: V2_2_0_VISU_improvement_2005-05-27~32 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6905d8308768c9eff58c373f5d4efdd9532dea51;p=modules%2Fvisu.git PostPro 2005, T1.5: 2D fields displayed in 3D. Fix surface prs for field on cells. Fix sweep for contour prs. --- 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(); }