Salome HOME
Fix problem with highlighting polyhedrons
authorvsr <vsr@opencascade.com>
Wed, 22 May 2013 13:20:53 +0000 (13:20 +0000)
committervsr <vsr@opencascade.com>
Wed, 22 May 2013 13:20:53 +0000 (13:20 +0000)
src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_SVTKActor.cxx

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