]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Porting to ParaView 5.8: additional changes
authorvsr <vsr@opencascade.com>
Fri, 28 Feb 2020 06:06:51 +0000 (09:06 +0300)
committervsr <vsr@opencascade.com>
Fri, 28 Feb 2020 09:53:16 +0000 (12:53 +0300)
CMakeLists.txt
SalomeGUIConfig.cmake.in
src/LightApp/CMakeLists.txt
src/SALOME_PYQT/SalomePyQt/CMakeLists.txt
src/VTKViewer/CMakeLists.txt
src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx
src/VTKViewer/VTKViewer_GeometryFilter.cxx
src/VTKViewer/VTKViewer_PolyDataMapper.cxx

index 162c0ba96653e0fbc4259ba4c72c6b07d5b83d06..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 d367ec1c54e7f0605766e2412e368bb9798fb8c3..57f2ac0dd34925b7b65289fc0f03bf906c6f1f69 100644 (file)
@@ -119,8 +119,6 @@ IF(SALOME_USE_GLVIEWER)
   SET_AND_CHECK(OPENGL_ROOT_DIR_EXP "@PACKAGE_OPENGL_ROOT_DIR@") 
 ENDIF()
 IF(SALOME_USE_VTKVIEWER)
-  find_package(SalomeQt5 REQUIRED)
-  find_package(SalomeParaView)
   SET_AND_CHECK(VTK_ROOT_DIR_EXP "@PACKAGE_VTK_ROOT_DIR@")
 ENDIF()
 IF(SALOME_USE_PLOT2DVIEWER)
index 06cf79dfb67ded14a490ab70b7e6caaefcf241c7..3e76e2cf2344622cd1fd85e4ea872ad79091cd48 100644 (file)
@@ -38,7 +38,6 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_SOURCE_DIR}/src/STD
   ${PROJECT_SOURCE_DIR}/src/SUIT
   ${PROJECT_SOURCE_DIR}/src/Style
-  ${PROJECT_SOURCE_DIR}/src/SVTK
 )
 IF(SALOME_USE_SALOMEOBJECT)
   INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/OBJECT)
@@ -67,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 18cc9880452268ef7ecba7aa5fcbf2ef76596c8b..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 543ecf6c607e71b8e48b761c6abdb1f4c8f08ec2..0ac77556e41de92a36a4327a61f01e7855dc8b1b 100644 (file)
@@ -37,11 +37,11 @@ ADD_DEFINITIONS(${OpenCASCADE_DEFINITIONS} ${QT_DEFINITIONS})
 SET(_link_LIBRARIES
   ${QT_LIBRARIES}
   ${OPENGL_LIBRARIES}
-  ParaView::pqApplicationComponents
-  VTK::RenderingLOD
   VTK::FiltersGeometry
   VTK::FiltersParallel
+  VTK::RenderingLOD
   VTK::RenderingFreeType
+  VTK::RenderingOpenGL2
   VTK::IOImage
   ${OpenCASCADE_FoundationClasses_LIBRARIES}
   qtx
index 59e9f022e9d54dff76f3dbb710d7eb80fb2f2b2f..46fed3a1b31382e998f37952ada38a863f9ed2ee 100644 (file)
@@ -494,7 +494,7 @@ int VTKViewer_ExtractUnstructuredGrid::RequestData(vtkInformation *vtkNotUsed(re
         aCellLocationsArray->SetNumberOfComponents(1);
         aCellLocationsArray->SetNumberOfTuples(newNbElems);
         aConnectivity->InitTraversal();
-       vtkIdType const *pts(nullptr);
+        vtkIdType const *pts(nullptr);
         for(vtkIdType i = 0, npts; aConnectivity->GetNextCell(npts,pts); i++){
           aCellLocationsArray->SetValue(i,aConnectivity->GetTraversalLocation(npts));
         }
index 65c04bdef02a6bc9e227600a8cd87da073b3dcc0..52dd0afcd56aeff87933083da73268a48f823dce 100644 (file)
@@ -997,8 +997,8 @@ VTKViewer_GeometryFilter
             {
               vtkIdType arcResult = -1;
               if(myIsBuildArc) {
-               arcResult = Build1DArc(cellId, input, output, const_cast<vtkIdType *>(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 2d2a9113b8db8a15affd142e9548f23cc4bf5700..b59d4714eef134d4363d04e99e08d4a7a27bbb20 100644 (file)
@@ -41,8 +41,8 @@
 #include <vtkRenderWindow.h>
 #include <vtkCommand.h>
 #include <vtkCellData.h>
-#include "vtkUnsignedCharArray.h"
-#include "vtkIdTypeArray.h"
+#include <vtkUnsignedCharArray.h>
+#include <vtkIdTypeArray.h>
 
 #include <Basics_Utils.hxx>