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
# ===================
import GEOM
import salome
from salome.geom import geomBuilder
- geompy = geomBuilder.New(salome.myStudy)
+ geompy = geomBuilder.New()
# create a cloud of points
points = [
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()
<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>
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')
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')
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)
{
-# 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)
#
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)
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}
-# 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")
INSTALL(FILES CTestTestfileInstall.cmake
DESTINATION ${TEST_INSTALL_DIRECTORY}
RENAME CTestTestfile.cmake)
+INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
-# 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})
# -*- 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
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()
# -*- 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
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()
# -*- 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
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()
# -*- 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
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()
# -*- 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
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()
# -*- 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
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()
# -*- 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
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()
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()
# -*- 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
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()
-
# -*- 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
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()
# -*- 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
# 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')
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()
# -*- 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
# 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')
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
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()
-
# -*- 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
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()
# -*- 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
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()
# -*- 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
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()
# -*- 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
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()
# -*- 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
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()
# -*- 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
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()
--- /dev/null
+# 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)
TARGET_LINK_LIBRARIES(ParaGEOMCorbaPlugin
${OMNIORB_LIBRARIES}
${KERNEL_SalomeIDLKernel}
- ${GUI_SalomeApp}
- ${GEOM_GEOMClient}
+ ${KERNEL_SalomeLifeCycleCORBA}
+ ${KERNEL_SalomeNS}
+ ${GEOM_GEOMClient}
${GEOM_SalomeIDLGEOM}
${GEOM_OCC2VTK}
)
#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"
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 ) ) {
${OMNIORB_LIBRARIES}
${MED_SalomeIDLMED}
${KERNEL_SalomeIDLKernel}
- ${QT_LIBRARIES}
)
TARGET_LINK_LIBRARIES(ParaMEDCorbaPlugin
ParaMEDMEM2VTK
#include "vtkParaSMESHCorbaSource.h"
#include <SALOME_LifeCycleCORBA.hxx>
-#include <SalomeApp_Application.h>
#include "vtkStreamingDemandDrivenPipeline.h"
#include "vtkInformationVector.h"
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()
# 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)
salome.salome_init()
myStudy = salome.myStudy
-myStudyManager = salome.myStudyManager
data_file = datadir + "TimeStamps.med"
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)
# 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 *