Salome HOME
Porting to ParaView 5.8 rnv/pv58_2
authorPascal Obry <pascal.obry@edf.fr>
Tue, 28 Jan 2020 12:51:32 +0000 (13:51 +0100)
committervsr <vsr@opencascade.com>
Thu, 5 Mar 2020 14:04:32 +0000 (17:04 +0300)
19 files changed:
CMakeLists.txt
SalomeGUIConfig.cmake.in
src/LightApp/CMakeLists.txt
src/PVViewer/CMakeLists.txt
src/PVViewer/PVViewer_Behaviors.cxx
src/SALOME_PY/CMakeLists.txt
src/SALOME_PYQT/SALOME_PYQT_GUI/CMakeLists.txt
src/SALOME_PYQT/SALOME_PYQT_GUILight/CMakeLists.txt
src/SALOME_PYQT/SalomePyQt/CMakeLists.txt
src/SALOME_SWIG/CMakeLists.txt
src/SVTK/CMakeLists.txt
src/SalomeApp/CMakeLists.txt
src/VTKViewer/CMakeLists.txt
src/VTKViewer/VTKViewer_ConvexTool.cxx
src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx
src/VTKViewer/VTKViewer_GeometryFilter.cxx
src/VTKViewer/VTKViewer_GeometryFilter.h
src/VTKViewer/VTKViewer_OpenGLRenderer.cxx
src/VTKViewer/VTKViewer_PolyDataMapper.cxx

index 9575399f7e930f90b5d7b87e56a6decb91273034..f796010c33d9c9ac230a547b3aab3bc06a25e52a 100644 (file)
@@ -199,10 +199,9 @@ IF(SALOME_USE_VTKVIEWER)
   # Required components are listed in the FindSalomeVTK.cmake file: 
   FIND_PACKAGE(SalomeVTK) 
   SALOME_LOG_OPTIONAL_PACKAGE(VTK SALOME_USE_VTKVIEWER)
-  IF(${VTK_RENDERING_BACKEND} STREQUAL "OpenGL2")
-    ADD_DEFINITIONS("-DVTK_OPENGL2")
-    SET(SALOME_GUI_USE_OPENGL2 TRUE)
-  ENDIF()
+  # VSR: TODO: since ParaView 5.8 the following is not needed, as OPENGL2 is hardcoded: to be removed (everywhere)
+  ADD_DEFINITIONS("-DVTK_OPENGL2")
+  SET(SALOME_GUI_USE_OPENGL2 TRUE)
 ELSE()
   ADD_DEFINITIONS("-DDISABLE_VTKVIEWER")
 ENDIF()
@@ -433,20 +432,21 @@ SET(PYQT_ROOT_DIR "${PYQT5_ROOT_DIR}")
 
 SET(OPENCASCADE_ROOT_DIR "${OPENCASCADE_ROOT_DIR}")
 SET(OPENGL_ROOT_DIR "${OPENGL_ROOT_DIR}")
+SET(PARAVIEW_ROOT_DIR "${PARAVIEW_ROOT_DIR}")
 SET(VTK_ROOT_DIR "${VTK_ROOT_DIR}")
 SET(QWT_ROOT_DIR "${QWT_ROOT_DIR}")
  
 SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/include")
 
 # Build variables that will be expanded when configuring Salome<MODULE>Config.cmake:
-SALOME_CONFIGURE_PREPARE(OpenCASCADE OpenGL Qt5 PyQt5 Qwt SIP VTK)
+SALOME_CONFIGURE_PREPARE(OpenCASCADE OpenGL Qt5 PyQt5 Qwt SIP ParaView VTK)
 
 CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in 
     ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
     INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
     PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX
        KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR OPENCASCADE_ROOT_DIR 
-       OPENGL_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR)
+       OPENGL_ROOT_DIR PARAVIEW_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR)
 
 #   - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?):
 #       Get the relative path of the include directory so 
@@ -457,7 +457,7 @@ CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in
 #    INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
 #    PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX 
 #       KERNEL_ROOT_DIR SIP_ROOT_DIR QT_ROOT_DIR PYQT_ROOT_DIR OPENCASCADE_ROOT_DIR 
-#       OPENGL_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR)
+#       OPENGL_ROOT_DIR PARAVIEW_ROOT_DIR VTK_ROOT_DIR QWT_ROOT_DIR)
 
 WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
     VERSION ${${PROJECT_NAME_UC}_VERSION}
index 08492ef2f8225d9728d418e57980baba2625c162..57f2ac0dd34925b7b65289fc0f03bf906c6f1f69 100644 (file)
@@ -118,7 +118,7 @@ SET_AND_CHECK(OPENCASCADE_ROOT_DIR_EXP "@PACKAGE_OPENCASCADE_ROOT_DIR@")
 IF(SALOME_USE_GLVIEWER)
   SET_AND_CHECK(OPENGL_ROOT_DIR_EXP "@PACKAGE_OPENGL_ROOT_DIR@") 
 ENDIF()
-IF(SALOME_USE_VTKVIEWER) 
+IF(SALOME_USE_VTKVIEWER)
   SET_AND_CHECK(VTK_ROOT_DIR_EXP "@PACKAGE_VTK_ROOT_DIR@")
 ENDIF()
 IF(SALOME_USE_PLOT2DVIEWER)
index 374d057963f35a471dae7cde822c41614941aaa5..3e76e2cf2344622cd1fd85e4ea872ad79091cd48 100644 (file)
@@ -66,7 +66,6 @@ IF(SALOME_USE_PLOT2DVIEWER)
   ENDIF()
 ENDIF()
 IF(SALOME_USE_VTKVIEWER)
-  INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS})
   INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/VTKViewer)
   IF(SALOME_USE_SALOMEOBJECT)
     INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/SVTK)
index 47a5ab62508f31e3f38413ca20dd4915da9661d2..826256626f9a4d53b5b37e5c8e5cbbd70a249885 100644 (file)
@@ -40,10 +40,8 @@ SET(_link_LIBRARIES
   ${KERNEL_OpUtil}
   suit 
   PVServerService
-  pqApplicationComponents
-  #vtkRenderingFreeTypeOpenGL
-  vtkRenderingFreeType
-  vtkInteractionStyle
+  ParaView::pqApplicationComponents
+  ParaView::pqPython
   )
 
 # --- headers ---
index 21d3bf9d84ae63e7ec078658795c3e0108613cc0..425456be28e44402a16ca50042798e6da0da4267 100644 (file)
@@ -72,9 +72,6 @@ void PVViewer_Behaviors::instanciateMinimalBehaviors(QMainWindow * desk)
       // Register standard types of view-frame actions.
       pgm->addInterface(new pqStandardViewFrameActionsImplementation(pgm));
 
-      // Load plugins distributed with application.
-      pqApplicationCore::instance()->loadDistributedPlugins();
-
       new pqPipelineContextMenuBehavior(this);
       new pqDefaultViewBehavior(this);  // shows a 3D view as soon as a server connection is made
       new pqAlwaysConnectedBehavior(this);  // client always connected to a server
index f4208aba063ca6b0d9ce39aac1cda19138c92b38..9a3805e350d8e7ba40b9faf81f88330b144c77e9 100644 (file)
@@ -17,8 +17,6 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(${VTK_USE_FILE})
-
 # --- options ---
 
 # additional include directories
@@ -49,7 +47,6 @@ SET(_link_LIBRARIES
   ${PYTHON_LIBRARIES}
   ${QT_LIBRARIES}
   ${OPENGL_LIBRARIES}
-  ${VTK_LIBRARIES}
   LightApp
 )
 
index bc037c4e4f5c83862e1af2af8a5685f8002865df..30840f76fd6c4cbe268efc90e0e60fa02483642f 100644 (file)
@@ -18,9 +18,6 @@
 #
 
 INCLUDE(UseQtExt)
-IF(SALOME_USE_VTKVIEWER)
-  INCLUDE(${VTK_USE_FILE})
-ENDIF()
 
 # --- options ---
 
@@ -55,7 +52,6 @@ ADD_DEFINITIONS(
 # libraries to link to
 SET(_link_LIBRARIES
   ${PYTHON_LIBRARIES}
-  ${VTK_LIBRARIES}
   ${OPENGL_LIBRARIES}
   ${PLATFORM_LIBS}
   ${OMNIORB_LIBRARIES}
index a261ed70d45ccf1bf4219ed87e4792b01ba341c1..07e8847cd978f63cb4ee7929c45c015c20a13535 100644 (file)
 INCLUDE(UseQtExt)
 INCLUDE(UsePyQt)
 
-IF(SALOME_USE_VTKVIEWER)
-  INCLUDE(${VTK_USE_FILE})
-ENDIF()
-
 # --- options ---
 
 # additional include directories
@@ -61,7 +57,6 @@ ADD_DEFINITIONS(
 # libraries to link to
 SET(_link_LIBRARIES
   ${PYTHON_LIBRARIES}
-  ${VTK_LIBRARIES}
   ${OPENGL_LIBRARIES}
   LightApp
 )
index d6795254d38f257af6b0b7e6208aad47361f4709..31106317c8dd32746c0792e0dec8345d67696aa6 100644 (file)
@@ -19,9 +19,6 @@
 
 INCLUDE(UseQtExt)
 INCLUDE(UsePyQt)
-IF(SALOME_USE_VTKVIEWER)
-  INCLUDE(${VTK_USE_FILE})
-ENDIF()
 
 # --- options ---
 
@@ -87,7 +84,6 @@ ADD_DEFINITIONS(
 # libraries to link to
 SET(_link_LIBRARIES
   ${PYTHON_LIBRARIES}
-  ${VTK_LIBRARIES}
   ${OPENGL_LIBRARIES}
   ${QWT_LIBRARY}
   SalomePyQtGUILight
index 7fc57f49343a6961c3b0439a0892d6e43f39f275..b94fd6f9cbb4b5f511d94318d59955c9e471cb97 100644 (file)
@@ -18,9 +18,6 @@
 #
 
 INCLUDE(${SWIG_USE_FILE})
-IF(SALOME_USE_VTKVIEWER)
-  INCLUDE(${VTK_USE_FILE})
-ENDIF()
 
 # --- options ---
 
index 1e8e16ee448dea7edf70074eaec0bcf7ab418725..aa122905c5e2c5722a3218d197be87551d7e2756 100644 (file)
@@ -18,7 +18,6 @@
 #
 
 INCLUDE(UseQtExt)
-INCLUDE(${VTK_USE_FILE})
 
 # --- options ---
 
@@ -44,10 +43,13 @@ ADD_DEFINITIONS(${QT_DEFINITIONS} ${OpenCASCADE_DEFINITIONS} ${BOOST_DEFINITIONS
 SET(_link_LIBRARIES 
   ${QT_LIBRARIES}
   ${OPENGL_LIBRARIES}
-  ${VTK_LIBRARIES}
   ${OpenCASCADE_FoundationClasses_LIBRARIES} ${OpenCASCADE_Visualization_LIBRARIES}
   ${KERNEL_OpUtil}
   qtx suit ViewerTools SalomeObject SalomePrs VTKViewer OpenGLUtils
+  VTK::RenderingAnnotation
+  VTK::ImagingCore
+  VTK::CommonSystem
+  VTK::IOExportGL2PS
 )
 
 # --- headers ---
index c3cceb8e7d9da39ff6b40efdc719d9601e29ddfe..15868f989ef806d5e0877655f5f0be0869674788 100644 (file)
@@ -23,9 +23,6 @@ IF(SALOME_BUILD_TESTS)
 ENDIF()
 
 INCLUDE(UseQtExt)
-IF(SALOME_USE_VTKVIEWER)
-  INCLUDE(${VTK_USE_FILE})
-ENDIF()
 
 # --- options ---
 
index bc807d9c30d1d8ed701759cd67be7cd1a5f222a3..ff8c8fb7abeff71d1017e5e8b654d5e29f8dc78f 100644 (file)
@@ -17,7 +17,6 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(${VTK_USE_FILE})
 INCLUDE(UseQtExt)
 
 # --- options ---
@@ -35,7 +34,21 @@ INCLUDE_DIRECTORIES(
 ADD_DEFINITIONS(${OpenCASCADE_DEFINITIONS} ${QT_DEFINITIONS})
 
 # libraries to link to
-SET(_link_LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARIES} ${VTK_LIBRARIES} ${OpenCASCADE_FoundationClasses_LIBRARIES} qtx suit ${KERNEL_SALOMELocalTrace})
+SET(_link_LIBRARIES
+  ${QT_LIBRARIES}
+  ${OPENGL_LIBRARIES}
+  VTK::FiltersGeometry
+  VTK::FiltersParallel
+  VTK::RenderingLOD
+  VTK::RenderingFreeType
+  VTK::RenderingOpenGL2
+  VTK::IOImage
+  VTK::IOXML
+  ${OpenCASCADE_FoundationClasses_LIBRARIES}
+  qtx
+  suit
+  ${KERNEL_SALOMELocalTrace}
+  )
 
 # --- headers ---
 
index e561aa591f05195868200a0b79a7652d955c2066..41a3b3b39402cbb95798c785d1423975345a24d6 100644 (file)
@@ -107,7 +107,9 @@ VTKViewer_Triangulator
   myPoints->Modified(); // the VTK bug
 
   vtkIdType aNumPts;
-  theInput->GetCellPoints(theCellId, aNumPts, myPointIds); 
+  vtkIdType const *tmp(nullptr);
+  theInput->GetCellPoints(theCellId, aNumPts, tmp);
+  std::copy(tmp,tmp+aNumPts,myPointIds);
   if ( aNumPts > 0 ) {
     double anAbsoluteCoord[3];
     myPoints->SetNumberOfPoints(aNumPts);
@@ -668,7 +670,7 @@ VTKViewer_OrderedTriangulator
   if ( theFaceId < 0 || theFaceId >= aNumCells ) 
     return NULL;
 
-  vtkIdType *aCells = myBoundaryTris->GetPointer();
+  vtkIdType *aCells = myBoundaryTris->GetData()->GetPointer(0);
 
   // Each triangle has three points plus number of points
   vtkIdType *aCellPtr = aCells + 4*theFaceId;
index 428eaf73f628fce86afadfe782b4b260e6281054..46fed3a1b31382e998f37952ada38a863f9ed2ee 100644 (file)
@@ -324,8 +324,8 @@ inline int InsertCell(vtkUnstructuredGrid *theInput,
     theFaceLocations->InsertNextValue(theFaces->GetMaxId() + 1);
 
     // insert cell connectivity and faces stream
-    vtkIdType nfaces = 0;
-    vtkIdType*  face = 0;
+    vtkIdType       nfaces = 0;
+    const vtkIdType*  face = 0;
     vtkIdType realnpts;
     theInput->GetFaceStream(theCellId, nfaces, face);
     vtkUnstructuredGrid::DecomposeAPolyhedronCell(
@@ -494,7 +494,8 @@ int VTKViewer_ExtractUnstructuredGrid::RequestData(vtkInformation *vtkNotUsed(re
         aCellLocationsArray->SetNumberOfComponents(1);
         aCellLocationsArray->SetNumberOfTuples(newNbElems);
         aConnectivity->InitTraversal();
-        for(vtkIdType i = 0, *pts, npts; aConnectivity->GetNextCell(npts,pts); i++){
+        vtkIdType const *pts(nullptr);
+        for(vtkIdType i = 0, npts; aConnectivity->GetNextCell(npts,pts); i++){
           aCellLocationsArray->SetValue(i,aConnectivity->GetTraversalLocation(npts));
         }
 #if VTK_XVERSION > 50700
@@ -595,7 +596,8 @@ int VTKViewer_ExtractUnstructuredGrid::RequestData(vtkInformation *vtkNotUsed(re
       aCellLocationsArray->SetNumberOfComponents(1);
       aCellLocationsArray->SetNumberOfTuples( newNbElems );
       aConnectivity->InitTraversal();
-      for(vtkIdType i = 0, *pts, npts; aConnectivity->GetNextCell(npts,pts); i++){
+      vtkIdType const *pts(nullptr);
+      for(vtkIdType i = 0, npts; aConnectivity->GetNextCell(npts,pts); i++){
         aCellLocationsArray->SetValue(i,aConnectivity->GetTraversalLocation(npts));
       }
 #if VTK_XVERSION > 50700
index 69c14801550628b8b92003db0e7d71417791f5c2..52dd0afcd56aeff87933083da73268a48f823dce 100644 (file)
@@ -118,10 +118,10 @@ VTKViewer_GeometryFilter
 static inline bool toShowEdge( vtkIdType id1, vtkIdType id2, vtkIdType cellId, vtkUnstructuredGrid* input )
 {
   // return true if the given cell is the 1st among cells including the edge
-  vtkCellLinks * links = input->GetCellLinks();
+  vtkCellLinks * links = static_cast<vtkCellLinks *>(input->GetCellLinks());
   if ( !links ) {
     input->BuildLinks();
-    links = input->GetCellLinks();
+    links = static_cast<vtkCellLinks *>(input->GetCellLinks());
   }
   if ( id1 < id2 )
     std::swap( id1, id2 );
@@ -134,7 +134,9 @@ static inline bool toShowEdge( vtkIdType id1, vtkIdType id2, vtkIdType cellId, v
   {
     if ( cells[iCell] == cellId )
       return true;
-    input->GetCellPoints( cells[iCell], npts, cellPts );
+    vtkIdType const *tmp(nullptr);
+    input->GetCellPoints( cells[iCell], npts, tmp );
+    std::copy(tmp, tmp+npts, cellPts);
     for ( vtkIdType i = 0; i < npts && !found; ++i )
       found = ( cellPts[i] == id2 );
     iCell += ( !found );
@@ -193,7 +195,7 @@ VTKViewer_GeometryFilter
   int i;
   int allVisible;
   vtkIdType npts = 0;
-  vtkIdType *pts = 0;
+  vtkIdType const *pts = 0;
   vtkPoints *p = input->GetPoints();
   vtkIdType numCells=input->GetNumberOfCells();
   vtkPointData *pd = input->GetPointData();
@@ -214,7 +216,7 @@ VTKViewer_GeometryFilter
 
   char *cellVis;
   vtkIdType newCellId;
-  int faceId, *faceVerts, *edgeVerts, numFacePts;
+  int faceId, numFacePts;
   double *x;
   vtkIdType PixelConvert[4];
   // Change the type from int to vtkIdType in order to avoid compilation errors while using VTK
@@ -447,7 +449,7 @@ VTKViewer_GeometryFilter
             aCellType = VTK_LINE;
             for ( int edgeID = 0; edgeID < 6; ++edgeID )
             {
-              edgeVerts = vtkTetra::GetEdgeArray( edgeID );
+              const int *edgeVerts = vtkTetra::GetEdgeArray( edgeID );
               if ( toShowEdge( pts[edgeVerts[0]], pts[edgeVerts[1]], cellId, input ))
               {
                 aNewPts[0] = pts[edgeVerts[0]];
@@ -473,7 +475,7 @@ VTKViewer_GeometryFilter
             for (faceId = 0; faceId < 4; faceId++)
             {
               faceIds->Reset();
-              faceVerts = vtkTetra::GetFaceArray(faceId);
+              const int *faceVerts = vtkTetra::GetFaceArray(faceId);
               faceIds->InsertNextId(pts[faceVerts[0]]);
               faceIds->InsertNextId(pts[faceVerts[1]]);
               faceIds->InsertNextId(pts[faceVerts[2]]);
@@ -504,7 +506,7 @@ VTKViewer_GeometryFilter
             aCellType = VTK_LINE;
             for ( int edgeID = 0; edgeID < 12; ++edgeID )
             {
-              edgeVerts = vtkVoxel::GetEdgeArray( edgeID );
+              const int *edgeVerts = vtkVoxel::GetEdgeArray( edgeID );
               if ( toShowEdge( pts[edgeVerts[0]], pts[edgeVerts[1]], cellId, input ))
               {
                 aNewPts[0] = pts[edgeVerts[0]];
@@ -528,7 +530,7 @@ VTKViewer_GeometryFilter
             for (faceId = 0; faceId < 6; faceId++)
             {
               faceIds->Reset();
-              faceVerts = vtkVoxel::GetFaceArray(faceId);
+              const int *faceVerts = vtkVoxel::GetFaceArray(faceId);
               faceIds->InsertNextId(pts[faceVerts[0]]);
               faceIds->InsertNextId(pts[faceVerts[1]]);
               faceIds->InsertNextId(pts[faceVerts[2]]);
@@ -562,7 +564,7 @@ VTKViewer_GeometryFilter
             aCellType = VTK_LINE;
             for ( int edgeID = 0; edgeID < 12; ++edgeID )
             {
-              edgeVerts = vtkHexahedron::GetEdgeArray( edgeID );
+              const int *edgeVerts = vtkHexahedron::GetEdgeArray( edgeID );
               if ( toShowEdge( pts[edgeVerts[0]], pts[edgeVerts[1]], cellId, input ))
               {
                 aNewPts[0] = pts[edgeVerts[0]];
@@ -588,7 +590,7 @@ VTKViewer_GeometryFilter
             for (faceId = 0; faceId < 6; faceId++)
             {
               faceIds->Reset();
-              faceVerts = vtkHexahedron::GetFaceArray(faceId);
+              const int *faceVerts = vtkHexahedron::GetFaceArray(faceId);
               faceIds->InsertNextId(pts[faceVerts[0]]);
               faceIds->InsertNextId(pts[faceVerts[1]]);
               faceIds->InsertNextId(pts[faceVerts[2]]);
@@ -620,7 +622,7 @@ VTKViewer_GeometryFilter
             aCellType = VTK_LINE;
             for ( int edgeID = 0; edgeID < 9; ++edgeID )
             {
-              edgeVerts = vtkWedge::GetEdgeArray( edgeID );
+              const int *edgeVerts = vtkWedge::GetEdgeArray( edgeID );
               if ( toShowEdge( pts[edgeVerts[0]], pts[edgeVerts[1]], cellId, input ))
               {
                 aNewPts[0] = pts[edgeVerts[0]];
@@ -644,7 +646,7 @@ VTKViewer_GeometryFilter
             for (faceId = 0; faceId < 5; faceId++)
             {
               faceIds->Reset();
-              faceVerts = vtkWedge::GetFaceArray(faceId);
+              const int *faceVerts = vtkWedge::GetFaceArray(faceId);
               faceIds->InsertNextId(pts[faceVerts[0]]);
               faceIds->InsertNextId(pts[faceVerts[1]]);
               faceIds->InsertNextId(pts[faceVerts[2]]);
@@ -683,7 +685,7 @@ VTKViewer_GeometryFilter
             aCellType = VTK_LINE;
             for ( int edgeID = 0; edgeID < 18; ++edgeID )
             {
-              edgeVerts = vtkHexagonalPrism::GetEdgeArray( edgeID );
+              const int *edgeVerts = vtkHexagonalPrism::GetEdgeArray( edgeID );
               if ( toShowEdge( pts[edgeVerts[0]], pts[edgeVerts[1]], cellId, input ))
               {
                 aNewPts[0] = pts[edgeVerts[0]];
@@ -706,7 +708,7 @@ VTKViewer_GeometryFilter
 #endif
             for (faceId = 0; faceId < 8; faceId++)
             {
-              faceVerts = vtkHexagonalPrism::GetFaceArray(faceId);
+              const int *faceVerts = vtkHexagonalPrism::GetFaceArray(faceId);
               faceIds->Reset();
               faceIds->InsertNextId(pts[faceVerts[0]]);
               faceIds->InsertNextId(pts[faceVerts[1]]);
@@ -748,7 +750,7 @@ VTKViewer_GeometryFilter
             aCellType = VTK_LINE;
             for ( int edgeID = 0; edgeID < 8; ++edgeID )
             {
-              edgeVerts = vtkPyramid::GetEdgeArray( edgeID );
+              const int *edgeVerts = vtkPyramid::GetEdgeArray( edgeID );
               if ( toShowEdge( pts[edgeVerts[0]], pts[edgeVerts[1]], cellId, input ))
               {
                 aNewPts[0] = pts[edgeVerts[0]];
@@ -772,7 +774,7 @@ VTKViewer_GeometryFilter
             for (faceId = 0; faceId < 5; faceId++)
             {
               faceIds->Reset();
-              faceVerts = vtkPyramid::GetFaceArray(faceId);
+              const int *faceVerts = vtkPyramid::GetFaceArray(faceId);
               faceIds->InsertNextId(pts[faceVerts[0]]);
               faceIds->InsertNextId(pts[faceVerts[1]]);
               faceIds->InsertNextId(pts[faceVerts[2]]);
@@ -809,7 +811,7 @@ VTKViewer_GeometryFilter
         case VTK_POLYHEDRON:
         {
           vtkIdType nFaces = 0;
-          vtkIdType* ptIds = 0;
+          const vtkIdType* ptIds = 0;
           int idp = 0;
           input->GetFaceStream(cellId, nFaces, ptIds);
 #ifdef SHOW_COINCIDING_3D_PAL21924
@@ -891,7 +893,7 @@ VTKViewer_GeometryFilter
             if ( cell->GetCellDimension() == 1 ) {
               vtkIdType arcResult = -1;
               if(myIsBuildArc) {
-                arcResult = Build1DArc(cellId, input, output, pts, myMaxArcAngle);
+                arcResult = Build1DArc(cellId, input, output, const_cast<vtkIdType *>(pts), myMaxArcAngle);
                 newCellId = arcResult;
               }
 
@@ -993,10 +995,10 @@ VTKViewer_GeometryFilter
             switch(aCellType) {
             case VTK_QUADRATIC_EDGE:
             {
-              vtkIdType arcResult =-1;
+              vtkIdType arcResult = -1;
               if(myIsBuildArc) {
-               arcResult = Build1DArc(cellId, input, output, pts,myMaxArcAngle);
-               newCellId = arcResult;
+                arcResult = Build1DArc(cellId, input, output, const_cast<vtkIdType *>(pts), myMaxArcAngle);
+                newCellId = arcResult;
               }
               if(!myIsBuildArc || arcResult == -1) {
                 aCellType = VTK_POLY_LINE;
index 776b76f3b9476e24e8429f74bfce08a194cfbb43..3220f301abc03493ecc55692855ba23677c2560f 100644 (file)
@@ -148,7 +148,7 @@ private:
   int       myIsWireframeMode;
   int       myAppendCoincident3D;
 
-  double    myMaxArcAngle;   // define max angle for mesh 2D quadratic element in the degrees
+  double    myMaxArcAngle;    // define max angle for mesh 2D quadratic element in the degrees
   bool      myIsBuildArc;     // flag for representation 2D quadratic element as arked polygon
 };
 
index 885e73a6c385184ae602d86174658782a17875a6..71c5fcf99de60ee9c584cf042d8070a271a65d2b 100644 (file)
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
+// to compile, otherwise we get:
+// #error gl.h included before glew.h
+#include <vtkglew/include/GL/glew.h>
+
 #include "VTKViewer_OpenGLRenderer.h"
 #include "VTKViewer_Texture.h"
 
index 959948f68b2cb02374e02515f0ecd26f1c14bd44..b59d4714eef134d4363d04e99e08d4a7a27bbb20 100644 (file)
@@ -41,6 +41,8 @@
 #include <vtkRenderWindow.h>
 #include <vtkCommand.h>
 #include <vtkCellData.h>
+#include <vtkUnsignedCharArray.h>
+#include <vtkIdTypeArray.h>
 
 #include <Basics_Utils.hxx>
 
@@ -747,7 +749,7 @@ namespace VTK
                    vtkDataArray* theDiamArray,
                    double theBallScale )
   {
-    vtkIdType* ptIds = theCells->GetPointer();
+    vtkIdType* ptIds = theCells->GetData()->GetPointer(0);
     vtkIdType* endPtIds = ptIds + theCells->GetNumberOfConnectivityEntries();
 
     bool mapBalls = false;