#include <vtkPointData.h>
#include <vtkProperty2D.h>
#include <vtkRenderer.h>
-#include <vtkPolyData.h>
+#include <vtkUnstructuredGrid.h>
#include <vtkCellData.h>
vtkStandardNewMacro(SMESH_CellLabelActor);
SMESH_CellLabelActor::SMESH_CellLabelActor() {
//Definition of cells numbering pipeline
//---------------------------------------
- myCellsNumDataSet = vtkPolyData::New();
+ myCellsNumDataSet = vtkUnstructuredGrid::New();
myCellCenters = VTKViewer_CellCenters::New();
myCellCenters->SetInput(myCellsNumDataSet);
void SMESH_CellLabelActor::SetCellsLabeled(bool theIsCellsLabeled) {
myTransformFilter->Update();
- vtkPolyData* aGrid = vtkPolyData::SafeDownCast(myTransformFilter->GetOutput());
+ vtkUnstructuredGrid* aGrid = vtkUnstructuredGrid::SafeDownCast(myTransformFilter->GetOutput());
if(!aGrid)
return;
myIsCellsLabeled = theIsCellsLabeled && aGrid->GetNumberOfPoints();
if(myIsCellsLabeled){
myCellsNumDataSet->ShallowCopy(aGrid);
- vtkDataSet *aDataSet = myCellsNumDataSet;
+ vtkUnstructuredGrid *aDataSet = myCellsNumDataSet;
int aNbElem = aDataSet->GetNumberOfCells();
vtkIntArray *anArray = vtkIntArray::New();
anArray->SetNumberOfValues(aNbElem);
for(int anId = 0; anId < aNbElem; anId++){
- int aSMDSId = GetElemObjId(anId);
+ int aSMDSId = myVisualObj->GetElemObjId(anId);
anArray->SetValue(anId,aSMDSId);
}
aDataSet->GetCellData()->SetScalars(anArray);
class vtkLabeledDataMapper;
class vtkActor2D;
class vtkMaskPoints;
-class vtkPolyData;
+class vtkUnstructuredGrid;
class VTKViewer_CellCenters;
~SMESH_CellLabelActor();
bool myIsCellsLabeled;
- vtkPolyData* myCellsNumDataSet;
+ vtkUnstructuredGrid* myCellsNumDataSet;
vtkActor2D *myCellsLabels;
vtkMaskPoints* myClsMaskPoints;
VTKViewer_CellCenters* myCellCenters;
myPassFilter[ anId + 1]->SetInput( myPassFilter[ anId ]->GetOutput() );
anId++; // 1
- myGeomFilter->SetInput( myPassFilter[ anId ]->GetOutput() );
+ myTransformFilter->SetInput( myPassFilter[ anId ]->GetOutput() );
anId++; // 2
- myPassFilter[ anId ]->SetInput( myGeomFilter->GetOutput() );
+ myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() );
myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
anId++; // 3
- myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+ myGeomFilter->SetInput( myPassFilter[ anId ]->GetOutput() );
anId++; // 4
- myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() );
+ myPassFilter[ anId ]->SetInput( myGeomFilter->GetOutput() );
myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
anId++; // 5
#include <vtkPointData.h>
#include <vtkProperty2D.h>
#include <vtkRenderer.h>
-#include <vtkPolyData.h>
+#include <vtkUnstructuredGrid.h>
vtkStandardNewMacro(SMESH_NodeLabelActor);
SMESH_NodeLabelActor::SMESH_NodeLabelActor() {
//Definition of points numbering pipeline
//---------------------------------------
- myPointsNumDataSet = vtkPolyData::New();
+ myPointsNumDataSet = vtkUnstructuredGrid::New();
myPtsMaskPoints = vtkMaskPoints::New();
myPtsMaskPoints->SetInput(myPointsNumDataSet);
void SMESH_NodeLabelActor::SetPointsLabeled(bool theIsPointsLabeled) {
myTransformFilter->Update();
- vtkDataSet* aGrid = vtkPolyData::SafeDownCast(myTransformFilter->GetOutput());
+ vtkDataSet* aGrid = vtkUnstructuredGrid::SafeDownCast(myTransformFilter->GetOutput());
if(!aGrid)
return;
if ( myIsPointsLabeled )
{
myPointsNumDataSet->ShallowCopy(aGrid);
- vtkDataSet *aDataSet = myPointsNumDataSet;
+ vtkUnstructuredGrid *aDataSet = myPointsNumDataSet;
int aNbElem = aDataSet->GetNumberOfPoints();
for ( vtkIdType anId = 0; anId < aNbElem; anId++ )
{
- int aSMDSId = GetNodeObjId( anId );
+ int aSMDSId = myVisualObj->GetNodeObjId( anId );
anArray->SetValue( anId, aSMDSId );
}
class vtkLabeledDataMapper;
class vtkActor2D;
class vtkMaskPoints;
-class vtkPolyData;
+class vtkUnstructuredGrid;
class SMESHOBJECT_EXPORT SMESH_NodeLabelActor : public SMESH_DeviceActor {
~SMESH_NodeLabelActor();
bool myIsPointsLabeled;
- vtkPolyData* myPointsNumDataSet;
+ vtkUnstructuredGrid* myPointsNumDataSet;
vtkActor2D *myPointLabels;
vtkMaskPoints* myPtsMaskPoints;
vtkLabeledDataMapper* myPtsLabeledDataMapper;