From: apo Date: Fri, 29 Dec 2006 14:56:26 +0000 (+0000) Subject: To fix a regression with appling 'Geometry Sphere' primitive type X-Git-Tag: WP1_2_3_29-12-2006_MED_to_VTK_data_passing~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6ad34b6272289497bec892fab990d2c1da149016;p=modules%2Fvisu.git To fix a regression with appling 'Geometry Sphere' primitive type --- diff --git a/src/PIPELINE/VISU_GaussPointsPL.cxx b/src/PIPELINE/VISU_GaussPointsPL.cxx index 0b6985e5..f30f0553 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.cxx +++ b/src/PIPELINE/VISU_GaussPointsPL.cxx @@ -63,8 +63,6 @@ VISU_GaussPointsPL myGeomFilter = vtkGeometryFilter::New(); myWarpVector = vtkWarpVector::New(); - myCellDataToPointData = vtkCellDataToPointData::New(); - myCellDataToPointData->SetPassCellData(true); myGlyph = vtkGlyph3D::New(); myGlyph->SetScaleModeToScaleByScalar(); @@ -74,8 +72,6 @@ VISU_GaussPointsPL myExtractor->SetInput( myExtractGeometry->GetOutput() ); myFieldTransform->SetInput( myExtractor->GetOutput() ); - myCellDataToPointData->SetInput( myFieldTransform->GetUnstructuredGridOutput() ); - mySphereSource = vtkSphereSource::New(); mySphereSource->SetThetaResolution( 8 ); mySphereSource->SetPhiResolution( 8 ); @@ -83,6 +79,18 @@ VISU_GaussPointsPL for(int i = 0; i < 3; i++) myPassFilter.push_back(VTKViewer_PassThroughFilter::New()); + + // Deformed Shape + myPassFilter[0]->SetInput(myFieldTransform->GetUnstructuredGridOutput()); + + myPassFilter[1]->SetInput(myPassFilter[0]->GetOutput()); + + myGeomFilter->SetInput( myPassFilter[1]->GetOutput() ); + + // Geometrical Sphere + myPassFilter[2]->SetInput(myGeomFilter->GetOutput()); + + myPSMapper->SetInput( myPassFilter[2]->GetPolyDataOutput() ); } @@ -103,8 +111,6 @@ VISU_GaussPointsPL myWarpVector->Delete(); - myCellDataToPointData->Delete(); - myGlyph->Delete(); mySphereSource->Delete(); @@ -234,18 +240,6 @@ VISU_GaussPointsPL SetScale( aScaleFactor / aScalarRange[1] ); else SetScale(0.0); - - // Deformed Shape - myPassFilter[0]->SetInput(myFieldTransform->GetUnstructuredGridOutput()); - - myPassFilter[1]->SetInput(myPassFilter[0]->GetOutput()); - - myGeomFilter->SetInput( myPassFilter[1]->GetOutput() ); - - // Geometrical Sphere - myPassFilter[2]->SetInput(myGeomFilter->GetOutput()); - - myPSMapper->SetInput( myPassFilter[2]->GetPolyDataOutput() ); } //---------------------------------------------------------------------------- @@ -289,11 +283,6 @@ VISU_GaussPointsPL vtkDataSet* aDataSet = myGeomFilter->GetOutput(); unsigned long int aSize = aDataSet->GetActualMemorySize() * 1024; - if(myCellDataToPointData->GetInput()){ - aDataSet = myCellDataToPointData->GetOutput(); - aSize += aDataSet->GetActualMemorySize() * 1024; - } - if(GetIsDeformed()){ aDataSet = myWarpVector->GetOutput(); aSize += aDataSet->GetActualMemorySize() * 1024; @@ -413,8 +402,7 @@ VISU_GaussPointsPL if( theIsDeformed ) { - myCellDataToPointData->SetInput( myPassFilter[0]->GetUnstructuredGridOutput() ); - myWarpVector->SetInput( myCellDataToPointData->GetUnstructuredGridOutput() ); + myWarpVector->SetInput( myPassFilter[0]->GetUnstructuredGridOutput() ); myPassFilter[1]->SetInput(myWarpVector->GetOutput()); } else diff --git a/src/PIPELINE/VISU_GaussPointsPL.hxx b/src/PIPELINE/VISU_GaussPointsPL.hxx index a30f3866..158342d2 100644 --- a/src/PIPELINE/VISU_GaussPointsPL.hxx +++ b/src/PIPELINE/VISU_GaussPointsPL.hxx @@ -43,7 +43,6 @@ class vtkDataArray; class vtkImageData; class vtkPointSet; -class vtkCellDataToPointData; class vtkWarpVector; class SALOME_Transform; @@ -297,7 +296,6 @@ protected: bool myIsDeformed; vtkFloatingPointType myScaleFactor; vtkWarpVector *myWarpVector; - vtkCellDataToPointData* myCellDataToPointData; std::vector myPassFilter; vtkGlyph3D* myGlyph;