]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Merge Python 3 porting.
authorrnv <rnv@opencascade.com>
Thu, 22 Jun 2017 16:05:31 +0000 (19:05 +0300)
committerrnv <rnv@opencascade.com>
Thu, 22 Jun 2017 16:05:31 +0000 (19:05 +0300)
39 files changed:
CMakeLists.txt
examples/command_line/dataset.py
resources/PARAVISCatalog.xml.in
src/Macro/ShowSalomeObject.py
src/PVGUI/PVGUI_DataModel.cxx
src/Plugins/MEDReader/CMakeLists.txt
src/Plugins/MEDReader/Test/Baselines/testMEDReader14.png
src/Plugins/MEDReader/Test/Baselines/testMEDReader15.png
src/Plugins/MEDReader/Test/Baselines/testMEDReader20.png
src/Plugins/MEDReader/Test/Baselines/testMEDReader21.png
src/Plugins/MEDReader/Test/Baselines/testMEDReader7.png
src/Plugins/MEDReader/Test/CMakeLists.txt
src/Plugins/MEDReader/Test/CTestTestfileInstall.cmake
src/Plugins/MEDReader/Test/testMEDReader0.py
src/Plugins/MEDReader/Test/testMEDReader10.py
src/Plugins/MEDReader/Test/testMEDReader11.py
src/Plugins/MEDReader/Test/testMEDReader12.py
src/Plugins/MEDReader/Test/testMEDReader13.py
src/Plugins/MEDReader/Test/testMEDReader14.py
src/Plugins/MEDReader/Test/testMEDReader15.py
src/Plugins/MEDReader/Test/testMEDReader19.py
src/Plugins/MEDReader/Test/testMEDReader2.py
src/Plugins/MEDReader/Test/testMEDReader20.py
src/Plugins/MEDReader/Test/testMEDReader21.py
src/Plugins/MEDReader/Test/testMEDReader3.py
src/Plugins/MEDReader/Test/testMEDReader4.py
src/Plugins/MEDReader/Test/testMEDReader5.py
src/Plugins/MEDReader/Test/testMEDReader6.py
src/Plugins/MEDReader/Test/testMEDReader7.py
src/Plugins/MEDReader/Test/testMEDReader8.py
src/Plugins/MEDReader/Test/tests.set [new file with mode: 0644]
src/Plugins/ParaGEOMCorba/CMakeLists.txt
src/Plugins/ParaGEOMCorba/vtkParaGEOMCorbaSource.cxx
src/Plugins/ParaMEDCorba/CMakeLists.txt
src/Plugins/ParaSMESHCorba/vtkParaSMESHCorbaSource.cxx
src/Plugins/SimpleMode/CMakeLists.txt
src/Plugins/SimpleMode/IO/CMakeLists.txt
test/VisuPrs/bugs/A5.py
test/VisuPrs/dump_study/B5.py

index 5a1399c47438a247a1f0a41a214f286c9d34b2b3..db76fc4aec46629c74d65c7be735ca46077f00f2 100644 (file)
@@ -41,7 +41,7 @@ SET(${PROJECT_NAME_UC}_MINOR_VERSION 3)
 SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
+SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
 
 # Common CMake macros
 # ===================
index cff4c01da345ffe4ec06e2c951402ccbe442e9ec..300af014df870176bd6384ffc1403739c74b5f6c 100644 (file)
@@ -2,7 +2,7 @@ def create_geometry(out_filename=None):
   import GEOM
   import salome
   from salome.geom import geomBuilder
-  geompy = geomBuilder.New(salome.myStudy)
+  geompy = geomBuilder.New()
 
   # create a cloud of points
   points = [
@@ -29,7 +29,7 @@ def create_meshes(geometry, out_filename=None):
   import salome
   from salome.smesh import smeshBuilder
 
-  smesh = smeshBuilder.New(salome.myStudy)
+  smesh = smeshBuilder.New()
   Mesh_tri = smesh.Mesh(geometry)
 
   Regular_1D = Mesh_tri.Segment()
index e827c05800e3a59c75a1e0eb32c0fe8c46bb5a33..7db311a415887fbc9d9a435012b962e4df05a074 100644 (file)
@@ -32,7 +32,6 @@
             <component-author>vsv</component-author>
             <component-version>@SALOMEPARAVIS_VERSION@</component-version>
             <component-comment>PVServer control service</component-comment>
-            <component-multistudy>1</component-multistudy>
             <component-impltype>1</component-impltype>
             <component-icone>pqAppIcon22.png</component-icone>
             <constraint></constraint>
index e7c417dc43da6169bf4b4a699052b57c703a5d0d..464519d377f2c89db634ca4916432adf830db590 100644 (file)
@@ -44,7 +44,7 @@ for entry in selection:
     try:
         import GEOM
         from salome.geom import geomBuilder
-        geompy = geomBuilder.New(salome.myStudy)
+        geompy = geomBuilder.New()
         go = sobj.GetObject()._narrow(GEOM.GEOM_Object)
         if go:
             tmpf = tempfile.NamedTemporaryFile(suffix='.vtk')
@@ -64,7 +64,7 @@ for entry in selection:
     try: 
         import SMESH
         from salome.smesh import smeshBuilder
-        mesh = smeshBuilder.New(salome.myStudy)
+        mesh = smeshBuilder.New()
         mo = sobj.GetObject()._narrow(SMESH.SMESH_Mesh)
         if mo:
             tmpf = tempfile.NamedTemporaryFile(suffix='.med')
index 8f4805fc3b773c23353c6f96742dcd8c18e8e4b5..9e321776d4757c4202b4803dfad0a9e66944ebb6 100644 (file)
@@ -208,7 +208,7 @@ bool PVGUI_DataModel::dumpPython( const QString& path, CAM_Study* std,
   if (isMultiFile)
     {
       QStringList abuffer;
-      abuffer.push_back(QString("def RebuildData( theStudy ):"));
+      abuffer.push_back(QString("def RebuildData():"));
       QStringList lst(trace.split("\n"));
       foreach(QString elem, lst)
         {
index 397b237e598123f5861745d2270899ffd670b6a5..dc5e54b819869d7e7172942d780b8d940baefe71 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2010-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-# Patch for ParaView
-# cp ParaView-3.98.1/VTK/CMake/*.cmake ParaView-3.98.1_INSTALL/lib/cmake/paraview-3.98
-
-# Env for MEDReader
-#setenv PV_PLUGIN_PATH ".../MEDReader_INSTALL/lib/paraview"
-#setenv LD_LIBRARY_PATH ...MEDReader_INSTALL/lib/salome:${LD_LIBRARY_PATH}
-
-# Typical cmake command
-# cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=PATH_TO/MEDReader_INSTALL ../MEDReader_SRC  \ 
-#       -DMEDFILE_ROOT_DIR=/where/is/med-3.0.7_install -DMEDCOUPLING_ROOT_DIR=/where/is/medcoupling_install \ 
-#       -DParaView_DIR=<PARAVIEW_INSTALL>/lib/cmake/paraview-4.3 
+# (cd /home/H87074/salome/DEV/modules/build/MEDReader ; export CURRENT_SOFTWARE_SRC_DIR=/home/H87074/salome/DEV/modules/src/PARAVIS ; export CURRENT_SOFTWARE_BUILD_DIR=/home/H87074/salome/DEV/modules/build/PARAVIS_master ; export CURRENT_SOFTWARE_INSTALL_DIR=/home/H87074/salome/DEV/modules/install/PARAVIS_master ; export PYTHON_VERSION="2.7" ; . /home/H87074/salome/DEV/modules/build/PARAVIS_master/.yamm/env_build.sh >/dev/null 2>&1 ; . /home/H87074/salome/DEV/salome_modules.sh >/dev/null 2>&1 ; . /home/H87074/salome/DEV/salome_prerequisites.sh >/dev/null 2>&1 ; export PARAVIEW_INSTALL_DIR="/home/H87074/salome/prerequisites/install/Paraview-v512_EDF-cm362-dox1831-gl2ps139-gr2380-hd1814-xml2290-py2710-qt561" ;  cmake -DCMAKE_INSTALL_PREFIX=/home/H87074/salome/DEV/modules/install/PARAVIS_master  -DPYTHON_ROOT_DIR=${PYTHONHOME}  -DSALOME_PARAVIS_MINIMAL_CORBA=ON   -DCMAKE_BUILD_TYPE=Debug -DSALOME_PARAVIS_MINIMAL_CORBA=ON -DMEDCOUPLING_ROOT_DIR=/home/H87074/salome/DEV/tools/install/Medcoupling-master /home/H87074/salome/DEV/modules/src/PARAVIS/src/Plugins/MEDReader)
 
 IF(NOT KW_TESTING_PLATFORM)
-PROJECT(MEDReader)
+PROJECT(MEDReader C CXX)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+INCLUDE(CMakeDependentOption)
 ENDIF(NOT KW_TESTING_PLATFORM)
 
 IF(COMMAND cmake_policy)
@@ -48,6 +39,53 @@ SET(MED_READER_VERSION "${MED_READER_MAJOR_VERSION}.${MED_READER_MINOR_VERSION}.
 #
 SET(MEDReader_BUILD_ParaView_Plugin ON CACHE BOOL "Build the ParaView plugin")
 
+  
+# Ensure a proper linker behavior:
+CMAKE_POLICY(SET CMP0003 NEW)
+CMAKE_POLICY(SET CMP0045 OLD)
+CMAKE_POLICY(SET CMP0023 OLD)
+CMAKE_POLICY(SET CMP0022 OLD)
+IF(WIN32)
+  CMAKE_POLICY(SET CMP0020 OLD) # disable automatic linking to qtmain.lib 
+ENDIF(WIN32)
+
+# Common CMake macros
+# ===================
+SET(TMP_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
+unset(CMAKE_MODULE_PATH)
+SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
+IF(EXISTS ${CONFIGURATION_ROOT_DIR})
+  LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
+  INCLUDE(SalomeMacros)
+ELSE()
+  MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
+ENDIF()
+
+SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "Path to the MEDCoupling tool")
+IF(EXISTS ${MEDCOUPLING_ROOT_DIR})
+  LIST(APPEND CMAKE_MODULE_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files")   
+ENDIF()
+LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_ROOT}/Modules")
+LIST(APPEND CMAKE_MODULE_PATH ${TMP_CMAKE_MODULE_PATH})
+
+
+
+# Platform setup
+# ==============
+INCLUDE(SalomeSetupPlatform)
+SET(BUILD_SHARED_LIBS TRUE)
+
+FIND_PACKAGE(SalomePythonInterp REQUIRED)
+FIND_PACKAGE(SalomePythonLibs REQUIRED)
+FIND_PACKAGE(SalomeHDF5 REQUIRED)
+FIND_PACKAGE(SalomeMEDCoupling REQUIRED)
+FIND_PACKAGE(SalomeMEDFile REQUIRED)
+
+SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS}
+                                                 ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON})
+SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS})
+SALOME_ACCUMULATE_ENVIRONMENT(PV_PLUGIN_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/lib/paraview)
+
 IF(MEDReader_BUILD_ParaView_Plugin)
     FIND_PACKAGE(ParaView REQUIRED)
     IF(NOT ParaView_FOUND)
@@ -63,24 +101,9 @@ ELSE(MEDReader_BUILD_ParaView_Plugin)
     ENDIF(NOT VTK_FOUND)
     INCLUDE(${VTK_USE_FILE})
 ENDIF(MEDReader_BUILD_ParaView_Plugin)
-
-# Standard CMake option for building libraries shared or static by default.
-OPTION(BUILD_SHARED_LIBS "Build with shared libraries." ${VTK_BUILD_SHARED_LIBS})
-#
-# Find dependant Library
-#
-SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "KERNEL_ROOT_DIR")
-SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "MEDCOUPLING_ROOT_DIR")
-#LIST(APPEND CMAKE_MODULE_PATH "${MED_ROOT_DIR}/adm_local_without_kernel/cmake_files")
-LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files")
-LIST(APPEND CMAKE_MODULE_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files")
-INCLUDE(SalomeMacros)
-INCLUDE(SalomeSetupPlatform)
-FIND_PACKAGE(SalomePythonInterp REQUIRED)
-FIND_PACKAGE(SalomePythonLibs REQUIRED)
-FIND_PACKAGE(SalomeHDF5 REQUIRED)
-FIND_PACKAGE(SalomeMEDCoupling REQUIRED)
-FIND_PACKAGE(SalomeMEDFile REQUIRED)
+FIND_PACKAGE(SalomeQt5 REQUIRED)
+INCLUDE(UseQtExt)
 
 # Accumulate environment variables for PARAVIS module
 SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS}
index ffc50195ee05956a2e6690139a18ec185add2b01..dea5f2d7aa7fced6cdac3b3b9ec46946dc0d11fe 100644 (file)
Binary files a/src/Plugins/MEDReader/Test/Baselines/testMEDReader14.png and b/src/Plugins/MEDReader/Test/Baselines/testMEDReader14.png differ
index 7e78fd13ed13516b8093d8efa73f9b4992530150..4af9e7ea9e16284c9444d89cb75b9470415feb10 100644 (file)
Binary files a/src/Plugins/MEDReader/Test/Baselines/testMEDReader15.png and b/src/Plugins/MEDReader/Test/Baselines/testMEDReader15.png differ
index f84b3a27ba67cbc8610ca67a8fb41f72f83c781d..71cbf86794f8e69d513e14bd047652b3c7625007 100644 (file)
Binary files a/src/Plugins/MEDReader/Test/Baselines/testMEDReader20.png and b/src/Plugins/MEDReader/Test/Baselines/testMEDReader20.png differ
index bd87d10582b215bb78eb4a9134446d33459ef1b5..6421dbc33825f66066eb877db508c4cdd315265d 100644 (file)
Binary files a/src/Plugins/MEDReader/Test/Baselines/testMEDReader21.png and b/src/Plugins/MEDReader/Test/Baselines/testMEDReader21.png differ
index c4de85aa2f03de2877be09c0e698c5e3ead3df65..a6df19ec6f4fb747b1cffee07e15124d1c8b7b1f 100644 (file)
Binary files a/src/Plugins/MEDReader/Test/Baselines/testMEDReader7.png and b/src/Plugins/MEDReader/Test/Baselines/testMEDReader7.png differ
index 8ebef2151c75c4926bd147ae36b65033136e87d7..8c29186f60defaa04e19063e4de2b4707942cc98 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2010-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21)
+INCLUDE(tests.set)
+
+IF(NOT SALOME_INSTALL_SCRIPT_SCRIPTS)
+  SET(SALOME_INSTALL_SCRIPT_SCRIPTS "bin/salome")
+ENDIF(NOT SALOME_INSTALL_SCRIPT_SCRIPTS)
 
 SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/MEDReader)
 SET(BASELINES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Baselines")
@@ -107,3 +111,4 @@ ENDFOREACH()
 INSTALL(FILES CTestTestfileInstall.cmake
         DESTINATION ${TEST_INSTALL_DIRECTORY}
         RENAME CTestTestfile.cmake)
+INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
index 214aaf1d58c093f5d225a4393830209c40dfb37e..63061918a61256bedc3e60411f8f36a4b2e931da 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2015-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+INCLUDE(tests.set)
+
 SET(COMPONENT_NAME MEDREADER)
 SET(TIMEOUT        60)
 
-SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)
 set(BASELINES_DIR "Baselines")
 
 FOREACH(tfile ${TEST_NUMBERS})
index 299fe95d6184c58c6f2ae20deb4cec794e914c5e..edb3167673c7ee553a8b01c3f62c0502d6647596 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -132,5 +132,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader0.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index 6462b91fbc7136ab6d91d94a710ff4d5d072659d..d697340bc7a5ee479bede78bb65ba1b868a14e0a 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -120,5 +120,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader10.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index 1ad24fbff01e127be0c382fc82fcb82545112a29..88b77e844f959aae5cc6e4d678f9914fcfb4edc7 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -207,5 +207,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader11.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index 37039e7528e84c72a5de7c1b522af6f77706fc1b..a7b048a2d7829d0596b480ae4637b94f2594ac80 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -104,5 +104,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader12.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index 331b293385fdf7c426250e08feb77eea6b753eb7..01828c39072f52d6e7609f5fb0b7cbe69939088a 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -89,5 +89,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader13.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index 4dfc069078dc1698c65d7646b9ef56db3ee0b518..b9f2aaafa5d0d3ffb7922af3cacee60df3f13355 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -172,5 +172,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader14.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(renderView1.GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index c61b11d82fbab94a7a5185ab3f7422e859f1feda..3902efdefbf627d4d83228cee1f7d5aa983947f2 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -61,14 +61,12 @@ zeNameLUT.VectorMode = 'Component'
 glyph1Display=Show(glyph1,renderView1)
 glyph1Display.ColorArrayName = ['POINTS', 'FamilyIdNode']
 glyph1Display.LookupTable = zeNameLUT
-# show color bar/color legend
-glyph1Display.SetScalarBarVisibility(renderView1, True)
 # set scalar coloring
 ColorBy(glyph1Display, ('POINTS', 'zeName'))
 # rescale color and/or opacity maps used to include current data range
 glyph1Display.RescaleTransferFunctionToDataRange(True)
-# show color bar/color legend
-glyph1Display.SetScalarBarVisibility(renderView1, True)
+# do not show color bar/color legend
+glyph1Display.SetScalarBarVisibility(renderView1, False)
 #
 renderView1.ViewSize =[300,300]
 renderView1.GetRenderWindow().DoubleBufferOff()
@@ -87,5 +85,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader15.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index 25a8a802c6c7253d6e3e3be0fee3bf5b1096e113..d40f56d10280870e99c0561e39d5a1ae7a389bb3 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2015-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -98,6 +98,5 @@ except:
 baseline_file = os.path.join(baselinePath, imgName)
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
-vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file, threshold=25)
+vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file, threshold=1)
 vtk.test.Testing.interact()
-
index e65a9ebb8682ba682409ee3b5aa610515c47ab6f..b2fe089775929631a9e63ca1ad3967ae585f2dca 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -117,5 +117,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader2.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index 7425b9d84949cad98cd20ea983ab72e8352e93c2..3b45a3184a70fe4ea67d3abdc0477ca734fc9ac8 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2016  CEA/DEN, EDF R&D
+# Copyright (C) 2016, 2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -100,8 +100,8 @@ ColorBy(testMEDReader20medDisplay, ('CELLS', 'Field'))
 # rescale color and/or opacity maps used to include current data range
 testMEDReader20medDisplay.RescaleTransferFunctionToDataRange(True)
 
-# show color bar/color legend
-testMEDReader20medDisplay.SetScalarBarVisibility(renderView1, True)
+# do not show color bar/color legend
+testMEDReader20medDisplay.SetScalarBarVisibility(renderView1, False)
 
 # get color transfer function/color map for 'Field'
 fieldLUT = GetColorTransferFunction('Field')
@@ -147,5 +147,5 @@ except:
 baseline_file = os.path.join(baselinePath,png)
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
-vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file, threshold=25)
+vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file, threshold=1)
 vtk.test.Testing.interact()
index 0f71d9e995a8a180de193617d1bd6d2ca29b153e..7da44c990b6668633fc6e8b3be05f144dc494c0d 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2015-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2015-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -67,8 +67,8 @@ renderView1.CameraViewUp = [1.0, 1.0, 0.0]
 # set scalar coloring
 ColorBy(testTotomedDisplay, ('FIELD', 'vtkBlockColors'))
 
-# show color bar/color legend
-testTotomedDisplay.SetScalarBarVisibility(renderView1, True)
+# hide color bar/color legend
+testTotomedDisplay.SetScalarBarVisibility(renderView1, False)
 
 # get color transfer function/color map for 'vtkBlockColors'
 vtkBlockColorsLUT = GetColorTransferFunction('vtkBlockColors')
@@ -135,8 +135,8 @@ glyph1Display.ColorArrayName = ['POINTS', 'MyField']
 glyph1Display.LookupTable = myFieldLUT
 glyph1Display.GlyphType = 'Arrow'
 
-# show color bar/color legend
-glyph1Display.SetScalarBarVisibility(renderView1, True)
+# hide color bar/color legend
+glyph1Display.SetScalarBarVisibility(renderView1, False)
 
 #### saving camera placements for all active views
 
@@ -159,6 +159,5 @@ except:
 baseline_file = os.path.join(baselinePath, imgName)
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
-vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file, threshold=25)
+vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file, threshold=1)
 vtk.test.Testing.interact()
-
index 4c31665c6145e29d9f6a02bb6d5e244c7bb76c2c..ea4d5872f68122d1ed413d560f3e5fc2cae465cd 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -139,5 +139,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader3.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index 44c13925c93d5c52a1bf244838b349592736cf26..9866808318194d11afb2ebc9a82c4f4295b4f405 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -106,5 +106,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader4.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index d509289919b4ba3d912aaccfccfb8e015c599117..5aa23ef604b13ccdc189502abbe5c11d645f99c9 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -123,5 +123,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader5.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index 562bce9cedf5baee4f8d30d2af50ed404304d41c..d5a9d0465c67d0c7da15ac813b94b7f3e9b54a5a 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -108,5 +108,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader6.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index db52bf700b0531047a24bcfbd61ede468fbd88f7..61b5f18233510222576f4a9f681a478da0a9ad22 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -108,5 +108,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader7.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
index 2d50d14d5315b85dc91d87a5e8ead6b0ffcd9aeb..639538c1f6448808a6e8e62e907941e8a374e964 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2017  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -118,5 +118,5 @@ baseline_file = os.path.join(baselinePath, "testMEDReader8.png")
 import vtk.test.Testing
 vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
 vtk.test.Testing.compareImage(GetActiveView().GetRenderWindow(), baseline_file,
-                                                            threshold=25)
+                                                            threshold=1)
 vtk.test.Testing.interact()
diff --git a/src/Plugins/MEDReader/Test/tests.set b/src/Plugins/MEDReader/Test/tests.set
new file mode 100644 (file)
index 0000000..646077d
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright (C) 2017  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# This file declares a shared set of MEDREADER tests, used by two test
+# approaches: "make test" and "salome test". The former is used just after
+# MEDREADER build step, the latter is used from an installed SALOME application.
+#
+# We here initialize a cmake variable that is used, by file inclusion, in
+# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
+# test).
+# This variables is: TEST_NUMBERS.
+# Additional variables might be defined if necessary.
+
+SET(TEST_NUMBERS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21)
index 740c0a78cf767df8d07ca8f068e08a7e2b775a18..56856f752361b3a667a7fc5b7a82b4da8aa0d7a9 100644 (file)
@@ -38,8 +38,9 @@ PROJECT( ParaGEOMCorba )
     TARGET_LINK_LIBRARIES(ParaGEOMCorbaPlugin
       ${OMNIORB_LIBRARIES}
       ${KERNEL_SalomeIDLKernel}
-      ${GUI_SalomeApp}
-         ${GEOM_GEOMClient}
+      ${KERNEL_SalomeLifeCycleCORBA}
+      ${KERNEL_SalomeNS}
+      ${GEOM_GEOMClient}
       ${GEOM_SalomeIDLGEOM}
       ${GEOM_OCC2VTK}
   )
index 5ae91c17cb8caad24f0a124122c0df39db7f5693..16061781bc7454aaecdf4541afb99e6ec1c76bae 100644 (file)
@@ -28,9 +28,9 @@
 #include "vtkInformation.h"
 
 #include <SALOME_LifeCycleCORBA.hxx>
+#include <SALOME_NamingService.hxx>
 #include <TopoDS_Shape.hxx>
 #include "vtkPolyData.h"
-#include <SalomeApp_Application.h>
 #include "GEOM_Gen.hh"
 #include "GEOM_Client.hxx"
 #include "OCC2VTK_Tools.h"
@@ -108,7 +108,8 @@ int vtkParaGEOMCorbaSource::RequestData(vtkInformation* request, vtkInformationV
     GEOM::GEOM_Object_var geomObj = GEOM::GEOM_Object::_narrow(obj);
     
     if(!CORBA::is_nil(geomObj)) {
-      SALOME_LifeCycleCORBA aLCC(SalomeApp_Application::namingService());
+      SALOME_NamingService ns(*OrbC);
+      SALOME_LifeCycleCORBA aLCC(&ns);
       Engines::EngineComponent_var aComponent = aLCC.FindOrLoad_Component("FactoryServer","GEOM");
       GEOM::GEOM_Gen_var geomGen = GEOM::GEOM_Gen::_narrow(aComponent);
       if ( !CORBA::is_nil( geomGen ) ) {
index 96880ae4a379a382e179d85757760d86907fa4d0..11ca52fa7011a9be3d705b9c65c7bd50d953aa3f 100644 (file)
@@ -65,7 +65,6 @@ PROJECT( ParaMEDCorba )
       ${OMNIORB_LIBRARIES}
       ${MED_SalomeIDLMED}
       ${KERNEL_SalomeIDLKernel}
-      ${QT_LIBRARIES}
       )
     TARGET_LINK_LIBRARIES(ParaMEDCorbaPlugin
       ParaMEDMEM2VTK
index 315aa1f7bd8807fb6a30d2e4ece5affa0aae6241..9d0ff02d8a13ef2a8e70b77433048abd4d37f802 100644 (file)
@@ -20,7 +20,6 @@
 #include "vtkParaSMESHCorbaSource.h"
 
 #include <SALOME_LifeCycleCORBA.hxx>
-#include <SalomeApp_Application.h>
 
 #include "vtkStreamingDemandDrivenPipeline.h"
 #include "vtkInformationVector.h"
index fd3ef6e8e724a8d0867572dd188e85b94ff3b98e..a7e60eb5e7873cc708f063bbb6df91473e5c84e0 100644 (file)
@@ -50,9 +50,9 @@ PV_SETUP_MODULE_ENVIRONMENT("vtkSimpleMode")
 
 OPTION(BUILD_SHARED_LIBS "Build with shared libraries." ${VTK_BUILD_SHARED_LIBS})
 
-SET(VTK_INSTALL_RUNTIME_DIR lib)
-SET(VTK_INSTALL_LIBRARY_DIR lib)
-SET(VTK_INSTALL_ARCHIVE_DIR lib)
+SET(VTK_INSTALL_RUNTIME_DIR lib/salome)
+SET(VTK_INSTALL_LIBRARY_DIR lib/salome)
+SET(VTK_INSTALL_ARCHIVE_DIR lib/salome)
 
 PV_PROCESS_MODULES()
 
index 2bd884fe913f18c669428056414fb9dfa76f4069..f683609ee0e880b6675281a82e188314a836f0a4 100644 (file)
@@ -19,5 +19,9 @@
 # Author : Anthony Geay (EDF R&D)
 
 VTK_MODULE_LIBRARY(vtkSimpleMode vtkSimpleMode.cxx)
-TARGET_LINK_LIBRARIES(vtkSimpleMode vtkPVVTKExtensionsRendering vtkFiltersGeneral vtkFiltersCore vtkRenderingOpenGL2 ${PARAVIEW_LIBRARIES})
+IF(${SALOME_GUI_USE_OPENGL2})
+  TARGET_LINK_LIBRARIES(vtkSimpleMode vtkPVVTKExtensionsRendering vtkFiltersGeneral vtkFiltersCore vtkRenderingOpenGL2 ${PARAVIEW_LIBRARIES})
+ELSE()
+  TARGET_LINK_LIBRARIES(vtkSimpleMode vtkPVVTKExtensionsRendering vtkFiltersGeneral vtkFiltersCore vtkRenderingOpenGL ${PARAVIEW_LIBRARIES})
+ENDIF()
 INSTALL(TARGETS vtkSimpleMode RUNTIME DESTINATION lib/salome LIBRARY DESTINATION lib/salome ARCHIVE DESTINATION lib/salome)
index c319c507c8baf42cd822c76d203554893230c3bc..34933557d9abe7f7d1db70b07d5be970b2456a7d 100644 (file)
@@ -28,7 +28,6 @@ import pvsimple
 
 salome.salome_init()
 myStudy = salome.myStudy
-myStudyManager = salome.myStudyManager
 
 data_file = datadir + "TimeStamps.med"
 
@@ -41,11 +40,9 @@ save_file = os.path.join(tmp_dir, "TimeStamps_save.hdf")
 print("Save to file ", save_file)
 
 pvsimple.OpenDataFile(data_file)
-myStudyManager.SaveAs(save_file, myStudy, 0)
-myStudyManager.Close(myStudy)
+myStudy.SaveAs(save_file, 0, 0)
 
-openedStudy = myStudyManager.Open(data_file)
-myStudyManager.Close(openedStudy)
+myStudy.Open(data_file)
 
 os.remove(save_file)
 
index dbfa1ba7e59c554595f34a221852934234f321fe..d754ff0eaaaebf185e901630236487b51962076c 100644 (file)
@@ -42,11 +42,9 @@ import salome
 # run Salome
 #salome_session = SalomeSession()
 salome.salome_init()
-salome.myStudyManager.Close(salome.myStudy)
 
 file_name = os.path.join(os.path.dirname(sys.argv[0]), "test1.hdf")
-opened_study = salome.myStudyManager.Open(file_name)
-salome.myStudy = opened_study
+salome.myStudy.Open(file_name)
 
 # 3. Find IsoSurfaces
 from pvsimple import *