From: vsr Date: Fri, 28 Feb 2020 06:06:51 +0000 (+0300) Subject: Porting to ParaView 5.8: additional changes X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c44ff117b92492198c08e1a4fa4ce3928dea4fdc;p=modules%2Fgui.git Porting to ParaView 5.8: additional changes --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 162c0ba96..f796010c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 SalomeConfig.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} diff --git a/SalomeGUIConfig.cmake.in b/SalomeGUIConfig.cmake.in index d367ec1c5..57f2ac0dd 100644 --- a/SalomeGUIConfig.cmake.in +++ b/SalomeGUIConfig.cmake.in @@ -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) diff --git a/src/LightApp/CMakeLists.txt b/src/LightApp/CMakeLists.txt index 06cf79dfb..3e76e2cf2 100644 --- a/src/LightApp/CMakeLists.txt +++ b/src/LightApp/CMakeLists.txt @@ -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) diff --git a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt index 18cc98804..31106317c 100644 --- a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt +++ b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt @@ -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 diff --git a/src/VTKViewer/CMakeLists.txt b/src/VTKViewer/CMakeLists.txt index 543ecf6c6..0ac77556e 100644 --- a/src/VTKViewer/CMakeLists.txt +++ b/src/VTKViewer/CMakeLists.txt @@ -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 diff --git a/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx b/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx index 59e9f022e..46fed3a1b 100644 --- a/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx +++ b/src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx @@ -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)); } diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.cxx b/src/VTKViewer/VTKViewer_GeometryFilter.cxx index 65c04bdef..52dd0afcd 100644 --- a/src/VTKViewer/VTKViewer_GeometryFilter.cxx +++ b/src/VTKViewer/VTKViewer_GeometryFilter.cxx @@ -997,8 +997,8 @@ VTKViewer_GeometryFilter { vtkIdType arcResult = -1; if(myIsBuildArc) { - arcResult = Build1DArc(cellId, input, output, const_cast(pts), myMaxArcAngle); - newCellId = arcResult; + arcResult = Build1DArc(cellId, input, output, const_cast(pts), myMaxArcAngle); + newCellId = arcResult; } if(!myIsBuildArc || arcResult == -1) { aCellType = VTK_POLY_LINE; diff --git a/src/VTKViewer/VTKViewer_PolyDataMapper.cxx b/src/VTKViewer/VTKViewer_PolyDataMapper.cxx index 2d2a9113b..b59d4714e 100644 --- a/src/VTKViewer/VTKViewer_PolyDataMapper.cxx +++ b/src/VTKViewer/VTKViewer_PolyDataMapper.cxx @@ -41,8 +41,8 @@ #include #include #include -#include "vtkUnsignedCharArray.h" -#include "vtkIdTypeArray.h" +#include +#include #include