From: ouv Date: Wed, 14 Mar 2012 08:59:47 +0000 (+0000) Subject: IPAL22870: Incorrect numbering of volume elements X-Git-Tag: V6_5_0a1~54 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3f1a249dc872cc477e9571d9c7a87320d728e70b;p=modules%2Fsmesh.git IPAL22870: Incorrect numbering of volume elements --- diff --git a/src/OBJECT/SMESH_CellLabelActor.cxx b/src/OBJECT/SMESH_CellLabelActor.cxx index 399bc869f..ad297451d 100644 --- a/src/OBJECT/SMESH_CellLabelActor.cxx +++ b/src/OBJECT/SMESH_CellLabelActor.cxx @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include vtkStandardNewMacro(SMESH_CellLabelActor); @@ -49,7 +49,7 @@ 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); @@ -125,19 +125,19 @@ SMESH_CellLabelActor::~SMESH_CellLabelActor() { 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); diff --git a/src/OBJECT/SMESH_CellLabelActor.h b/src/OBJECT/SMESH_CellLabelActor.h index dda47fea5..3b2ba3b3b 100644 --- a/src/OBJECT/SMESH_CellLabelActor.h +++ b/src/OBJECT/SMESH_CellLabelActor.h @@ -32,7 +32,7 @@ class vtkSelectVisiblePoints; class vtkLabeledDataMapper; class vtkActor2D; class vtkMaskPoints; -class vtkPolyData; +class vtkUnstructuredGrid; class VTKViewer_CellCenters; @@ -65,7 +65,7 @@ protected: ~SMESH_CellLabelActor(); bool myIsCellsLabeled; - vtkPolyData* myCellsNumDataSet; + vtkUnstructuredGrid* myCellsNumDataSet; vtkActor2D *myCellsLabels; vtkMaskPoints* myClsMaskPoints; VTKViewer_CellCenters* myCellCenters; diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx index 43bf340cb..113ae791f 100644 --- a/src/OBJECT/SMESH_DeviceActor.cxx +++ b/src/OBJECT/SMESH_DeviceActor.cxx @@ -240,17 +240,17 @@ SMESH_DeviceActor 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 diff --git a/src/OBJECT/SMESH_NodeLabelActor.cxx b/src/OBJECT/SMESH_NodeLabelActor.cxx index 51c913585..0f8f3e0bf 100644 --- a/src/OBJECT/SMESH_NodeLabelActor.cxx +++ b/src/OBJECT/SMESH_NodeLabelActor.cxx @@ -37,7 +37,7 @@ #include #include #include -#include +#include vtkStandardNewMacro(SMESH_NodeLabelActor); @@ -47,7 +47,7 @@ vtkStandardNewMacro(SMESH_NodeLabelActor); SMESH_NodeLabelActor::SMESH_NodeLabelActor() { //Definition of points numbering pipeline //--------------------------------------- - myPointsNumDataSet = vtkPolyData::New(); + myPointsNumDataSet = vtkUnstructuredGrid::New(); myPtsMaskPoints = vtkMaskPoints::New(); myPtsMaskPoints->SetInput(myPointsNumDataSet); @@ -114,7 +114,7 @@ SMESH_NodeLabelActor::~SMESH_NodeLabelActor() { void SMESH_NodeLabelActor::SetPointsLabeled(bool theIsPointsLabeled) { myTransformFilter->Update(); - vtkDataSet* aGrid = vtkPolyData::SafeDownCast(myTransformFilter->GetOutput()); + vtkDataSet* aGrid = vtkUnstructuredGrid::SafeDownCast(myTransformFilter->GetOutput()); if(!aGrid) return; @@ -124,7 +124,7 @@ void SMESH_NodeLabelActor::SetPointsLabeled(bool theIsPointsLabeled) { if ( myIsPointsLabeled ) { myPointsNumDataSet->ShallowCopy(aGrid); - vtkDataSet *aDataSet = myPointsNumDataSet; + vtkUnstructuredGrid *aDataSet = myPointsNumDataSet; int aNbElem = aDataSet->GetNumberOfPoints(); @@ -133,7 +133,7 @@ void SMESH_NodeLabelActor::SetPointsLabeled(bool theIsPointsLabeled) { for ( vtkIdType anId = 0; anId < aNbElem; anId++ ) { - int aSMDSId = GetNodeObjId( anId ); + int aSMDSId = myVisualObj->GetNodeObjId( anId ); anArray->SetValue( anId, aSMDSId ); } diff --git a/src/OBJECT/SMESH_NodeLabelActor.h b/src/OBJECT/SMESH_NodeLabelActor.h index 0a9ffaa70..406bad682 100644 --- a/src/OBJECT/SMESH_NodeLabelActor.h +++ b/src/OBJECT/SMESH_NodeLabelActor.h @@ -32,7 +32,7 @@ class vtkSelectVisiblePoints; class vtkLabeledDataMapper; class vtkActor2D; class vtkMaskPoints; -class vtkPolyData; +class vtkUnstructuredGrid; class SMESHOBJECT_EXPORT SMESH_NodeLabelActor : public SMESH_DeviceActor { @@ -63,7 +63,7 @@ protected: ~SMESH_NodeLabelActor(); bool myIsPointsLabeled; - vtkPolyData* myPointsNumDataSet; + vtkUnstructuredGrid* myPointsNumDataSet; vtkActor2D *myPointLabels; vtkMaskPoints* myPtsMaskPoints; vtkLabeledDataMapper* myPtsLabeledDataMapper;