Fix problem with highlighting polyhedrons

This commit is contained in:
vsr 2013-05-22 13:20:53 +00:00
parent e87a86a68d
commit e0528f4426
2 changed files with 3 additions and 10 deletions

View File

@ -78,11 +78,6 @@
#include <vtkImplicitBoolean.h> #include <vtkImplicitBoolean.h>
#include <vtkImplicitFunctionCollection.h> #include <vtkImplicitFunctionCollection.h>
#include <vtkConfigure.h>
#if !defined(VTK_XVERSION)
#define VTK_XVERSION (VTK_MAJOR_VERSION<<16)+(VTK_MINOR_VERSION<<8)+(VTK_BUILD_VERSION)
#endif
#include "utilities.h" #include "utilities.h"
#ifdef _DEBUG_ #ifdef _DEBUG_

View File

@ -31,7 +31,6 @@
#include <SVTK_Utils.h> #include <SVTK_Utils.h>
#include <SALOME_Actor.h> #include <SALOME_Actor.h>
#include <SVTK_DeviceActor.h> #include <SVTK_DeviceActor.h>
#include <vtkPoints.h> #include <vtkPoints.h>
#include <vtkRenderer.h> #include <vtkRenderer.h>
@ -39,6 +38,9 @@
#include <vtkUnstructuredGrid.h> #include <vtkUnstructuredGrid.h>
#include <vtkCell.h> #include <vtkCell.h>
#include <vtkDataSetMapper.h> #include <vtkDataSetMapper.h>
#include <vtkPolyhedron.h>
#include <Utils_SALOME_Exception.hxx>
vtkStandardNewMacro(SMESH_SVTKActor); vtkStandardNewMacro(SMESH_SVTKActor);
@ -125,9 +127,7 @@ SMESH_SVTKActor
int aPartId = theMapIndex( ind ); int aPartId = theMapIndex( ind );
if(vtkCell* aCell = theMapActor->GetElemCell(aPartId)) if(vtkCell* aCell = theMapActor->GetElemCell(aPartId))
{ {
#if VTK_XVERSION > 50700
if (aCell->GetCellType() != VTK_POLYHEDRON) if (aCell->GetCellType() != VTK_POLYHEDRON)
#endif
{ {
if(aCell->GetCellType() == VTK_VERTEX ) { if(aCell->GetCellType() == VTK_VERTEX ) {
my0DGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds()); my0DGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
@ -137,7 +137,6 @@ SMESH_SVTKActor
myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds()); myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
} }
} }
#if VTK_XVERSION > 50700
else else
{ {
vtkPolyhedron *polyhedron = dynamic_cast<vtkPolyhedron*>(aCell); vtkPolyhedron *polyhedron = dynamic_cast<vtkPolyhedron*>(aCell);
@ -146,7 +145,6 @@ SMESH_SVTKActor
vtkIdType *pts = polyhedron->GetFaces(); vtkIdType *pts = polyhedron->GetFaces();
myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),pts[0], pts+1); myUnstructuredGrid->InsertNextCell(aCell->GetCellType(),pts[0], pts+1);
} }
#endif
} }
} }