mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 18:30:35 +05:00
Porting to VTK-5.0.0
This commit is contained in:
parent
8de9daadc2
commit
af2e05780a
@ -410,13 +410,16 @@ SMESH_ActorDef::~SMESH_ActorDef()
|
|||||||
//---------------------------------------
|
//---------------------------------------
|
||||||
myPointsNumDataSet->Delete();
|
myPointsNumDataSet->Delete();
|
||||||
|
|
||||||
myPtsLabeledDataMapper->RemoveAllInputs();
|
// commented: porting to vtk 5.0
|
||||||
|
// myPtsLabeledDataMapper->RemoveAllInputs();
|
||||||
myPtsLabeledDataMapper->Delete();
|
myPtsLabeledDataMapper->Delete();
|
||||||
|
|
||||||
myPtsSelectVisiblePoints->UnRegisterAllOutputs();
|
// commented: porting to vtk 5.0
|
||||||
|
// myPtsSelectVisiblePoints->UnRegisterAllOutputs();
|
||||||
myPtsSelectVisiblePoints->Delete();
|
myPtsSelectVisiblePoints->Delete();
|
||||||
|
|
||||||
myPtsMaskPoints->UnRegisterAllOutputs();
|
// commented: porting to vtk 5.0
|
||||||
|
// myPtsMaskPoints->UnRegisterAllOutputs();
|
||||||
myPtsMaskPoints->Delete();
|
myPtsMaskPoints->Delete();
|
||||||
|
|
||||||
myPointLabels->Delete();
|
myPointLabels->Delete();
|
||||||
@ -429,13 +432,16 @@ SMESH_ActorDef::~SMESH_ActorDef()
|
|||||||
myClsLabeledDataMapper->RemoveAllInputs();
|
myClsLabeledDataMapper->RemoveAllInputs();
|
||||||
myClsLabeledDataMapper->Delete();
|
myClsLabeledDataMapper->Delete();
|
||||||
|
|
||||||
myClsSelectVisiblePoints->UnRegisterAllOutputs();
|
// commented: porting to vtk 5.0
|
||||||
|
// myClsSelectVisiblePoints->UnRegisterAllOutputs();
|
||||||
myClsSelectVisiblePoints->Delete();
|
myClsSelectVisiblePoints->Delete();
|
||||||
|
|
||||||
myClsMaskPoints->UnRegisterAllOutputs();
|
// commented: porting to vtk 5.0
|
||||||
|
// myClsMaskPoints->UnRegisterAllOutputs();
|
||||||
myClsMaskPoints->Delete();
|
myClsMaskPoints->Delete();
|
||||||
|
|
||||||
myCellCenters->UnRegisterAllOutputs();
|
// commented: porting to vtk 5.0
|
||||||
|
// myCellCenters->UnRegisterAllOutputs();
|
||||||
myCellCenters->Delete();
|
myCellCenters->Delete();
|
||||||
|
|
||||||
myCellsLabels->Delete();
|
myCellsLabels->Delete();
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
|
|
||||||
#include <VTKViewer_Transform.h>
|
#include <VTKViewer_Transform.h>
|
||||||
#include <VTKViewer_TransformFilter.h>
|
#include <VTKViewer_TransformFilter.h>
|
||||||
#include <VTKViewer_PassThroughFilter.h>
|
|
||||||
#include <VTKViewer_ExtractUnstructuredGrid.h>
|
#include <VTKViewer_ExtractUnstructuredGrid.h>
|
||||||
|
|
||||||
// VTK Includes
|
// VTK Includes
|
||||||
@ -60,6 +59,7 @@
|
|||||||
#include <vtkUnsignedCharArray.h>
|
#include <vtkUnsignedCharArray.h>
|
||||||
|
|
||||||
#include <vtkImplicitBoolean.h>
|
#include <vtkImplicitBoolean.h>
|
||||||
|
#include <vtkPassThroughFilter.h>
|
||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ SMESH_DeviceActor
|
|||||||
myTransformFilter = VTKViewer_TransformFilter::New();
|
myTransformFilter = VTKViewer_TransformFilter::New();
|
||||||
|
|
||||||
for(int i = 0; i < 6; i++)
|
for(int i = 0; i < 6; i++)
|
||||||
myPassFilter.push_back(VTKViewer_PassThroughFilter::New());
|
myPassFilter.push_back(vtkPassThroughFilter::New());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,10 +45,10 @@ class vtkUnstructuredGrid;
|
|||||||
class vtkScalarBarActor;
|
class vtkScalarBarActor;
|
||||||
class vtkLookupTable;
|
class vtkLookupTable;
|
||||||
class vtkImplicitBoolean;
|
class vtkImplicitBoolean;
|
||||||
|
class vtkPassThroughFilter;
|
||||||
|
|
||||||
class VTKViewer_Transform;
|
class VTKViewer_Transform;
|
||||||
class VTKViewer_TransformFilter;
|
class VTKViewer_TransformFilter;
|
||||||
class VTKViewer_PassThroughFilter;
|
|
||||||
class VTKViewer_ExtractUnstructuredGrid;
|
class VTKViewer_ExtractUnstructuredGrid;
|
||||||
|
|
||||||
class SMESH_ExtractGeometry;
|
class SMESH_ExtractGeometry;
|
||||||
@ -127,7 +127,7 @@ class SMESHOBJECT_EXPORT SMESH_DeviceActor: public vtkLODActor{
|
|||||||
bool myStoreClippingMapping;
|
bool myStoreClippingMapping;
|
||||||
VTKViewer_GeometryFilter *myGeomFilter;
|
VTKViewer_GeometryFilter *myGeomFilter;
|
||||||
VTKViewer_TransformFilter *myTransformFilter;
|
VTKViewer_TransformFilter *myTransformFilter;
|
||||||
std::vector<VTKViewer_PassThroughFilter*> myPassFilter;
|
std::vector<vtkPassThroughFilter*> myPassFilter;
|
||||||
|
|
||||||
vtkShrinkFilter* myShrinkFilter;
|
vtkShrinkFilter* myShrinkFilter;
|
||||||
bool myIsShrinkable;
|
bool myIsShrinkable;
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
#include <vtkObjectFactory.h>
|
#include <vtkObjectFactory.h>
|
||||||
#include <vtkPointData.h>
|
#include <vtkPointData.h>
|
||||||
#include <vtkUnstructuredGrid.h>
|
#include <vtkUnstructuredGrid.h>
|
||||||
|
#include <vtkInformation.h>
|
||||||
|
#include <vtkInformationVector.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -74,8 +76,21 @@ vtkIdType SMESH_ExtractGeometry::GetNodeObjId(int theVtkID){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SMESH_ExtractGeometry::Execute()
|
int SMESH_ExtractGeometry::RequestData(
|
||||||
|
vtkInformation *vtkNotUsed(request),
|
||||||
|
vtkInformationVector **inputVector,
|
||||||
|
vtkInformationVector *outputVector)
|
||||||
{
|
{
|
||||||
|
// get the info objects
|
||||||
|
vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
|
||||||
|
vtkInformation *outInfo = outputVector->GetInformationObject(0);
|
||||||
|
|
||||||
|
// get the input and ouptut
|
||||||
|
vtkDataSet *input = vtkDataSet::SafeDownCast(
|
||||||
|
inInfo->Get(vtkDataObject::DATA_OBJECT()));
|
||||||
|
vtkUnstructuredGrid *output = vtkUnstructuredGrid::SafeDownCast(
|
||||||
|
outInfo->Get(vtkDataObject::DATA_OBJECT()));
|
||||||
|
|
||||||
vtkIdType ptId, numPts, numCells, i, cellId, newCellId, newId, *pointMap;
|
vtkIdType ptId, numPts, numCells, i, cellId, newCellId, newId, *pointMap;
|
||||||
vtkIdList *cellPts;
|
vtkIdList *cellPts;
|
||||||
vtkCell *cell;
|
vtkCell *cell;
|
||||||
@ -84,10 +99,8 @@ void SMESH_ExtractGeometry::Execute()
|
|||||||
vtkFloatingPointType multiplier;
|
vtkFloatingPointType multiplier;
|
||||||
vtkPoints *newPts;
|
vtkPoints *newPts;
|
||||||
vtkIdList *newCellPts;
|
vtkIdList *newCellPts;
|
||||||
vtkDataSet *input = this->GetInput();
|
|
||||||
vtkPointData *pd = input->GetPointData();
|
vtkPointData *pd = input->GetPointData();
|
||||||
vtkCellData *cd = input->GetCellData();
|
vtkCellData *cd = input->GetCellData();
|
||||||
vtkUnstructuredGrid *output = this->GetOutput();
|
|
||||||
vtkPointData *outputPD = output->GetPointData();
|
vtkPointData *outputPD = output->GetPointData();
|
||||||
vtkCellData *outputCD = output->GetCellData();
|
vtkCellData *outputCD = output->GetCellData();
|
||||||
int npts;
|
int npts;
|
||||||
@ -99,7 +112,7 @@ void SMESH_ExtractGeometry::Execute()
|
|||||||
if ( ! this->ImplicitFunction )
|
if ( ! this->ImplicitFunction )
|
||||||
{
|
{
|
||||||
vtkErrorMacro(<<"No implicit function specified");
|
vtkErrorMacro(<<"No implicit function specified");
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
newCellPts = vtkIdList::New();
|
newCellPts = vtkIdList::New();
|
||||||
@ -251,4 +264,5 @@ void SMESH_ExtractGeometry::Execute()
|
|||||||
}
|
}
|
||||||
|
|
||||||
output->Squeeze();
|
output->Squeeze();
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,8 @@ protected:
|
|||||||
SMESH_ExtractGeometry();
|
SMESH_ExtractGeometry();
|
||||||
~SMESH_ExtractGeometry();
|
~SMESH_ExtractGeometry();
|
||||||
|
|
||||||
void Execute();
|
// Usual data generation method
|
||||||
|
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool myStoreMapping;
|
bool myStoreMapping;
|
||||||
|
@ -182,7 +182,8 @@ protected:
|
|||||||
myMapper->RemoveAllInputs();
|
myMapper->RemoveAllInputs();
|
||||||
myMapper->Delete();
|
myMapper->Delete();
|
||||||
|
|
||||||
myPlaneSource->UnRegisterAllOutputs();
|
// commented: porting to vtk 5.0
|
||||||
|
// myPlaneSource->UnRegisterAllOutputs();
|
||||||
myPlaneSource->Delete();
|
myPlaneSource->Delete();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user