diff --git a/AMR/vtkAMRCutPlane.cxx b/AMR/vtkAMRCutPlane.cxx index b211ff9f70e75ab729894d7a8ddcb2260d613161..c66206a4139913f8b3e48401cec6b61f0802a771 100644 --- a/AMR/vtkAMRCutPlane.cxx +++ b/AMR/vtkAMRCutPlane.cxx @@ -30,7 +30,6 @@ #include "vtkLocator.h" #include "vtkPointLocator.h" #include "vtkPolyData.h" -#include "vtkContourValues.h" #include "vtkIdList.h" #include "vtkDoubleArray.h" #include "vtkPointData.h" @@ -42,6 +41,7 @@ #include <cassert> #include <algorithm> +using std::endl; vtkStandardNewMacro(vtkAMRCutPlane); @@ -60,21 +60,12 @@ vtkAMRCutPlane::vtkAMRCutPlane() this->Controller = vtkMultiProcessController::GetGlobalController(); this->Plane = NULL; this->UseNativeCutter = 1; - this->contourValues = vtkContourValues::New(); } //------------------------------------------------------------------------------ vtkAMRCutPlane::~vtkAMRCutPlane() { - this->blocksToLoad.clear(); - - if( this->contourValues != NULL ) - { - this->contourValues->Delete(); - } - this->contourValues = NULL; - if( this->Plane != NULL ) { this->Plane->Delete(); @@ -87,23 +78,23 @@ void vtkAMRCutPlane::PrintSelf( std::ostream &oss, vtkIndent indent ) { this->Superclass::PrintSelf( oss, indent ); oss << indent << "LevelOfResolution: " - << this->LevelOfResolution << std::endl; + << this->LevelOfResolution << endl; oss << indent << "UseNativeCutter: " - << this->UseNativeCutter << std::endl; + << this->UseNativeCutter << endl; oss << indent << "Controller: " - << this->Controller << std::endl; + << this->Controller << endl; oss << indent << "Center: "; for( int i=0; i < 3; ++i ) { oss << this->Center[i ] << " "; } - oss << std::endl; + oss << endl; oss << indent << "Normal: "; for( int i=0; i < 3; ++i ) { oss << this->Normal[i] << " "; } - oss << std::endl; + oss << endl; } //------------------------------------------------------------------------------ @@ -224,7 +215,15 @@ int vtkAMRCutPlane::RequestData( } else { - this->CutAMRBlock( grid, mbds ); + if( grid != NULL ) + { + this->CutAMRBlock( grid, mbds ); + } + else + { + mbds->SetBlock(blockIdx,NULL); + ++blockIdx; + } } } // END for all data } // END for all levels diff --git a/AMR/vtkAMRCutPlane.h b/AMR/vtkAMRCutPlane.h index 85105ead8dfcfc8d06895288b75c32ce0345e0f8..d1edd645c2e6bef4dbc244ff8361cda14a71c4ee 100644 --- a/AMR/vtkAMRCutPlane.h +++ b/AMR/vtkAMRCutPlane.h @@ -143,7 +143,6 @@ class VTK_AMR_EXPORT vtkAMRCutPlane : public vtkMultiBlockDataSetAlgorithm bool UseNativeCutter; vtkMultiProcessController *Controller; vtkPlane *Plane; - vtkContourValues *contourValues; // BTX std::vector<int> blocksToLoad;