Porting to VTK 6.

First compilable version of GEOM and SMESH modules.
This commit is contained in:
ouv 2013-01-30 11:10:42 +00:00
parent 577999dffd
commit 6868039740
19 changed files with 74 additions and 65 deletions

View File

@ -1281,7 +1281,7 @@ vtkUnstructuredGrid* SMESH_ActorDef::GetUnstructuredGrid(){
bool SMESH_ActorDef::IsInfinitive(){ bool SMESH_ActorDef::IsInfinitive(){
vtkDataSet *aDataSet = myPickableActor->GetUnstructuredGrid(); vtkDataSet *aDataSet = myPickableActor->GetUnstructuredGrid();
aDataSet->Update(); //aDataSet->Update(); // OUV_PORTING_VTK6: seems to be useless
myIsInfinite = aDataSet->GetNumberOfCells() == 0 || myIsInfinite = aDataSet->GetNumberOfCells() == 0 ||
( aDataSet->GetNumberOfCells() == 1 && ( aDataSet->GetNumberOfCells() == 1 &&
aDataSet->GetCell(0)->GetCellType() == VTK_VERTEX ); aDataSet->GetCell(0)->GetCellType() == VTK_VERTEX );

View File

@ -90,7 +90,7 @@ namespace SMESH
{ {
vtkXMLUnstructuredGridWriter* aWriter = vtkXMLUnstructuredGridWriter::New(); vtkXMLUnstructuredGridWriter* aWriter = vtkXMLUnstructuredGridWriter::New();
aWriter->SetFileName(theFileName); aWriter->SetFileName(theFileName);
aWriter->SetInput(theGrid); aWriter->SetInputData(theGrid);
aWriter->SetDataModeToAscii(); aWriter->SetDataModeToAscii();
if(theGrid->GetNumberOfCells()){ if(theGrid->GetNumberOfCells()){
aWriter->Write(); aWriter->Write();

View File

@ -52,19 +52,19 @@ SMESH_CellLabelActor::SMESH_CellLabelActor() {
myCellsNumDataSet = vtkUnstructuredGrid::New(); myCellsNumDataSet = vtkUnstructuredGrid::New();
myCellCenters = VTKViewer_CellCenters::New(); myCellCenters = VTKViewer_CellCenters::New();
myCellCenters->SetInput(myCellsNumDataSet); myCellCenters->SetInputData(myCellsNumDataSet);
myClsMaskPoints = vtkMaskPoints::New(); myClsMaskPoints = vtkMaskPoints::New();
myClsMaskPoints->SetInput(myCellCenters->GetOutput()); myClsMaskPoints->SetInputConnection(myCellCenters->GetOutputPort());
myClsMaskPoints->SetOnRatio(1); myClsMaskPoints->SetOnRatio(1);
myClsSelectVisiblePoints = vtkSelectVisiblePoints::New(); myClsSelectVisiblePoints = vtkSelectVisiblePoints::New();
myClsSelectVisiblePoints->SetInput(myClsMaskPoints->GetOutput()); myClsSelectVisiblePoints->SetInputConnection(myClsMaskPoints->GetOutputPort());
myClsSelectVisiblePoints->SelectInvisibleOff(); myClsSelectVisiblePoints->SelectInvisibleOff();
myClsSelectVisiblePoints->SetTolerance(0.1); myClsSelectVisiblePoints->SetTolerance(0.1);
myClsLabeledDataMapper = vtkLabeledDataMapper::New(); myClsLabeledDataMapper = vtkLabeledDataMapper::New();
myClsLabeledDataMapper->SetInput(myClsSelectVisiblePoints->GetOutput()); myClsLabeledDataMapper->SetInputConnection(myClsSelectVisiblePoints->GetOutputPort());
myClsLabeledDataMapper->SetLabelFormat("%d"); myClsLabeledDataMapper->SetLabelFormat("%d");
myClsLabeledDataMapper->SetLabelModeToLabelScalars(); myClsLabeledDataMapper->SetLabelModeToLabelScalars();
@ -156,7 +156,7 @@ void SMESH_CellLabelActor::SetCellsLabeled(bool theIsCellsLabeled) {
anArray->SetValue(anId,aSMDSId); anArray->SetValue(anId,aSMDSId);
} }
aDataSet->GetCellData()->SetScalars(anArray); aDataSet->GetCellData()->SetScalars(anArray);
myCellCenters->SetInput(aDataSet); myCellCenters->SetInputData(aDataSet);
myCellsLabels->SetVisibility(GetVisibility()); myCellsLabels->SetVisibility(GetVisibility());
}else{ }else{
myCellsLabels->SetVisibility(false); myCellsLabels->SetVisibility(false);

View File

@ -125,7 +125,7 @@ SMESH_DeviceActor
myFaceOrientationFilter = SMESH_FaceOrientationFilter::New(); myFaceOrientationFilter = SMESH_FaceOrientationFilter::New();
myFaceOrientationDataMapper = vtkPolyDataMapper::New(); myFaceOrientationDataMapper = vtkPolyDataMapper::New();
myFaceOrientationDataMapper->SetInput(myFaceOrientationFilter->GetOutput()); myFaceOrientationDataMapper->SetInputConnection(myFaceOrientationFilter->GetOutputPort());
myFaceOrientation = vtkActor::New(); myFaceOrientation = vtkActor::New();
myFaceOrientation->SetMapper(myFaceOrientationDataMapper); myFaceOrientation->SetMapper(myFaceOrientationDataMapper);
@ -208,9 +208,9 @@ SMESH_DeviceActor
{ {
int anId = 0; int anId = 0;
if(theIsImplicitFunctionUsed) if(theIsImplicitFunctionUsed)
myPassFilter[ anId ]->SetInput( myExtractGeometry->GetOutput() ); myPassFilter[ anId ]->SetInputConnection( myExtractGeometry->GetOutputPort() );
else else
myPassFilter[ anId ]->SetInput( myMergeFilter->GetOutput() ); myPassFilter[ anId ]->SetInputConnection( myMergeFilter->GetOutputPort() );
myIsImplicitFunctionUsed = theIsImplicitFunctionUsed; myIsImplicitFunctionUsed = theIsImplicitFunctionUsed;
SetStoreClippingMapping(myStoreClippingMapping); SetStoreClippingMapping(myStoreClippingMapping);
@ -225,32 +225,33 @@ SMESH_DeviceActor
//myIsShrinkable = theGrid->GetNumberOfCells() > 10; //myIsShrinkable = theGrid->GetNumberOfCells() > 10;
myIsShrinkable = true; myIsShrinkable = true;
myExtractUnstructuredGrid->SetInput(theGrid); myExtractUnstructuredGrid->SetInputData(theGrid);
myMergeFilter->SetGeometry(myExtractUnstructuredGrid->GetOutput()); myMergeFilter->SetGeometryConnection(myExtractUnstructuredGrid->GetOutputPort());
myExtractGeometry->SetInput(myMergeFilter->GetOutput()); myExtractGeometry->SetInputConnection(myMergeFilter->GetOutputPort());
int anId = 0; int anId = 0;
SetImplicitFunctionUsed(myIsImplicitFunctionUsed); SetImplicitFunctionUsed(myIsImplicitFunctionUsed);
myPassFilter[ anId + 1]->SetInput( myPassFilter[ anId ]->GetOutput() ); myPassFilter[ anId + 1]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 1 anId++; // 1
myTransformFilter->SetInput( myPassFilter[ anId ]->GetOutput() ); myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 2 anId++; // 2
myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() ); myPassFilter[ anId ]->SetInputConnection( myTransformFilter->GetOutputPort() );
myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() ); myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 3 anId++; // 3
myGeomFilter->SetInput( myPassFilter[ anId ]->GetOutput() ); myGeomFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 4 anId++; // 4
myPassFilter[ anId ]->SetInput( myGeomFilter->GetOutput() ); myPassFilter[ anId ]->SetInputConnection( myGeomFilter->GetOutputPort() );
myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() ); myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 5 anId++; // 5
myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() ); // OUV_PORTING_VTK6: to check
myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
vtkLODActor::SetMapper( myMapper ); vtkLODActor::SetMapper( myMapper );
Modified(); Modified();
@ -322,7 +323,7 @@ SMESH_DeviceActor
theLookupTable->SetNumberOfTableValues(theScalarBarActor->GetMaximumNumberOfColors()); theLookupTable->SetNumberOfTableValues(theScalarBarActor->GetMaximumNumberOfColors());
theLookupTable->Build(); theLookupTable->Build();
myMergeFilter->SetScalars(aDataSet); myMergeFilter->SetScalarsData(aDataSet);
aDataSet->Delete(); aDataSet->Delete();
} }
GetMapper()->SetScalarVisibility(anIsInitialized); GetMapper()->SetScalarVisibility(anIsInitialized);
@ -402,7 +403,7 @@ SMESH_DeviceActor
theLookupTable->SetRange(aScalars->GetRange()); theLookupTable->SetRange(aScalars->GetRange());
theLookupTable->Build(); theLookupTable->Build();
myMergeFilter->SetScalars(aDataSet); myMergeFilter->SetScalarsData(aDataSet);
aDataSet->Delete(); aDataSet->Delete();
} }
else if (MultiConnection2D* aMultiConnection2D = dynamic_cast<MultiConnection2D*>(theFunctor.get())){ else if (MultiConnection2D* aMultiConnection2D = dynamic_cast<MultiConnection2D*>(theFunctor.get())){
@ -462,7 +463,7 @@ SMESH_DeviceActor
theLookupTable->SetRange(aScalars->GetRange()); theLookupTable->SetRange(aScalars->GetRange());
theLookupTable->Build(); theLookupTable->Build();
myMergeFilter->SetScalars(aDataSet); myMergeFilter->SetScalarsData(aDataSet);
aDataSet->Delete(); aDataSet->Delete();
} }
} }
@ -600,10 +601,10 @@ SMESH_DeviceActor
::SetShrink() ::SetShrink()
{ {
if ( !myIsShrinkable ) return; if ( !myIsShrinkable ) return;
if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() ) if ( vtkAlgorithmOutput* aDataSet = myPassFilter[ 0 ]->GetOutputPort() )
{ {
myShrinkFilter->SetInput( aDataSet ); myShrinkFilter->SetInputConnection( aDataSet );
myPassFilter[ 1 ]->SetInput( myShrinkFilter->GetOutput() ); myPassFilter[ 1 ]->SetInputConnection( myShrinkFilter->GetOutputPort() );
myIsShrunk = true; myIsShrunk = true;
} }
} }
@ -613,9 +614,9 @@ SMESH_DeviceActor
::UnShrink() ::UnShrink()
{ {
if ( !myIsShrunk ) return; if ( !myIsShrunk ) return;
if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() ) if ( vtkAlgorithmOutput* aDataSet = myPassFilter[ 0 ]->GetOutputPort() )
{ {
myPassFilter[ 1 ]->SetInput( aDataSet ); myPassFilter[ 1 ]->SetInputConnection( aDataSet );
myPassFilter[ 1 ]->Modified(); myPassFilter[ 1 ]->Modified();
myIsShrunk = false; myIsShrunk = false;
Modified(); Modified();
@ -627,11 +628,11 @@ void
SMESH_DeviceActor SMESH_DeviceActor
::SetFacesOriented(bool theIsFacesOriented) ::SetFacesOriented(bool theIsFacesOriented)
{ {
if ( vtkDataSet* aDataSet = myTransformFilter->GetOutput() ) if ( vtkAlgorithmOutput* aDataSet = myTransformFilter->GetOutputPort() )
{ {
myIsFacesOriented = theIsFacesOriented; myIsFacesOriented = theIsFacesOriented;
if( theIsFacesOriented ) if( theIsFacesOriented )
myFaceOrientationFilter->SetInput( aDataSet ); myFaceOrientationFilter->SetInputConnection( aDataSet );
UpdateFaceOrientation(); UpdateFaceOrientation();
} }
} }

View File

@ -61,10 +61,10 @@ SMESH_FaceOrientationFilter::SMESH_FaceOrientationFilter()
myFacePolyData = vtkPolyData::New(); myFacePolyData = vtkPolyData::New();
myFaceCenters = VTKViewer_CellCenters::New(); myFaceCenters = VTKViewer_CellCenters::New();
myFaceCenters->SetInput(myFacePolyData); myFaceCenters->SetInputData(myFacePolyData);
myFaceMaskPoints = vtkMaskPoints::New(); myFaceMaskPoints = vtkMaskPoints::New();
myFaceMaskPoints->SetInput(myFaceCenters->GetOutput()); myFaceMaskPoints->SetInputConnection(myFaceCenters->GetOutputPort());
myFaceMaskPoints->SetOnRatio(1); myFaceMaskPoints->SetOnRatio(1);
myGlyphSource = vtkGlyphSource2D::New(); myGlyphSource = vtkGlyphSource2D::New();
@ -73,11 +73,14 @@ SMESH_FaceOrientationFilter::SMESH_FaceOrientationFilter()
myGlyphSource->SetCenter(0.5, 0.0, 0.0); myGlyphSource->SetCenter(0.5, 0.0, 0.0);
myBaseGlyph = vtkGlyph3D::New(); myBaseGlyph = vtkGlyph3D::New();
myBaseGlyph->SetInput(myFaceMaskPoints->GetOutput()); myBaseGlyph->SetInputConnection(myFaceMaskPoints->GetOutputPort());
myBaseGlyph->SetVectorModeToUseVector(); myBaseGlyph->SetVectorModeToUseVector();
myBaseGlyph->SetScaleModeToDataScalingOff(); myBaseGlyph->SetScaleModeToDataScalingOff();
myBaseGlyph->SetColorModeToColorByScalar(); myBaseGlyph->SetColorModeToColorByScalar();
myBaseGlyph->SetSource(my3dVectors ? myArrowPolyData : myGlyphSource->GetOutput()); if( my3dVectors )
myBaseGlyph->SetSourceData(myArrowPolyData);
else
myBaseGlyph->SetSourceConnection(myGlyphSource->GetOutputPort());
} }
SMESH_FaceOrientationFilter::~SMESH_FaceOrientationFilter() SMESH_FaceOrientationFilter::~SMESH_FaceOrientationFilter()
@ -99,7 +102,10 @@ void SMESH_FaceOrientationFilter::SetOrientationScale( vtkFloatingPointType theS
void SMESH_FaceOrientationFilter::Set3dVectors( bool theState ) void SMESH_FaceOrientationFilter::Set3dVectors( bool theState )
{ {
my3dVectors = theState; my3dVectors = theState;
myBaseGlyph->SetSource(my3dVectors ? myArrowPolyData : myGlyphSource->GetOutput()); if( my3dVectors )
myBaseGlyph->SetSourceData(myArrowPolyData);
else
myBaseGlyph->SetSourceConnection(myGlyphSource->GetOutputPort());
Modified(); Modified();
} }

View File

@ -50,16 +50,16 @@ SMESH_NodeLabelActor::SMESH_NodeLabelActor() {
myPointsNumDataSet = vtkUnstructuredGrid::New(); myPointsNumDataSet = vtkUnstructuredGrid::New();
myPtsMaskPoints = vtkMaskPoints::New(); myPtsMaskPoints = vtkMaskPoints::New();
myPtsMaskPoints->SetInput(myPointsNumDataSet); myPtsMaskPoints->SetInputData(myPointsNumDataSet);
myPtsMaskPoints->SetOnRatio(1); myPtsMaskPoints->SetOnRatio(1);
myPtsSelectVisiblePoints = vtkSelectVisiblePoints::New(); myPtsSelectVisiblePoints = vtkSelectVisiblePoints::New();
myPtsSelectVisiblePoints->SetInput(myPtsMaskPoints->GetOutput()); myPtsSelectVisiblePoints->SetInputConnection(myPtsMaskPoints->GetOutputPort());
myPtsSelectVisiblePoints->SelectInvisibleOff(); myPtsSelectVisiblePoints->SelectInvisibleOff();
myPtsSelectVisiblePoints->SetTolerance(0.1); myPtsSelectVisiblePoints->SetTolerance(0.1);
myPtsLabeledDataMapper = vtkLabeledDataMapper::New(); myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput()); myPtsLabeledDataMapper->SetInputConnection(myPtsSelectVisiblePoints->GetOutputPort());
myPtsLabeledDataMapper->SetLabelFormat("%d"); myPtsLabeledDataMapper->SetLabelFormat("%d");
myPtsLabeledDataMapper->SetLabelModeToLabelScalars(); myPtsLabeledDataMapper->SetLabelModeToLabelScalars();
@ -156,7 +156,7 @@ void SMESH_NodeLabelActor::SetPointsLabeled(bool theIsPointsLabeled) {
} }
aDataSet->GetPointData()->SetScalars( anArray ); aDataSet->GetPointData()->SetScalars( anArray );
myPtsMaskPoints->SetInput( aDataSet ); myPtsMaskPoints->SetInputData( aDataSet );
myPointLabels->SetVisibility( GetVisibility() ); myPointLabels->SetVisibility( GetVisibility() );
anArray->Delete(); anArray->Delete();
} }

View File

@ -88,7 +88,7 @@ SMESH_ScalarBarActor::SMESH_ScalarBarActor() {
this->ScalarBar = vtkPolyData::New(); this->ScalarBar = vtkPolyData::New();
this->ScalarBarMapper = vtkPolyDataMapper2D::New(); this->ScalarBarMapper = vtkPolyDataMapper2D::New();
this->ScalarBarMapper->SetInput(this->ScalarBar); this->ScalarBarMapper->SetInputData(this->ScalarBar);
this->ScalarBarActor = vtkActor2D::New(); this->ScalarBarActor = vtkActor2D::New();
this->ScalarBarActor->SetMapper(this->ScalarBarMapper); this->ScalarBarActor->SetMapper(this->ScalarBarMapper);
this->ScalarBarActor->GetPositionCoordinate()-> this->ScalarBarActor->GetPositionCoordinate()->
@ -103,7 +103,7 @@ SMESH_ScalarBarActor::SMESH_ScalarBarActor() {
// Customization of the vtkScalarBarActor to show distribution histogram. // Customization of the vtkScalarBarActor to show distribution histogram.
myDistribution = vtkPolyData::New(); myDistribution = vtkPolyData::New();
myDistributionMapper = vtkPolyDataMapper2D::New(); myDistributionMapper = vtkPolyDataMapper2D::New();
myDistributionMapper->SetInput(this->myDistribution); myDistributionMapper->SetInputData(this->myDistribution);
myDistributionActor = vtkActor2D::New(); myDistributionActor = vtkActor2D::New();
myDistributionActor->SetMapper(this->myDistributionMapper); myDistributionActor->SetMapper(this->myDistributionMapper);

View File

@ -87,7 +87,8 @@ unsigned long SMDS_UnstructuredGrid::GetMTime()
MESSAGE("vtkUnstructuredGrid::GetMTime: " << mtime); MESSAGE("vtkUnstructuredGrid::GetMTime: " << mtime);
return mtime; return mtime;
} }
// OUV_PORTING_VTK6: seems to be useless
/*
void SMDS_UnstructuredGrid::Update() void SMDS_UnstructuredGrid::Update()
{ {
MESSAGE("SMDS_UnstructuredGrid::Update"); MESSAGE("SMDS_UnstructuredGrid::Update");
@ -99,7 +100,7 @@ void SMDS_UnstructuredGrid::UpdateInformation()
MESSAGE("SMDS_UnstructuredGrid::UpdateInformation"); MESSAGE("SMDS_UnstructuredGrid::UpdateInformation");
return vtkUnstructuredGrid::UpdateInformation(); return vtkUnstructuredGrid::UpdateInformation();
} }
*/
vtkPoints* SMDS_UnstructuredGrid::GetPoints() vtkPoints* SMDS_UnstructuredGrid::GetPoints()
{ {
// TODO erreur incomprehensible de la macro vtk GetPoints apparue avec la version paraview de fin aout 2010 // TODO erreur incomprehensible de la macro vtk GetPoints apparue avec la version paraview de fin aout 2010

View File

@ -70,8 +70,9 @@ public:
std::vector<int>& idCellsOldToNew, std::vector<int>& idCellsOldToNew,
int newCellSize); int newCellSize);
virtual unsigned long GetMTime(); virtual unsigned long GetMTime();
virtual void Update(); // OUV_PORTING_VTK6: seems to be useless
virtual void UpdateInformation(); //virtual void Update();
//virtual void UpdateInformation();
virtual vtkPoints *GetPoints(); virtual vtkPoints *GetPoints();
//#ifdef VTK_HAVE_POLYHEDRON //#ifdef VTK_HAVE_POLYHEDRON

View File

@ -113,7 +113,7 @@ namespace SMESH
// Create and display actor // Create and display actor
myMapper = vtkDataSetMapper::New(); myMapper = vtkDataSetMapper::New();
myMapper->SetInput(myGrid); myMapper->SetInputData(myGrid);
myPreviewActor = SALOME_Actor::New(); myPreviewActor = SALOME_Actor::New();
myPreviewActor->PickableOff(); myPreviewActor->PickableOff();
@ -137,10 +137,10 @@ namespace SMESH
// Orientation of faces // Orientation of faces
myFaceOrientationFilter = SMESH_FaceOrientationFilter::New(); myFaceOrientationFilter = SMESH_FaceOrientationFilter::New();
myFaceOrientationFilter->SetInput(myGrid); myFaceOrientationFilter->SetInputData(myGrid);
myFaceOrientationDataMapper = vtkPolyDataMapper::New(); myFaceOrientationDataMapper = vtkPolyDataMapper::New();
myFaceOrientationDataMapper->SetInput(myFaceOrientationFilter->GetOutput()); myFaceOrientationDataMapper->SetInputConnection(myFaceOrientationFilter->GetOutputPort());
myFaceOrientation = SALOME_Actor::New(); myFaceOrientation = SALOME_Actor::New();
myFaceOrientation->PickableOff(); myFaceOrientation->PickableOff();

View File

@ -140,7 +140,7 @@ namespace SMESH
// Create and display actor // Create and display actor
myMapper = vtkDataSetMapper::New(); myMapper = vtkDataSetMapper::New();
myMapper->SetInput(myGrid); myMapper->SetInputData(myGrid);
myPreviewActor = SALOME_Actor::New(); myPreviewActor = SALOME_Actor::New();
myPreviewActor->PickableOff(); myPreviewActor->PickableOff();
@ -164,10 +164,10 @@ namespace SMESH
// Orientation of faces // Orientation of faces
myFaceOrientationFilter = SMESH_FaceOrientationFilter::New(); myFaceOrientationFilter = SMESH_FaceOrientationFilter::New();
myFaceOrientationFilter->SetInput(myGrid); myFaceOrientationFilter->SetInputData(myGrid);
myFaceOrientationDataMapper = vtkPolyDataMapper::New(); myFaceOrientationDataMapper = vtkPolyDataMapper::New();
myFaceOrientationDataMapper->SetInput(myFaceOrientationFilter->GetOutput()); myFaceOrientationDataMapper->SetInputConnection(myFaceOrientationFilter->GetOutputPort());
myFaceOrientation = SALOME_Actor::New(); myFaceOrientation = SALOME_Actor::New();
myFaceOrientation->PickableOff(); myFaceOrientation->PickableOff();

View File

@ -132,7 +132,7 @@ void SMESH::OrientedPlane::Init()
// Create and display actor // Create and display actor
myMapper = vtkDataSetMapper::New(); myMapper = vtkDataSetMapper::New();
myMapper->SetInput(myPlaneSource->GetOutput()); myMapper->SetInputData(myPlaneSource->GetOutput());
myActor = SALOME_Actor::New(); myActor = SALOME_Actor::New();
myActor->VisibilityOff(); myActor->VisibilityOff();

View File

@ -106,7 +106,7 @@ namespace SMESH
// Create and display actor // Create and display actor
myMapper = vtkDataSetMapper::New(); myMapper = vtkDataSetMapper::New();
myMapper->SetInput( myGrid ); myMapper->SetInputData( myGrid );
myPreviewActor = SALOME_Actor::New(); myPreviewActor = SALOME_Actor::New();
myPreviewActor->PickableOff(); myPreviewActor->PickableOff();

View File

@ -362,7 +362,7 @@ void SMESHGUI_MinDistance::createPreview( double x1, double y1, double z1, doubl
aCells->Delete(); aCells->Delete();
// create actor // create actor
vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
aMapper->SetInput( aGrid ); aMapper->SetInputData( aGrid );
aGrid->Delete(); aGrid->Delete();
myPreview = SALOME_Actor::New(); myPreview = SALOME_Actor::New();
myPreview->PickableOff(); myPreview->PickableOff();
@ -879,7 +879,7 @@ void SMESHGUI_BoundingBox::createPreview( double minX, double maxX, double minY,
aCells->Delete(); aCells->Delete();
// create actor // create actor
vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
aMapper->SetInput( aGrid ); aMapper->SetInputData( aGrid );
aGrid->Delete(); aGrid->Delete();
myPreview = SALOME_Actor::New(); myPreview = SALOME_Actor::New();
myPreview->PickableOff(); myPreview->PickableOff();

View File

@ -124,7 +124,7 @@ namespace SMESH
// Create and display actor // Create and display actor
vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
aMapper->SetInput( myIdGrid ); aMapper->SetInputData( myIdGrid );
myIdActor = SALOME_Actor::New(); myIdActor = SALOME_Actor::New();
myIdActor->SetInfinitive(true); myIdActor->SetInfinitive(true);
@ -140,16 +140,16 @@ namespace SMESH
myPointsNumDataSet = vtkUnstructuredGrid::New(); myPointsNumDataSet = vtkUnstructuredGrid::New();
myPtsMaskPoints = vtkMaskPoints::New(); myPtsMaskPoints = vtkMaskPoints::New();
myPtsMaskPoints->SetInput(myPointsNumDataSet); myPtsMaskPoints->SetInputData(myPointsNumDataSet);
myPtsMaskPoints->SetOnRatio(1); myPtsMaskPoints->SetOnRatio(1);
myPtsSelectVisiblePoints = vtkSelectVisiblePoints::New(); myPtsSelectVisiblePoints = vtkSelectVisiblePoints::New();
myPtsSelectVisiblePoints->SetInput(myPtsMaskPoints->GetOutput()); myPtsSelectVisiblePoints->SetInputConnection(myPtsMaskPoints->GetOutputPort());
myPtsSelectVisiblePoints->SelectInvisibleOff(); myPtsSelectVisiblePoints->SelectInvisibleOff();
myPtsSelectVisiblePoints->SetTolerance(0.1); myPtsSelectVisiblePoints->SetTolerance(0.1);
myPtsLabeledDataMapper = vtkLabeledDataMapper::New(); myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput()); myPtsLabeledDataMapper->SetInputConnection(myPtsSelectVisiblePoints->GetOutputPort());
#if (VTK_XVERSION < 0x050200) #if (VTK_XVERSION < 0x050200)
myPtsLabeledDataMapper->SetLabelFormat("%g"); myPtsLabeledDataMapper->SetLabelFormat("%g");
#endif #endif
@ -250,7 +250,7 @@ namespace SMESH
anArray->SetValue( i, myIDs[i] ); anArray->SetValue( i, myIDs[i] );
aDataSet->GetPointData()->SetScalars( anArray ); aDataSet->GetPointData()->SetScalars( anArray );
anArray->Delete(); anArray->Delete();
myPtsMaskPoints->SetInput( aDataSet ); myPtsMaskPoints->SetInputData( aDataSet );
myPointLabels->SetVisibility( theIsActorVisible ); myPointLabels->SetVisibility( theIsActorVisible );
} }
else { else {

View File

@ -66,7 +66,7 @@ SMESHGUI_MeshEditPreview::SMESHGUI_MeshEditPreview(SVTK_ViewWindow* theViewWindo
// Create and display actor // Create and display actor
vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
aMapper->SetInput( myGrid ); aMapper->SetInputData( myGrid );
myPreviewActor = SALOME_Actor::New(); myPreviewActor = SALOME_Actor::New();
myPreviewActor->SetInfinitive(true); myPreviewActor->SetInfinitive(true);

View File

@ -957,7 +957,7 @@ void SMESHGUI_MeshPatternDlg::displayPreview()
// Create and display actor // Create and display actor
vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
aMapper->SetInput(aGrid); aMapper->SetInputData(aGrid);
myPreviewActor = SALOME_Actor::New(); myPreviewActor = SALOME_Actor::New();
myPreviewActor->PickableOff(); myPreviewActor->PickableOff();

View File

@ -1451,7 +1451,7 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
// Create and display actor // Create and display actor
vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); vtkDataSetMapper* aMapper = vtkDataSetMapper::New();
aMapper->SetInput(aGrid); aMapper->SetInputData(aGrid);
myPreviewActor = SALOME_Actor::New(); myPreviewActor = SALOME_Actor::New();
myPreviewActor->PickableOff(); myPreviewActor->PickableOff();

View File

@ -173,7 +173,7 @@ namespace SMESH
// Create and display actor // Create and display actor
myMapper = vtkDataSetMapper::New(); myMapper = vtkDataSetMapper::New();
myMapper->SetInput( aGrid ); myMapper->SetInputData( aGrid );
aGrid->Delete(); aGrid->Delete();
myPreviewActor = SALOME_Actor::New(); myPreviewActor = SALOME_Actor::New();