From 686803974085318ae2bfee51e459eac42fb66ad5 Mon Sep 17 00:00:00 2001 From: ouv Date: Wed, 30 Jan 2013 11:10:42 +0000 Subject: [PATCH] Porting to VTK 6. First compilable version of GEOM and SMESH modules. --- src/OBJECT/SMESH_Actor.cxx | 2 +- src/OBJECT/SMESH_ActorUtils.cxx | 2 +- src/OBJECT/SMESH_CellLabelActor.cxx | 10 ++-- src/OBJECT/SMESH_DeviceActor.cxx | 49 ++++++++++--------- src/OBJECT/SMESH_FaceOrientationFilter.cxx | 16 ++++-- src/OBJECT/SMESH_NodeLabelActor.cxx | 8 +-- src/OBJECT/SMESH_ScalarBarActor.cxx | 4 +- src/SMDS/SMDS_UnstructuredGrid.cxx | 5 +- src/SMDS/SMDS_UnstructuredGrid.hxx | 5 +- src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx | 6 +-- .../SMESHGUI_AddQuadraticElementDlg.cxx | 6 +-- src/SMESHGUI/SMESHGUI_ClippingDlg.cxx | 2 +- .../SMESHGUI_CreatePolyhedralVolumeDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_Measurements.cxx | 4 +- src/SMESHGUI/SMESHGUI_MergeDlg.cxx | 10 ++-- src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx | 2 +- src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx | 2 +- src/SMESHGUI/SMESHGUI_NodesDlg.cxx | 2 +- 19 files changed, 74 insertions(+), 65 deletions(-) diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index 933f34c56..8533a7a2a 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -1281,7 +1281,7 @@ vtkUnstructuredGrid* SMESH_ActorDef::GetUnstructuredGrid(){ bool SMESH_ActorDef::IsInfinitive(){ vtkDataSet *aDataSet = myPickableActor->GetUnstructuredGrid(); - aDataSet->Update(); + //aDataSet->Update(); // OUV_PORTING_VTK6: seems to be useless myIsInfinite = aDataSet->GetNumberOfCells() == 0 || ( aDataSet->GetNumberOfCells() == 1 && aDataSet->GetCell(0)->GetCellType() == VTK_VERTEX ); diff --git a/src/OBJECT/SMESH_ActorUtils.cxx b/src/OBJECT/SMESH_ActorUtils.cxx index c756156e0..f1432159e 100644 --- a/src/OBJECT/SMESH_ActorUtils.cxx +++ b/src/OBJECT/SMESH_ActorUtils.cxx @@ -90,7 +90,7 @@ namespace SMESH { vtkXMLUnstructuredGridWriter* aWriter = vtkXMLUnstructuredGridWriter::New(); aWriter->SetFileName(theFileName); - aWriter->SetInput(theGrid); + aWriter->SetInputData(theGrid); aWriter->SetDataModeToAscii(); if(theGrid->GetNumberOfCells()){ aWriter->Write(); diff --git a/src/OBJECT/SMESH_CellLabelActor.cxx b/src/OBJECT/SMESH_CellLabelActor.cxx index 297c37da9..35a87e641 100644 --- a/src/OBJECT/SMESH_CellLabelActor.cxx +++ b/src/OBJECT/SMESH_CellLabelActor.cxx @@ -52,19 +52,19 @@ SMESH_CellLabelActor::SMESH_CellLabelActor() { myCellsNumDataSet = vtkUnstructuredGrid::New(); myCellCenters = VTKViewer_CellCenters::New(); - myCellCenters->SetInput(myCellsNumDataSet); + myCellCenters->SetInputData(myCellsNumDataSet); myClsMaskPoints = vtkMaskPoints::New(); - myClsMaskPoints->SetInput(myCellCenters->GetOutput()); + myClsMaskPoints->SetInputConnection(myCellCenters->GetOutputPort()); myClsMaskPoints->SetOnRatio(1); myClsSelectVisiblePoints = vtkSelectVisiblePoints::New(); - myClsSelectVisiblePoints->SetInput(myClsMaskPoints->GetOutput()); + myClsSelectVisiblePoints->SetInputConnection(myClsMaskPoints->GetOutputPort()); myClsSelectVisiblePoints->SelectInvisibleOff(); myClsSelectVisiblePoints->SetTolerance(0.1); myClsLabeledDataMapper = vtkLabeledDataMapper::New(); - myClsLabeledDataMapper->SetInput(myClsSelectVisiblePoints->GetOutput()); + myClsLabeledDataMapper->SetInputConnection(myClsSelectVisiblePoints->GetOutputPort()); myClsLabeledDataMapper->SetLabelFormat("%d"); myClsLabeledDataMapper->SetLabelModeToLabelScalars(); @@ -156,7 +156,7 @@ void SMESH_CellLabelActor::SetCellsLabeled(bool theIsCellsLabeled) { anArray->SetValue(anId,aSMDSId); } aDataSet->GetCellData()->SetScalars(anArray); - myCellCenters->SetInput(aDataSet); + myCellCenters->SetInputData(aDataSet); myCellsLabels->SetVisibility(GetVisibility()); }else{ myCellsLabels->SetVisibility(false); diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx index c82bbf305..a9aec176f 100644 --- a/src/OBJECT/SMESH_DeviceActor.cxx +++ b/src/OBJECT/SMESH_DeviceActor.cxx @@ -125,7 +125,7 @@ SMESH_DeviceActor myFaceOrientationFilter = SMESH_FaceOrientationFilter::New(); myFaceOrientationDataMapper = vtkPolyDataMapper::New(); - myFaceOrientationDataMapper->SetInput(myFaceOrientationFilter->GetOutput()); + myFaceOrientationDataMapper->SetInputConnection(myFaceOrientationFilter->GetOutputPort()); myFaceOrientation = vtkActor::New(); myFaceOrientation->SetMapper(myFaceOrientationDataMapper); @@ -208,9 +208,9 @@ SMESH_DeviceActor { int anId = 0; if(theIsImplicitFunctionUsed) - myPassFilter[ anId ]->SetInput( myExtractGeometry->GetOutput() ); + myPassFilter[ anId ]->SetInputConnection( myExtractGeometry->GetOutputPort() ); else - myPassFilter[ anId ]->SetInput( myMergeFilter->GetOutput() ); + myPassFilter[ anId ]->SetInputConnection( myMergeFilter->GetOutputPort() ); myIsImplicitFunctionUsed = theIsImplicitFunctionUsed; SetStoreClippingMapping(myStoreClippingMapping); @@ -225,32 +225,33 @@ SMESH_DeviceActor //myIsShrinkable = theGrid->GetNumberOfCells() > 10; 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; SetImplicitFunctionUsed(myIsImplicitFunctionUsed); - myPassFilter[ anId + 1]->SetInput( myPassFilter[ anId ]->GetOutput() ); + myPassFilter[ anId + 1]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); anId++; // 1 - myTransformFilter->SetInput( myPassFilter[ anId ]->GetOutput() ); + myTransformFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); anId++; // 2 - myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() ); - myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() ); + myPassFilter[ anId ]->SetInputConnection( myTransformFilter->GetOutputPort() ); + myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); anId++; // 3 - myGeomFilter->SetInput( myPassFilter[ anId ]->GetOutput() ); + myGeomFilter->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); anId++; // 4 - myPassFilter[ anId ]->SetInput( myGeomFilter->GetOutput() ); - myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() ); + myPassFilter[ anId ]->SetInputConnection( myGeomFilter->GetOutputPort() ); + myPassFilter[ anId + 1 ]->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); anId++; // 5 - myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() ); + // OUV_PORTING_VTK6: to check + myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); vtkLODActor::SetMapper( myMapper ); Modified(); @@ -322,7 +323,7 @@ SMESH_DeviceActor theLookupTable->SetNumberOfTableValues(theScalarBarActor->GetMaximumNumberOfColors()); theLookupTable->Build(); - myMergeFilter->SetScalars(aDataSet); + myMergeFilter->SetScalarsData(aDataSet); aDataSet->Delete(); } GetMapper()->SetScalarVisibility(anIsInitialized); @@ -402,7 +403,7 @@ SMESH_DeviceActor theLookupTable->SetRange(aScalars->GetRange()); theLookupTable->Build(); - myMergeFilter->SetScalars(aDataSet); + myMergeFilter->SetScalarsData(aDataSet); aDataSet->Delete(); } else if (MultiConnection2D* aMultiConnection2D = dynamic_cast(theFunctor.get())){ @@ -462,7 +463,7 @@ SMESH_DeviceActor theLookupTable->SetRange(aScalars->GetRange()); theLookupTable->Build(); - myMergeFilter->SetScalars(aDataSet); + myMergeFilter->SetScalarsData(aDataSet); aDataSet->Delete(); } } @@ -600,10 +601,10 @@ SMESH_DeviceActor ::SetShrink() { if ( !myIsShrinkable ) return; - if ( vtkDataSet* aDataSet = myPassFilter[ 0 ]->GetOutput() ) + if ( vtkAlgorithmOutput* aDataSet = myPassFilter[ 0 ]->GetOutputPort() ) { - myShrinkFilter->SetInput( aDataSet ); - myPassFilter[ 1 ]->SetInput( myShrinkFilter->GetOutput() ); + myShrinkFilter->SetInputConnection( aDataSet ); + myPassFilter[ 1 ]->SetInputConnection( myShrinkFilter->GetOutputPort() ); myIsShrunk = true; } } @@ -613,9 +614,9 @@ SMESH_DeviceActor ::UnShrink() { 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(); myIsShrunk = false; Modified(); @@ -627,11 +628,11 @@ void SMESH_DeviceActor ::SetFacesOriented(bool theIsFacesOriented) { - if ( vtkDataSet* aDataSet = myTransformFilter->GetOutput() ) + if ( vtkAlgorithmOutput* aDataSet = myTransformFilter->GetOutputPort() ) { myIsFacesOriented = theIsFacesOriented; if( theIsFacesOriented ) - myFaceOrientationFilter->SetInput( aDataSet ); + myFaceOrientationFilter->SetInputConnection( aDataSet ); UpdateFaceOrientation(); } } diff --git a/src/OBJECT/SMESH_FaceOrientationFilter.cxx b/src/OBJECT/SMESH_FaceOrientationFilter.cxx index da38ecf2f..f0abd890a 100644 --- a/src/OBJECT/SMESH_FaceOrientationFilter.cxx +++ b/src/OBJECT/SMESH_FaceOrientationFilter.cxx @@ -61,10 +61,10 @@ SMESH_FaceOrientationFilter::SMESH_FaceOrientationFilter() myFacePolyData = vtkPolyData::New(); myFaceCenters = VTKViewer_CellCenters::New(); - myFaceCenters->SetInput(myFacePolyData); + myFaceCenters->SetInputData(myFacePolyData); myFaceMaskPoints = vtkMaskPoints::New(); - myFaceMaskPoints->SetInput(myFaceCenters->GetOutput()); + myFaceMaskPoints->SetInputConnection(myFaceCenters->GetOutputPort()); myFaceMaskPoints->SetOnRatio(1); myGlyphSource = vtkGlyphSource2D::New(); @@ -73,11 +73,14 @@ SMESH_FaceOrientationFilter::SMESH_FaceOrientationFilter() myGlyphSource->SetCenter(0.5, 0.0, 0.0); myBaseGlyph = vtkGlyph3D::New(); - myBaseGlyph->SetInput(myFaceMaskPoints->GetOutput()); + myBaseGlyph->SetInputConnection(myFaceMaskPoints->GetOutputPort()); myBaseGlyph->SetVectorModeToUseVector(); myBaseGlyph->SetScaleModeToDataScalingOff(); myBaseGlyph->SetColorModeToColorByScalar(); - myBaseGlyph->SetSource(my3dVectors ? myArrowPolyData : myGlyphSource->GetOutput()); + if( my3dVectors ) + myBaseGlyph->SetSourceData(myArrowPolyData); + else + myBaseGlyph->SetSourceConnection(myGlyphSource->GetOutputPort()); } SMESH_FaceOrientationFilter::~SMESH_FaceOrientationFilter() @@ -99,7 +102,10 @@ void SMESH_FaceOrientationFilter::SetOrientationScale( vtkFloatingPointType theS void SMESH_FaceOrientationFilter::Set3dVectors( bool theState ) { my3dVectors = theState; - myBaseGlyph->SetSource(my3dVectors ? myArrowPolyData : myGlyphSource->GetOutput()); + if( my3dVectors ) + myBaseGlyph->SetSourceData(myArrowPolyData); + else + myBaseGlyph->SetSourceConnection(myGlyphSource->GetOutputPort()); Modified(); } diff --git a/src/OBJECT/SMESH_NodeLabelActor.cxx b/src/OBJECT/SMESH_NodeLabelActor.cxx index b3a8d3d0f..40f61a0f4 100644 --- a/src/OBJECT/SMESH_NodeLabelActor.cxx +++ b/src/OBJECT/SMESH_NodeLabelActor.cxx @@ -50,16 +50,16 @@ SMESH_NodeLabelActor::SMESH_NodeLabelActor() { myPointsNumDataSet = vtkUnstructuredGrid::New(); myPtsMaskPoints = vtkMaskPoints::New(); - myPtsMaskPoints->SetInput(myPointsNumDataSet); + myPtsMaskPoints->SetInputData(myPointsNumDataSet); myPtsMaskPoints->SetOnRatio(1); myPtsSelectVisiblePoints = vtkSelectVisiblePoints::New(); - myPtsSelectVisiblePoints->SetInput(myPtsMaskPoints->GetOutput()); + myPtsSelectVisiblePoints->SetInputConnection(myPtsMaskPoints->GetOutputPort()); myPtsSelectVisiblePoints->SelectInvisibleOff(); myPtsSelectVisiblePoints->SetTolerance(0.1); myPtsLabeledDataMapper = vtkLabeledDataMapper::New(); - myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput()); + myPtsLabeledDataMapper->SetInputConnection(myPtsSelectVisiblePoints->GetOutputPort()); myPtsLabeledDataMapper->SetLabelFormat("%d"); myPtsLabeledDataMapper->SetLabelModeToLabelScalars(); @@ -156,7 +156,7 @@ void SMESH_NodeLabelActor::SetPointsLabeled(bool theIsPointsLabeled) { } aDataSet->GetPointData()->SetScalars( anArray ); - myPtsMaskPoints->SetInput( aDataSet ); + myPtsMaskPoints->SetInputData( aDataSet ); myPointLabels->SetVisibility( GetVisibility() ); anArray->Delete(); } diff --git a/src/OBJECT/SMESH_ScalarBarActor.cxx b/src/OBJECT/SMESH_ScalarBarActor.cxx index a30571218..19d46896b 100644 --- a/src/OBJECT/SMESH_ScalarBarActor.cxx +++ b/src/OBJECT/SMESH_ScalarBarActor.cxx @@ -88,7 +88,7 @@ SMESH_ScalarBarActor::SMESH_ScalarBarActor() { this->ScalarBar = vtkPolyData::New(); this->ScalarBarMapper = vtkPolyDataMapper2D::New(); - this->ScalarBarMapper->SetInput(this->ScalarBar); + this->ScalarBarMapper->SetInputData(this->ScalarBar); this->ScalarBarActor = vtkActor2D::New(); this->ScalarBarActor->SetMapper(this->ScalarBarMapper); this->ScalarBarActor->GetPositionCoordinate()-> @@ -103,7 +103,7 @@ SMESH_ScalarBarActor::SMESH_ScalarBarActor() { // Customization of the vtkScalarBarActor to show distribution histogram. myDistribution = vtkPolyData::New(); myDistributionMapper = vtkPolyDataMapper2D::New(); - myDistributionMapper->SetInput(this->myDistribution); + myDistributionMapper->SetInputData(this->myDistribution); myDistributionActor = vtkActor2D::New(); myDistributionActor->SetMapper(this->myDistributionMapper); diff --git a/src/SMDS/SMDS_UnstructuredGrid.cxx b/src/SMDS/SMDS_UnstructuredGrid.cxx index 5a0578996..d3ea0b620 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.cxx +++ b/src/SMDS/SMDS_UnstructuredGrid.cxx @@ -87,7 +87,8 @@ unsigned long SMDS_UnstructuredGrid::GetMTime() MESSAGE("vtkUnstructuredGrid::GetMTime: " << mtime); return mtime; } - +// OUV_PORTING_VTK6: seems to be useless +/* void SMDS_UnstructuredGrid::Update() { MESSAGE("SMDS_UnstructuredGrid::Update"); @@ -99,7 +100,7 @@ void SMDS_UnstructuredGrid::UpdateInformation() MESSAGE("SMDS_UnstructuredGrid::UpdateInformation"); return vtkUnstructuredGrid::UpdateInformation(); } - +*/ vtkPoints* SMDS_UnstructuredGrid::GetPoints() { // TODO erreur incomprehensible de la macro vtk GetPoints apparue avec la version paraview de fin aout 2010 diff --git a/src/SMDS/SMDS_UnstructuredGrid.hxx b/src/SMDS/SMDS_UnstructuredGrid.hxx index 4cd1dae37..4292dfd8d 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.hxx +++ b/src/SMDS/SMDS_UnstructuredGrid.hxx @@ -70,8 +70,9 @@ public: std::vector& idCellsOldToNew, int newCellSize); virtual unsigned long GetMTime(); - virtual void Update(); - virtual void UpdateInformation(); + // OUV_PORTING_VTK6: seems to be useless + //virtual void Update(); + //virtual void UpdateInformation(); virtual vtkPoints *GetPoints(); //#ifdef VTK_HAVE_POLYHEDRON diff --git a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx index 8d77bc357..0f5ddb306 100644 --- a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx @@ -113,7 +113,7 @@ namespace SMESH // Create and display actor myMapper = vtkDataSetMapper::New(); - myMapper->SetInput(myGrid); + myMapper->SetInputData(myGrid); myPreviewActor = SALOME_Actor::New(); myPreviewActor->PickableOff(); @@ -137,10 +137,10 @@ namespace SMESH // Orientation of faces myFaceOrientationFilter = SMESH_FaceOrientationFilter::New(); - myFaceOrientationFilter->SetInput(myGrid); + myFaceOrientationFilter->SetInputData(myGrid); myFaceOrientationDataMapper = vtkPolyDataMapper::New(); - myFaceOrientationDataMapper->SetInput(myFaceOrientationFilter->GetOutput()); + myFaceOrientationDataMapper->SetInputConnection(myFaceOrientationFilter->GetOutputPort()); myFaceOrientation = SALOME_Actor::New(); myFaceOrientation->PickableOff(); diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx index c4bc516ad..75ce1e599 100644 --- a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx @@ -140,7 +140,7 @@ namespace SMESH // Create and display actor myMapper = vtkDataSetMapper::New(); - myMapper->SetInput(myGrid); + myMapper->SetInputData(myGrid); myPreviewActor = SALOME_Actor::New(); myPreviewActor->PickableOff(); @@ -164,10 +164,10 @@ namespace SMESH // Orientation of faces myFaceOrientationFilter = SMESH_FaceOrientationFilter::New(); - myFaceOrientationFilter->SetInput(myGrid); + myFaceOrientationFilter->SetInputData(myGrid); myFaceOrientationDataMapper = vtkPolyDataMapper::New(); - myFaceOrientationDataMapper->SetInput(myFaceOrientationFilter->GetOutput()); + myFaceOrientationDataMapper->SetInputConnection(myFaceOrientationFilter->GetOutputPort()); myFaceOrientation = SALOME_Actor::New(); myFaceOrientation->PickableOff(); diff --git a/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx b/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx index 993f69f28..6b846cea4 100644 --- a/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx @@ -132,7 +132,7 @@ void SMESH::OrientedPlane::Init() // Create and display actor myMapper = vtkDataSetMapper::New(); - myMapper->SetInput(myPlaneSource->GetOutput()); + myMapper->SetInputData(myPlaneSource->GetOutput()); myActor = SALOME_Actor::New(); myActor->VisibilityOff(); diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx index 73eae4dd2..5bc16f58e 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx @@ -106,7 +106,7 @@ namespace SMESH // Create and display actor myMapper = vtkDataSetMapper::New(); - myMapper->SetInput( myGrid ); + myMapper->SetInputData( myGrid ); myPreviewActor = SALOME_Actor::New(); myPreviewActor->PickableOff(); diff --git a/src/SMESHGUI/SMESHGUI_Measurements.cxx b/src/SMESHGUI/SMESHGUI_Measurements.cxx index ff9394490..13a2092f8 100644 --- a/src/SMESHGUI/SMESHGUI_Measurements.cxx +++ b/src/SMESHGUI/SMESHGUI_Measurements.cxx @@ -362,7 +362,7 @@ void SMESHGUI_MinDistance::createPreview( double x1, double y1, double z1, doubl aCells->Delete(); // create actor vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); - aMapper->SetInput( aGrid ); + aMapper->SetInputData( aGrid ); aGrid->Delete(); myPreview = SALOME_Actor::New(); myPreview->PickableOff(); @@ -879,7 +879,7 @@ void SMESHGUI_BoundingBox::createPreview( double minX, double maxX, double minY, aCells->Delete(); // create actor vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); - aMapper->SetInput( aGrid ); + aMapper->SetInputData( aGrid ); aGrid->Delete(); myPreview = SALOME_Actor::New(); myPreview->PickableOff(); diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx index b1345a00a..cf0945271 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx @@ -124,7 +124,7 @@ namespace SMESH // Create and display actor vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); - aMapper->SetInput( myIdGrid ); + aMapper->SetInputData( myIdGrid ); myIdActor = SALOME_Actor::New(); myIdActor->SetInfinitive(true); @@ -140,16 +140,16 @@ namespace SMESH myPointsNumDataSet = vtkUnstructuredGrid::New(); myPtsMaskPoints = vtkMaskPoints::New(); - myPtsMaskPoints->SetInput(myPointsNumDataSet); + myPtsMaskPoints->SetInputData(myPointsNumDataSet); myPtsMaskPoints->SetOnRatio(1); myPtsSelectVisiblePoints = vtkSelectVisiblePoints::New(); - myPtsSelectVisiblePoints->SetInput(myPtsMaskPoints->GetOutput()); + myPtsSelectVisiblePoints->SetInputConnection(myPtsMaskPoints->GetOutputPort()); myPtsSelectVisiblePoints->SelectInvisibleOff(); myPtsSelectVisiblePoints->SetTolerance(0.1); myPtsLabeledDataMapper = vtkLabeledDataMapper::New(); - myPtsLabeledDataMapper->SetInput(myPtsSelectVisiblePoints->GetOutput()); + myPtsLabeledDataMapper->SetInputConnection(myPtsSelectVisiblePoints->GetOutputPort()); #if (VTK_XVERSION < 0x050200) myPtsLabeledDataMapper->SetLabelFormat("%g"); #endif @@ -250,7 +250,7 @@ namespace SMESH anArray->SetValue( i, myIDs[i] ); aDataSet->GetPointData()->SetScalars( anArray ); anArray->Delete(); - myPtsMaskPoints->SetInput( aDataSet ); + myPtsMaskPoints->SetInputData( aDataSet ); myPointLabels->SetVisibility( theIsActorVisible ); } else { diff --git a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx index ac71ddbc4..fdf0868ae 100644 --- a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx @@ -66,7 +66,7 @@ SMESHGUI_MeshEditPreview::SMESHGUI_MeshEditPreview(SVTK_ViewWindow* theViewWindo // Create and display actor vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); - aMapper->SetInput( myGrid ); + aMapper->SetInputData( myGrid ); myPreviewActor = SALOME_Actor::New(); myPreviewActor->SetInfinitive(true); diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx index cfb1f0e64..d4fa1ff90 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx @@ -957,7 +957,7 @@ void SMESHGUI_MeshPatternDlg::displayPreview() // Create and display actor vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); - aMapper->SetInput(aGrid); + aMapper->SetInputData(aGrid); myPreviewActor = SALOME_Actor::New(); myPreviewActor->PickableOff(); diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index b87346e63..c671482eb 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -1451,7 +1451,7 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview() // Create and display actor vtkDataSetMapper* aMapper = vtkDataSetMapper::New(); - aMapper->SetInput(aGrid); + aMapper->SetInputData(aGrid); myPreviewActor = SALOME_Actor::New(); myPreviewActor->PickableOff(); diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index d82ec9c1d..af34e8de4 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -173,7 +173,7 @@ namespace SMESH // Create and display actor myMapper = vtkDataSetMapper::New(); - myMapper->SetInput( aGrid ); + myMapper->SetInputData( aGrid ); aGrid->Delete(); myPreviewActor = SALOME_Actor::New();