-# 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
# Ensure a proper linker behavior:
CMAKE_POLICY(SET CMP0003 NEW)
IF(WIN32)
- CMAKE_POLICY(SET CMP0020 OLD) # disable automatic linking to qtmain.lib
+ CMAKE_POLICY(SET CMP0020 OLD) # disable automatic linking to qtmain.lib
ENDIF(WIN32)
# Versioning
##
SET(SALOME_PARAVIS_BUILD_INSITU OFF)
IF(SALOME_PARAVIS_BUILD_PLUGINS)
- # If CORBA plugins required, take in MED module
+ # If CORBA plugins required, take in MED module
IF(SALOME_PARAVIS_BUILD_CORBA_PLUGINS)
SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR} CACHE PATH "Path to the SALOME MED module")
IF(EXISTS ${MED_ROOT_DIR})
ELSE(SALOME_PARAVIS_BUILD_CORBA_PLUGINS)
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")
+ LIST(APPEND CMAKE_MODULE_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files")
ENDIF()
FIND_PACKAGE(SalomeMEDCoupling) # will load MEDFile
SALOME_LOG_OPTIONAL_PACKAGE(MEDCoupling SALOME_PARAVIS_BUILD_PLUGINS)
- ENDIF()
+ ENDIF()
ENDIF(SALOME_PARAVIS_BUILD_PLUGINS)
##
## From GEOM
INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}"
FILE ${PROJECT_NAME}Targets.cmake)
ENDIF()
+
+# Application tests
+INSTALL(FILES CTestTestfileInstall.cmake
+ DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test
+ RENAME CTestTestfile.cmake)
--- /dev/null
+# 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
+# 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
+#
+
+SUBDIRS(MEDReader)
-# 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
#
-ADD_SUBDIRECTORY(VisuPrs)
ADD_SUBDIRECTORY(standalone)
-
-SET(_demo_files
- demo0.py
- demo1.py
- demo2.py
- demo3.py
- demo4.py
- demo5.py
- demo6.py
- demo7.py
- demo8.py
- demo9.py
- demo10.py
- demo11.py
- demo12.py
- demo_14_med.py
- demo_15_med.py
- )
-
-SALOME_INSTALL_SCRIPTS("${_demo_files}" ${SALOME_INSTALL_SCRIPT_PYTHON})
-
-# Application tests
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test
- RENAME CTestTestfile.cmake)
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py")
-
-SET(COMPONENT_NAME PARAVIS)
-SET(TIMEOUT 1000)
-
-SUBDIRS(VisuPrs)
-SUBDIRS(MEDReader)
+++ /dev/null
-configuration, 31872, 63872
-"display lists, no triangle strips, solid color", 5.33782e+06, 1.1648e+07
-"display lists, triangle strips, solid color", 5.29391e+06, 1.11396e+07
-"no display lists, no triangle strips, solid color", 5.94383e+06, 1.10739e+07
-"no display lists, triangle strips, solid color", 5.38415e+06, 1.13332e+07
-"display lists, no triangle strips, color by array", 4.43312e+06, 9.86713e+06
-"display lists, triangle strips, color by array", 5.77079e+06, 1.13502e+07
-"no display lists, no triangle strips, color by array", 5.84816e+06, 1.11314e+07
-"no display lists, triangle strips, color by array", 5.74416e+06, 1.14088e+07
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/2D_viewer/A0 case
-
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Create view
-aXYPlot = CreateXYPlotView()
-Render(aXYPlot)
-
-# Set title
-print("Default chart title ...", aXYPlot.ChartTitle)
-aXYPlot.ChartTitle = 'title of XY plot'
-print("New chart title ...", aXYPlot.ChartTitle)
-
-# Apply custom axes range
-aXYPlot.LeftAxisUseCustomRange = 1
-aXYPlot.BottomAxisUseCustomRange = 1
-
-# Show grids
-aXYPlot.ShowLeftAxisGrid = 1
-aXYPlot.ShowBottomAxisGrid = 1
-
-aMinX = 0
-aMaxX = 100
-aMinY = 0
-aMaxY = 10
-aXYPlot.LeftAxisRangeMinimum = aMinY
-aXYPlot.LeftAxisRangeMaximum = aMaxY
-aXYPlot.BottomAxisRangeMinimum = aMinX
-aXYPlot.BottomAxisRangeMaximum = aMaxX
-
-# Set horizontal scaling for left and bottom axis
-print("Default logarithmic scaling ... left = %s, bottom = %s" % ( aXYPlot.LeftAxisLogScale, aXYPlot.BottomAxisLogScale ))
-# Set logarithmic scaling
-aXYPlot.LeftAxisLogScale = 1
-aXYPlot.BottomAxisLogScale = 1
-print("Set logarithmic scaling ... left = %s, bottom = %s" % ( aXYPlot.LeftAxisLogScale, aXYPlot.BottomAxisLogScale ))
-# Set linear scaling
-aXYPlot.LeftAxisLogScale = 0
-aXYPlot.BottomAxisLogScale = 0
-print("Set linear scaling ... left = %s, bottom = %s" % ( aXYPlot.LeftAxisLogScale, aXYPlot.BottomAxisLogScale ))
-
-# Axis titles
-print("Default title of the left axis ...", aXYPlot.LeftAxisTitle)
-aXYPlot.LeftAxisTitle = "Ytitle of XY plot"
-print("New title of the left axis ...", aXYPlot.LeftAxisTitle)
-print("Default title of the bottom axis ...", aXYPlot.BottomAxisTitle)
-aXYPlot.BottomAxisTitle = "Xtitle of XY plot"
-print("New title of the bottom axis ...", aXYPlot.BottomAxisTitle)
-
-# Show/hide legend
-aXYPlot.ShowLegend = 1
-aXYPlot.ShowLegend = 0
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/2D_viewer/A1 case
-
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Create view
-aXYPlot = CreateXYPlotView()
-Render(aXYPlot)
-
-error = 0
-
-# Apply custom axes range
-Etvalue = (1, 1, 1, 1)
-aXYPlot.LeftAxisUseCustomRange, aXYPlot.BottomAxisUseCustomRange, aXYPlot.RightAxisUseCustomRange, aXYPlot.TopAxisUseCustomRange = 1, 1, 1, 1
-Ranges = aXYPlot.LeftAxisUseCustomRange, aXYPlot.BottomAxisUseCustomRange, aXYPlot.RightAxisUseCustomRange, aXYPlot.TopAxisUseCustomRange
-error = error + test_values(Ranges, Etvalue)
-
-# Set custom axes range
-aXYPlot.LeftAxisUseCustomRange = 1
-aXYPlot.BottomAxisUseCustomRange = 1
-
-# Left axis range
-Etvalue = (200., 800.)
-aXYPlot.LeftAxisRangeMinimum, aXYPlot.LeftAxisRangeMaximum = Etvalue
-Ranges = aXYPlot.LeftAxisRangeMinimum, aXYPlot.LeftAxisRangeMaximum
-error = error + test_values(Ranges, Etvalue)
-
-# Bottom axis range
-Etvalue = (350., 750.)
-aXYPlot.BottomAxisRangeMinimum, aXYPlot.BottomAxisRangeMaximum = Etvalue
-Ranges = aXYPlot.BottomAxisRangeMinimum, aXYPlot.BottomAxisRangeMaximum
-error = error + test_values(Ranges, Etvalue)
-
-# Right axis range
-Etvalue = (0., 300.)
-aXYPlot.RightAxisRangeMinimum, aXYPlot.RightAxisRangeMaximum = Etvalue
-Ranges = aXYPlot.RightAxisRangeMinimum, aXYPlot.RightAxisRangeMaximum
-error = error + test_values(Ranges, Etvalue)
-
-# Top axis range
-Etvalue = (100., 450.)
-aXYPlot.TopAxisRangeMinimum, aXYPlot.TopAxisRangeMaximum = Etvalue
-Ranges = aXYPlot.TopAxisRangeMinimum, aXYPlot.TopAxisRangeMaximum
-error = error + test_values(Ranges, Etvalue)
-
-if error > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME 2DVIEWER_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/2D_viewer)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" 2DVIEWER BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" 2DVIEWER EXTRA)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A0)
-
-SET(EXTRA_TESTS A1)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/3D_viewer/A1 case
-# Create 3D Viewer and test set view properties for Plot 3D presentation
-# Author: POLYANSKIKH VERA
-from paravistest import *
-from presentations import *
-from pvsimple import *
-import sys
-import time
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("3D_viewer/A1")
-
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Get view
-my_view = GetRenderView()
-reset_view(my_view)
-Render(my_view)
-
-file_name = datadir + "fra.med"
-print(" --------------------------------- ")
-print("file ", file_name)
-print(" --------------------------------- ")
-
-OpenDataFile(file_name)
-proxy = GetActiveSource()
-if proxy is None:
- raise RuntimeError("Error: can't import file.")
-else:
- print("OK")
-
-represents = [RepresentationType.POINTS, RepresentationType.WIREFRAME,\
-RepresentationType.SURFACE, RepresentationType.VOLUME]
-shrinks = [0, 1]
-shadings = ["Flat", "Gouraud"]
-opacities = [1.0, 0.5, 0.0]
-linewidths = [1.0, 3.0, 10.0]
-compare_prec = 0.00001
-
-field_name = 'VITESSE'
-
-# Get view
-my_view = GetRenderView()
-
-print("\nCreating plot3d.......")
-plot3d = Plot3DOnField(proxy, EntityType.NODE, field_name, 1)
-if plot3d is None:
- raise RuntimeError("Error!!! Presentation wasn't created...")
-
-display_only(plot3d, my_view)
-reset_view(my_view)
-Render(my_view)
-
-print("\nChange Presentation Parameters...")
-
-for reprCode in represents:
- repr = RepresentationType.get_name(reprCode)
- if reprCode == RepresentationType.VOLUME:
- is_good = call_and_check(plot3d, "Representation", repr, 0)
- if is_good:
- msg = "VOLUME representation must be not available for Plot 3D"
- raise RuntimeError(msg)
- else:
- call_and_check(plot3d, "Representation", repr, 1)
-
- for sha in shadings:
- setShaded(my_view, sha)
- call_and_check(plot3d, "Interpolation", sha, 1)
- Render(my_view)
-
- for opa in opacities:
- call_and_check(plot3d, "Opacity", opa, 1, compare_prec)
-
- for lwi in linewidths:
- call_and_check(plot3d, "LineWidth", lwi, 1, compare_prec)
- time.sleep(1)
-
- # save picture in file
- # Construct image file name
- base_name = "params_" + repr.replace(' ', '_') + "_any_" + \
- str(sha) + "_" + str(opa) + "_" + str(lwi) + "." + pictureext
- pic_name = os.path.join(picturedir, base_name)
- # Show and record the presentation
- process_prs_for_test(plot3d, my_view, pic_name)
-
- # Compare to baseline
- current_dir = os.path.dirname(os.path.realpath(__file__))
- baseline = os.path.join(current_dir, "_refs", base_name)
- compare_view_to_ref_image(my_view, baseline, threshold=1)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/3D_viewer/A2 case
-# Create 3D Viewer and test set view properties for Vectors presentation
-# Author: POLYANSKIKH VERA
-from paravistest import *
-from presentations import *
-from pvsimple import *
-import sys
-import time
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("3D_viewer/A2")
-
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Get view
-my_view = GetRenderView()
-reset_view(my_view)
-Render(my_view)
-
-file_name = datadir + "Penta6.med"
-print(" --------------------------------- ")
-print("file ", file_name)
-print(" --------------------------------- ")
-
-OpenDataFile(file_name)
-proxy = GetActiveSource()
-if proxy is None:
- raise RuntimeError("Error: can't import file.")
-else:
- print("OK")
-
-represents = [RepresentationType.POINTS, RepresentationType.WIREFRAME,\
-RepresentationType.SURFACE, RepresentationType.VOLUME]
-shrinks = [0, 1]
-shadings = ["Flat", "Gouraud"]
-opacities = [1.0, 0.5, 0.0]
-linewidths = [1.0, 3.0, 10.0]
-compare_prec = 0.00001
-
-field_name = 'vectoriel field'
-
-print("\nCreating Vectors.......", end=' ')
-vectors = VectorsOnField(proxy, EntityType.CELL, field_name, 1,
- is_colored=True, glyph_type="Cone")
-if vectors is None:
- raise RuntimeError("Error!!! Presentation wasn't created...")
-
-display_only(vectors, my_view)
-reset_view(my_view)
-Render(my_view)
-
-print("\nChange Presentation Parameters...")
-
-for reprCode in represents:
- repr = RepresentationType.get_name(reprCode)
- if reprCode == RepresentationType.VOLUME:
- is_good = call_and_check(vectors, "Representation", repr, 0)
- if is_good:
- msg = "VOLUME representation must be not available for Vectors"
- raise RuntimeError(msg)
- else:
- call_and_check(vectors, "Representation", repr, 1)
-
- for sha in shadings:
- call_and_check(vectors, "Interpolation", sha, 1)
- setShaded(my_view, sha)
- Render(my_view)
- time.sleep(1)
-
- # save picture in file
- # Construct image file name
- pic_name = picturedir + "params_" + repr.replace(' ', '_') + "_any_" + \
- str(sha) + "." + pictureext
- # Show and record the presentation
- process_prs_for_test(vectors, my_view, pic_name)
-
-for opa in opacities:
- call_and_check(vectors, "Opacity", opa, 1, compare_prec)
-
-for lwi in linewidths:
- call_and_check(vectors, "LineWidth", lwi, 1, compare_prec)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/3D_viewer/A3 case
-# Create 3D Viewer and test set view properties for Stream Lines presentation
-# Author: POLYANSKIKH VERA
-from paravistest import *
-from presentations import *
-from pvsimple import *
-import sys
-import time
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("3D_viewer/A3")
-
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Get view
-my_view = GetRenderView()
-reset_view(my_view)
-Render(my_view)
-
-file_name = datadir + "Penta6.med"
-print(" --------------------------------- ")
-print("file ", file_name)
-print(" --------------------------------- ")
-
-OpenDataFile(file_name)
-#reader = OpenDataFile(file_name)
-#reader = MEDReader(FileName=file_name)
-#keys = reader.GetProperty("FieldsTreeInfo")[::2]
-#reader.AllArrays = [keys[0]]
-#SetActiveSource(reader)
-
-#reader.UpdatePipelineInformation()
-#from paraview import servermanager
-#res = servermanager.Fetch(reader,0)
-#print res
-
-proxy = GetActiveSource()
-if proxy is None:
- raise RuntimeError("Error: can't import file.")
-else:
- print("OK")
-
-represents = [RepresentationType.POINTS, RepresentationType.WIREFRAME,\
-RepresentationType.SURFACE, RepresentationType.VOLUME]
-
-shrinks = [0, 1]
-shadings = ["Flat", "Gouraud"]
-opacities = [1.0, 0.5, 0.0]
-linewidths = [1.0, 3.0, 10.0]
-compare_prec = 0.00001
-
-field_name = 'vectoriel field'
-
-print("\nCreating stream_lines.......")
-stream_lines = StreamLinesOnField(proxy, EntityType.CELL,
- field_name, 1, is_colored=True)
-stream_tracer = stream_lines.Input
-print("stream_tracer:", stream_tracer)
-#stream_tracer.Input = None
-stream_tracer.InitialStepLength = 0.00940275
-stream_tracer.MaximumStreamlineLength = 140.373
-stream_tracer.MaximumStepLength = 0.5319
-stream_tracer.MinimumStepLength = 0.5319
-stream_tracer.UpdatePipeline()
-
-if stream_lines is None:
- raise RuntimeError("Error!!! Presentation wasn't created...")
-
-display_only(stream_lines, my_view)
-reset_view(my_view)
-Render(my_view)
-
-print("\nChange Presentation Parameters...")
-
-for reprCode in represents:
- repr = RepresentationType.get_name(reprCode)
- if reprCode == RepresentationType.VOLUME:
- is_good = call_and_check(stream_lines, "Representation", repr, 0)
- if is_good:
- msg = "VOLUME representation must be not available for streamlines"
- raise RuntimeError(msg)
- else:
- call_and_check(stream_lines, "Representation", repr, 1)
-
- for sha in shadings:
- setShaded(my_view, sha)
- call_and_check(stream_lines, "Interpolation", sha, 1)
- Render(my_view)
- time.sleep(1)
-
- for lwi in linewidths:
- call_and_check(stream_lines, "LineWidth", lwi, 1, compare_prec)
- # save picture in file
- # Construct image file name
- pic_name = picturedir + "params_" + repr.replace(' ', '_') + "_any_" + \
- str(sha) + "_" + str(lwi) + "." + pictureext
- # Show and record the presentation
- process_prs_for_test(stream_lines, my_view, pic_name)
-
-for opa in opacities:
- call_and_check(stream_lines, "Opacity", opa, 1, compare_prec)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/3D_viewer/A4 case
-# Create 3D Viewer and test set view properties for Iso Surface presentation
-# Author: POLYANSKIKH VERA
-from paravistest import *
-from presentations import *
-from pvsimple import *
-import sys
-import time
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("3D_viewer/A4")
-
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Get view
-my_view = GetRenderView()
-reset_view(my_view)
-Render(my_view)
-
-file_name = datadir + "hydro_sea_alv.med"
-print(" --------------------------------- ")
-print("file ", file_name)
-print(" --------------------------------- ")
-
-OpenDataFile(file_name)
-proxy = GetActiveSource()
-if proxy is None:
- raise RuntimeError("Error: can't import file.")
-else:
- print("OK")
-
-represents = [RepresentationType.POINTS, RepresentationType.WIREFRAME,\
-RepresentationType.SURFACE, RepresentationType.VOLUME]
-shrinks = [0, 1]
-shadings = ["Flat", "Gouraud"]
-opacities = [1.0, 0.5, 0.0]
-linewidths = [1.0, 3.0, 10.0]
-compare_prec = 0.00001
-
-field_name = 'Head'
-
-print("\nCreating iso surface.......", end=' ')
-iso_surf = IsoSurfacesOnField(proxy, EntityType.CELL, field_name, 1)
-if iso_surf is None:
- raise RuntimeError("Error!!! Presentation wasn't created...")
-
-display_only(iso_surf, my_view)
-reset_view(my_view)
-Render(my_view)
-
-print("\nChange Presentation Parameters...")
-
-for reprCode in represents:
- repr = RepresentationType.get_name(reprCode)
- if reprCode == RepresentationType.VOLUME:
- is_good = call_and_check(iso_surf, "Representation", repr, 0)
- if is_good:
- msg = "VOLUME representation must be not available for Iso Surface"
- raise RuntimeError(msg)
- else:
- call_and_check(iso_surf, "Representation", repr, 1)
-
- for sha in shadings:
- setShaded(my_view, sha)
- call_and_check(iso_surf, "Interpolation", sha, 1)
- Render(my_view)
-
- for opa in opacities:
- call_and_check(iso_surf, "Opacity", opa, 1, compare_prec)
-
- for lwi in linewidths:
- call_and_check(iso_surf, "LineWidth", lwi, 1, compare_prec)
- time.sleep(1)
-
- # save picture in file
- # Construct image file name
- pic_name = picturedir + "params_" + repr.replace(' ', '_') + "_any_" + \
- str(sha) + "_" + str(opa) + "_" + str(lwi) + "." + pictureext
-
- # Show and record the presentation
- process_prs_for_test(iso_surf, my_view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/3D_viewer/A5 case
-# Create 3D Viewer and test set view properties for Deformed Shape presentation
-# Author: POLYANSKIKH VERA
-from paravistest import *
-from presentations import *
-from pvsimple import *
-import sys
-import time
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("3D_viewer/A5")
-
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Get view
-my_view = GetRenderView()
-reset_view(my_view)
-Render(my_view)
-
-file_name = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", file_name)
-print(" --------------------------------- ")
-
-OpenDataFile(file_name)
-proxy = GetActiveSource()
-if proxy is None:
- raise RuntimeError("Error: can't import file.")
-else:
- print("OK")
-
-represents = [RepresentationType.POINTS, RepresentationType.WIREFRAME,\
-RepresentationType.SURFACE, RepresentationType.VOLUME]
-shrinks = [0, 1]
-shadings = ["Flat", "Gouraud"]
-opacities = [1.0, 0.5, 0.0]
-linewidths = [1.0, 3.0, 10.0]
-compare_prec = 0.00001
-shrink_filter = None
-shrinked_ds = None
-
-field_name = 'fieldcelldouble'
-
-print("\nCreating deformed shape.......", end=' ')
-ds = DeformedShapeOnField(proxy, EntityType.CELL,
-field_name, 1, scale_factor=0.5, is_colored=True)
-if ds is None:
- raise RuntimeError("Error!!! Presentation wasn't created...")
-
-display_only(ds, my_view)
-reset_view(my_view)
-Render(my_view)
-
-print("\nChange Presentation Parameters...")
-
-
-for reprCode in represents:
- repr = RepresentationType.get_name(reprCode)
- call_and_check(ds, "Representation", repr, 1)
- for shr in shrinks:
- if shr > 0 and reprCode != RepresentationType.POINTS:
- if shrinked_ds is None:
- ds.Visibility = 1
- shrink_filter = Shrink(ds.Input)
- shrink_filter.ShrinkFactor = 0.8
- shrink_filter.UpdatePipeline()
- shrinked_ds = GetRepresentation(shrink_filter)
- shrinked_ds.ColorArrayName = ds.ColorArrayName[0:2]
- shrinked_ds.LookupTable = ds.LookupTable
- ds.Visibility = 0
- shrinked_ds.Representation = ds.Representation
- shape_to_show = shrinked_ds
- else:
- if shrinked_ds is not None:
- shrinked_ds.Visibility = 0
- shape_to_show = ds
- shape_to_show.Visibility = 1
- Render(my_view)
-
- for sha in shadings:
- setShaded(my_view, sha)
- call_and_check(shape_to_show, "Interpolation", sha, 1)
- Render(my_view)
-
- for opa in opacities:
- call_and_check(shape_to_show, "Opacity", opa, 1, compare_prec)
-
- for lwi in linewidths:
- call_and_check(shape_to_show, "LineWidth", lwi, 1,
- compare_prec)
-
- time.sleep(1)
- # save picture in file
- # Construct image file name
- pic_name = picturedir + "params_" + repr.replace(' ', '_') + "_" + str(shr) + "_" + \
- str(sha) + "_" + str(opa) + "_" + str(lwi) + "." + pictureext
- # Show and record the presentation
- WriteImage(pic_name, view=my_view, Magnification=1)
- pass
- pass
- pass
- pass
- pass
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/3D_viewer/A6 case
-# Create 3D Viewer and test set view properties for Scalar Map on
-# Deformed Shape presentation
-# Author: POLYANSKIKH VERA
-from paravistest import *
-from presentations import *
-from pvsimple import *
-import sys
-import time
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("3D_viewer/A6")
-
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Get view
-my_view = GetRenderView()
-reset_view(my_view)
-Render(my_view)
-
-file_name = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", file_name)
-print(" --------------------------------- ")
-
-OpenDataFile(file_name)
-proxy = GetActiveSource()
-if proxy is None:
- raise RuntimeError("Error: can't import file.")
-else:
- print("OK")
-
-represents = [RepresentationType.POINTS, RepresentationType.WIREFRAME,
-RepresentationType.SURFACE, RepresentationType.VOLUME]
-shrinks = [0, 1]
-shadings = ["Flat", "Gouraud"]
-opacities = [1.0, 0.5, 0.0]
-linewidths = [1.0, 3.0, 10.0]
-compare_prec = 0.00001
-shrink_filter = None
-shr_sm_on_ds = None
-
-field_name = 'fieldcelldouble'
-
-print("\nCreating scalar map on deformed shape.......", end=' ')
-sm_on_ds = DeformedShapeAndScalarMapOnField(proxy, EntityType.CELL,
-field_name, 1, scale_factor=0.2)
-if sm_on_ds is None:
- raise RuntimeError("Error!!! Presentation wasn't created...")
-
-display_only(sm_on_ds, my_view)
-reset_view(my_view)
-Render(my_view)
-
-print("\nChange Presentation Parameters...")
-
-
-for reprCode in represents:
- repr = RepresentationType.get_name(reprCode)
- call_and_check(sm_on_ds, "Representation", repr, 1)
- for shr in shrinks:
- if shr > 0 and reprCode != RepresentationType.POINTS:
- if shr_sm_on_ds is None:
- sm_on_ds.Visibility = 1
- shrink_filter = Shrink(sm_on_ds.Input)
- shrink_filter.ShrinkFactor = 0.8
- shrink_filter.UpdatePipeline()
- shr_sm_on_ds = GetRepresentation(shrink_filter)
- shr_sm_on_ds.ColorArrayName = sm_on_ds[0:2]
- shr_sm_on_ds.LookupTable = sm_on_ds.LookupTable
- sm_on_ds.Visibility = 0
- shr_sm_on_ds.Representation = sm_on_ds.Representation
- shape_to_show = shr_sm_on_ds
- else:
- if shr_sm_on_ds is not None:
- shr_sm_on_ds.Visibility = 0
- shape_to_show = sm_on_ds
- shape_to_show.Visibility = 1
- Render(my_view)
-
- for sha in shadings:
- setShaded(my_view, sha)
- call_and_check(shape_to_show, "Interpolation", sha, 1)
- Render(my_view)
-
- for opa in opacities:
- call_and_check(shape_to_show, "Opacity", opa, 1, compare_prec)
-
- for lwi in linewidths:
- call_and_check(shape_to_show, "LineWidth", lwi, 1,
- compare_prec)
-
- time.sleep(1)
- # save picture in file
- # Construct image file name
- pic_name = picturedir + "params_" + repr.replace(' ', '_') + "_" + str(shr) + "_" + \
- str(sha) + "_" + str(opa) + "_" + str(lwi) + "." + pictureext
- # Show and record the presentation
- WriteImage(pic_name, view=my_view, Magnification=1)
- pass
- pass
- pass
- pass
- pass
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/3D_viewer/A7 case
-# Create 3D Viewer and test set view properties for CutPlanes presentation
-# Author: POLYANSKIKH VERA
-from paravistest import *
-from presentations import *
-from pvsimple import *
-import sys
-import time
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("3D_viewer/A7")
-
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Get view
-my_view = GetRenderView()
-reset_view(my_view)
-Render(my_view)
-
-file_name = datadir + "Tetra4.med"
-print(" --------------------------------- ")
-print("file ", file_name)
-print(" --------------------------------- ")
-
-OpenDataFile(file_name)
-proxy = GetActiveSource()
-if proxy is None:
- raise RuntimeError("Error: can't import file.")
-else:
- print("OK")
-
-represents = [RepresentationType.POINTS, RepresentationType.WIREFRAME,\
-RepresentationType.SURFACE, RepresentationType.VOLUME]
-shrinks = [0, 1]
-shadings = ["Flat", "Gouraud"]
-opacities = [1.0, 0.5, 0.0]
-linewidths = [1.0, 3.0, 10.0]
-compare_prec = 0.00001
-
-field_name = 'scalar field'
-
-print("\nCreating cut planes.......", end=' ')
-cut_planes = CutPlanesOnField(proxy, EntityType.CELL, field_name, 1,
-nb_planes=10, orientation=Orientation.YZ, displacement=0.5)
-if cut_planes is None:
- raise RuntimeError("Error!!! Presentation wasn't created...")
-
-display_only(cut_planes, my_view)
-reset_view(my_view)
-Render(my_view)
-
-print("\nChange Presentation Parameters...")
-
-for reprCode in represents:
- repr = RepresentationType.get_name(reprCode)
- if reprCode == RepresentationType.VOLUME:
- is_good = call_and_check(cut_planes, "Representation", repr, 0)
- if is_good:
- msg = "VOLUME representation must be not available for Iso Surface"
- raise RuntimeError(msg)
- else:
- call_and_check(cut_planes, "Representation", repr, 1)
-
- for sha in shadings:
- setShaded(my_view, sha)
- call_and_check(cut_planes, "Interpolation", sha, 1)
- Render(my_view)
-
- for opa in opacities:
- call_and_check(cut_planes, "Opacity", opa, 1, compare_prec)
-
- for lwi in linewidths:
- call_and_check(cut_planes, "LineWidth", lwi, 1,
- compare_prec)
- time.sleep(1)
-
- # save picture in file
- # Construct image file name
- pic_name = picturedir + "params_" + repr.replace(' ', '_') + "_any_" + \
- str(sha) + "_" + str(opa) + "_" + str(lwi) + "." + pictureext
- # Show and record the presentation
- process_prs_for_test(cut_planes, my_view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/3D_viewer/A8 case
-# Create 3D Viewer and test set view properties for Cut Lines presentation
-# Author: POLYANSKIKH VERA
-from paravistest import *
-from presentations import *
-from pvsimple import *
-import sys
-import time
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("3D_viewer/A8")
-
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Get view
-my_view = GetRenderView()
-reset_view(my_view)
-Render(my_view)
-
-file_name = datadir + "Tetra4.med"
-print(" --------------------------------- ")
-print("file ", file_name)
-print(" --------------------------------- ")
-
-OpenDataFile(file_name)
-proxy = GetActiveSource()
-if proxy is None:
- raise RuntimeError("Error: can't import file.")
-else:
- print("OK")
-
-represents = [RepresentationType.POINTS, RepresentationType.WIREFRAME,\
-RepresentationType.SURFACE, RepresentationType.VOLUME]
-shrinks = [0, 1]
-shadings = ["Flat", "Gouraud"]
-opacities = [1.0, 0.5, 0.0]
-linewidths = [1.0, 3.0, 10.0]
-compare_prec = 0.00001
-
-field_name = 'scalar field'
-
-print("\nCreating cut lines.......", end=' ')
-cut_lines = CutLinesOnField(proxy, EntityType.CELL, field_name, 1,
- nb_lines=10,
- orientation1=Orientation.ZX,
- orientation2=Orientation.XY,
- displacement1=0.5, displacement2=0.5)
-if cut_lines is None:
- raise RuntimeError("Error!!! Presentation wasn't created...")
-
-display_only(cut_lines, my_view)
-reset_view(my_view)
-Render(my_view)
-
-print("\nChange Presentation Parameters...")
-
-for reprCode in represents:
- repr = RepresentationType.get_name(reprCode)
- if reprCode == RepresentationType.VOLUME:
- is_good = call_and_check(cut_lines, "Representation", repr, 0)
- if is_good:
- msg = "VOLUME representation must be not available for Iso Surface"
- raise RuntimeError(msg)
- else:
- call_and_check(cut_lines, "Representation", repr, 1)
-
- for sha in shadings:
- setShaded(my_view, sha)
- call_and_check(cut_lines, "Interpolation", sha, 1)
- Render(my_view)
-
- for opa in opacities:
- call_and_check(cut_lines, "Opacity", opa, 1, compare_prec)
-
- for lwi in linewidths:
- call_and_check(cut_lines, "LineWidth", lwi, 1,
- compare_prec)
-
- time.sleep(1)
-
- # save picture in file
- # Construct image file name
- pic_name = picturedir + "params_" + repr.replace(' ', '_') + "_any_" + \
- str(sha) + "_" + str(opa) + "_" + str(lwi) + "." + pictureext
- # Show and record the presentation
- process_prs_for_test(cut_lines, my_view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/3D_viewer/A9 case
-# Create 3D Viewer and test set view properties for Deformed Shape presentation
-# Author: POLYANSKIKH VERA
-from paravistest import *
-from presentations import *
-from pvsimple import *
-import sys
-import time
-
-def check_value(prs, property_name, value, do_raise=1, compare_toler=-1.0):
- # compare just set value and the one got from presentation
- really_set_value = prs.GetPropertyValue(property_name)
- is_equal = 1
- if compare_toler > 0:
- is_equal = (fabs(really_set_value - value) < compare_toler)
- else:
- is_equal = (really_set_value == value)
- if not is_equal:
- msg = str(really_set_value) + " has been set instead"
- if do_raise:
- raise RuntimeError(msg)
- else:
- print (msg)
-
- return (not is_equal)
-
-
-def check_all_params(prs, pres_type, shad, opac, lwid):
- err = check_value(prs, "Representation", pres_type, 0, -1.0)
- err = err + check_value(prs, "Interpolation", shad, 0, -1.0)
- err = err + check_value(prs, "Opacity", opac, 0, compare_prec)
- err = err + check_value(prs, "LineWidth", lwid, 0, compare_prec)
- return err
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("3D_viewer/A9")
-
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Get view
-my_view = GetRenderView()
-reset_view(my_view)
-Render(my_view)
-
-theFileName = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-proxy = GetActiveSource()
-if proxy is None:
- raise RuntimeError("Error: can't import file.")
-else:
- print("OK")
-
-field_name = 'fieldcelldouble'
-
-print("\nCreating scalar_map.......", end=' ')
-scalar_map = ScalarMapOnField(proxy, EntityType.CELL, field_name, 1)
-if scalar_map is None:
- raise RuntimeError("Error!!! Presentation wasn't created...")
-
-display_only(scalar_map, my_view)
-reset_view(my_view)
-Render(my_view)
-
-compare_prec = 0.00001
-
-print("\nChange Presentation Parameters...")
-# Group 1 (SHADED)
-
-print("\nCheck in SURFACE:")
-
-call_and_check(scalar_map, "Representation",
-RepresentationType.get_name(RepresentationType.SURFACE))
-shrink_filter = Shrink(scalar_map.Input)
-shrink_filter.ShrinkFactor = 0.8
-shrink_filter.UpdatePipeline()
-shrinked_scalar_map = GetRepresentation(shrink_filter)
-shrinked_scalar_map.ColorArrayName = (EntityType.get_pvtype(EntityType.CELL), field_name)
-shrinked_scalar_map.Representation = scalar_map.Representation
-lookup_table = scalar_map.LookupTable
-shrinked_scalar_map.LookupTable = lookup_table
-scalar_map.Visibility = 0
-shrinked_scalar_map.Visibility = 1
-Render(my_view)
-
-shape_to_show = shrinked_scalar_map
-setShaded(my_view, 1)
-call_and_check(shape_to_show, "Interpolation", "Gouraud")
-Render(my_view)
-call_and_check(shape_to_show, "Opacity", 0.8, 1, compare_prec)
-call_and_check(shape_to_show, "LineWidth", 5.0, 1, compare_prec)
-
-time.sleep(1)
-
-# save picture in file
-# Construct image file name
-pic_name = picturedir + "params_SURFACE_1." + pictureext
-# Show and record the presentation
-process_prs_for_test(shape_to_show, my_view, pic_name)
-
-
-call_and_check(shape_to_show, "Representation",
-RepresentationType.get_name(RepresentationType.WIREFRAME))
-call_and_check(shape_to_show, "Representation",
-RepresentationType.get_name(RepresentationType.SURFACE))
-
-time.sleep(1)
-picture_name = picturedir + "params_SURFACE_2." + pictureext
-
-# save picture in file
-# Construct image file name
-pic_name = picturedir + "params_SURFACE_2." + pictureext
-# Show and record the presentation
-process_prs_for_test(shape_to_show, my_view, pic_name)
-
-err = check_all_params(shape_to_show,
-RepresentationType.get_name(RepresentationType.SURFACE), "Gouraud", 0.8, 5.0)
-
-##call_and_check(scalar_map, "Shrinked", 0, "Shrinked")
-##call_and_check(scalar_map, "Shrinked", 1, "Shrinked")
-
-time.sleep(1)
-
-# save picture in file
-# Construct image file name
-pic_name = picturedir + "params_SURFACE_3." + pictureext
-# Show and record the presentation
-process_prs_for_test(shape_to_show, my_view, pic_name)
-
-err = err + check_all_params(shape_to_show,
-RepresentationType.get_name(RepresentationType.SURFACE), "Gouraud", 0.8, 5.0)
-
-call_and_check(shape_to_show, "Interpolation", "Flat")
-call_and_check(shape_to_show, "Interpolation", "Gouraud")
-
-time.sleep(1)
-
-# save picture in file
-# Construct image file name
-pic_name = picturedir + "params_SURFACE_4." + pictureext
-# Show and record the presentation
-process_prs_for_test(shape_to_show, my_view, pic_name)
-
-err = err + check_all_params(shape_to_show,
-RepresentationType.get_name(RepresentationType.SURFACE), "Gouraud", 0.8, 5.0)
-
-call_and_check(shape_to_show, "Opacity", 1.0, 1, compare_prec)
-call_and_check(shape_to_show, "Opacity", 0.8, 1, compare_prec)
-
-time.sleep(1)
-
-# save picture in file
-# Construct image file name
-pic_name = picturedir + "params_SURFACE_5." + pictureext
-# Show and record the presentation
-process_prs_for_test(shape_to_show, my_view, pic_name)
-
-err = err + check_all_params(shape_to_show,
-RepresentationType.get_name(RepresentationType.SURFACE), "Gouraud", 0.8, 5.0)
-
-# Reset
-##call_and_check(shape_to_show, "Shrinked", 0, "Shrinked")
-setShaded(my_view, 0)
-call_and_check(shape_to_show, "Interpolation", "Flat",)
-Render(my_view)
-call_and_check(shape_to_show, "Opacity", 1.0, 1, compare_prec)
-call_and_check(shape_to_show, "LineWidth", 1.0, 1, compare_prec)
-
-# Group 2 (WIREFRAME)
-hide_all(my_view)
-print("\nCheck in WIREFRAME:")
-scalar_map.Visibility = 1
-call_and_check(scalar_map, "Representation",
-RepresentationType.get_name(RepresentationType.WIREFRAME), "Representation")
-shrink_filter = Shrink(scalar_map.Input)
-shrink_filter.ShrinkFactor = 0.8
-shrink_filter.UpdatePipeline()
-shrinked_scalar_map = GetRepresentation(shrink_filter)
-shrinked_scalar_map.ColorArrayName = (EntityType.get_pvtype(EntityType.CELL), field_name)
-shrinked_scalar_map.Representation = scalar_map.Representation
-lookup_table = scalar_map.LookupTable
-shrinked_scalar_map.LookupTable = lookup_table
-scalar_map.Visibility = 0
-shrinked_scalar_map.Visibility = 1
-shape_to_show = shrinked_scalar_map
-
-setShaded(my_view, 1)
-call_and_check(shape_to_show, "Interpolation", "Gouraud")
-Render(my_view)
-call_and_check(shape_to_show, "Opacity", 0.8, 1, compare_prec)
-call_and_check(shape_to_show, "LineWidth", 5.0, 1, compare_prec)
-
-time.sleep(1)
-
-# save picture in file
-# Construct image file name
-pic_name = picturedir + "params_WIREFRAME_1." + pictureext
-# Show and record the presentation
-process_prs_for_test(shape_to_show, my_view, pic_name)
-
-
-call_and_check(shape_to_show, "Representation",
-RepresentationType.get_name(RepresentationType.SURFACE))
-call_and_check(shape_to_show, "Representation",
-RepresentationType.get_name(RepresentationType.WIREFRAME))
-
-time.sleep(1)
-# save picture in file
-# Construct image file name
-pic_name = picturedir + "params_WIREFRAME_2." + pictureext
-# Show and record the presentation
-process_prs_for_test(shape_to_show, my_view, pic_name)
-
-err = err + check_all_params(shape_to_show,
-RepresentationType.get_name(RepresentationType.WIREFRAME), "Gouraud", 0.8, 5.0)
-
-##call_and_check(shape_to_show, "Shrinked", 0)
-##call_and_check(shape_to_show, "Shrinked", 1)
-
-time.sleep(1)
-# save picture in file
-# Construct image file name
-pic_name = picturedir + "params_WIREFRAME_3." + pictureext
-# Show and record the presentation
-process_prs_for_test(shrinked_scalar_map, my_view, pic_name)
-
-err = err + check_all_params(shape_to_show,
-RepresentationType.get_name(RepresentationType.WIREFRAME), "Gouraud", 0.8, 5.0)
-
-call_and_check(shape_to_show, "Interpolation", "Flat")
-call_and_check(shape_to_show, "Interpolation", "Gouraud")
-
-time.sleep(1)
-# save picture in file
-# Construct image file name
-pic_name = picturedir + "params_WIREFRAME_4." + pictureext
-# Show and record the presentation
-process_prs_for_test(shape_to_show, my_view, pic_name)
-
-err = err + check_all_params(shape_to_show,
-RepresentationType.get_name(RepresentationType.WIREFRAME), "Gouraud", 0.8, 5.0)
-
-call_and_check(shape_to_show, "Opacity", 1.0, 1, compare_prec)
-call_and_check(shape_to_show, "Opacity", 0.8, 1, compare_prec)
-
-time.sleep(1)
-# save picture in file
-# Construct image file name
-pic_name = picturedir + "params_WIREFRAME_5." + pictureext
-# Show and record the presentation
-process_prs_for_test(shape_to_show, my_view, pic_name)
-
-err = err + check_all_params(shape_to_show,
-RepresentationType.get_name(RepresentationType.WIREFRAME), "Gouraud", 0.8, 5.0)
-
-if err:
- raise RuntimeError("Presentation parameters are not stable")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/3D_viewer/B0 case
-# Create 3D Viewer and test set view properties for Scalar Map presentation
-# Author: POLYANSKIKH VERA
-from paravistest import *
-from presentations import *
-from pvsimple import *
-import sys
-import time
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("3D_viewer/B0")
-
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Get view
-my_view = GetRenderView()
-reset_view(my_view)
-Render(my_view)
-
-theFileName = datadir + "fra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-proxy = GetActiveSource()
-if proxy is None:
- raise RuntimeError("Error: can't import file.")
-else:
- print("OK")
-
-represents = [RepresentationType.POINTS, RepresentationType.WIREFRAME,\
-RepresentationType.SURFACE, RepresentationType.VOLUME]
-shrinks = [0, 1]
-shadings = ["Flat", "Gouraud"]
-opacities = [1.0, 0.5, 0.0]
-linewidths = [1.0, 3.0, 10.0]
-compare_prec = 0.00001
-shrink_filter = None
-shrinked_sm = None
-
-field_name = 'VITESSE'
-
-print("\nCreating scalar map.......", end=' ')
-scalar_map = ScalarMapOnField(proxy, EntityType.NODE, field_name, 1)
-if scalar_map is None:
- raise RuntimeError("Error!!! Presentation wasn't created...")
-
-display_only(scalar_map, my_view)
-reset_view(my_view)
-Render(my_view)
-
-print("\nChange Presentation Parameters...")
-
-
-for reprCode in represents:
- repr = RepresentationType.get_name(reprCode)
- call_and_check(scalar_map, "Representation", repr, 1)
- for shr in shrinks:
- if shr > 0 and reprCode != RepresentationType.POINTS:
- if shrinked_sm is None:
- scalar_map.Visibility = 1
- shrink_filter = Shrink(scalar_map.Input)
- shrinked_sm = GetRepresentation(shrink_filter)
- shrink_filter.ShrinkFactor = 0.8
- shrink_filter.UpdatePipeline()
- shrinked_sm.ColorArrayName = scalar_map.ColorArrayName[0:2]
- lookup_table = scalar_map.LookupTable
- shrinked_sm.LookupTable = lookup_table
-
- scalar_map.Visibility = 0
- shrinked_sm.Representation = scalar_map.Representation
- shrinked_sm.Visibility = 1
- shape_to_show = shrinked_sm
- else:
- if shrinked_sm is not None:
- shrinked_sm.Visibility = 0
- scalar_map.Visibility = 1
- shape_to_show = scalar_map
- Render(my_view)
-
- for sha in shadings:
- setShaded(my_view, sha)
- call_and_check(shape_to_show, "Interpolation", sha, 1)
- Render(my_view)
-
- for opa in opacities:
- call_and_check(shape_to_show, "Opacity", opa, 1, compare_prec)
-
- for lwi in linewidths:
- call_and_check(shape_to_show, "LineWidth", lwi, 1,
- compare_prec)
-
- time.sleep(1)
- # save picture in file
- # Construct image file name
- opa = str(opa).replace('.', '')
- lwi = str(lwi).replace('.', '')
- pic_name = picturedir + "params_" + repr + "_" + str(shr) + "_" + \
- str(sha) + "_" + str(opa) + "_" + str(lwi) + "." + pictureext
- # Show and record the presentation
- WriteImage(pic_name, view=my_view, Magnification=1)
- pass
- pass
- pass
- pass
- pass
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/3D_viewer/B1 case
-
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-import math
-
-# 1. First viewer creation
-view1 = GetRenderView()
-
-# 2. Second viewer creation
-view2 = CreateRenderView()
-
-# 3. Change view size
-size1 = view1.ViewSize
-size2 = view2.ViewSize
-
-w = size1[0] + size2[0]
-w1 = math.trunc(w * 0.7)
-w2 = w - w1
-
-view1.ViewSize = [w1, size1[1]]
-view2.ViewSize = [w2, size2[1]]
-
-# 4. Change view position
-h = view1.ViewSize[1]
-view1.ViewSize = [h//2, w]
-view2.ViewSize = [h//2, w]
-#view1.ViewPosition = [0, h//2]
-#view1.ViewPosition = [0, 0]
-
-Render(view1)
-Render(view2)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/3D_viewer/B2 case
-# Create 3D Viewer and test set view properties for CutPlanes presentation
-# Author: POLYANSKIKH VERA
-import sys
-import time
-
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("3D_viewer/B2")
-
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Get view
-my_view = GetRenderView()
-reset_view(my_view)
-Render(my_view)
-
-# Split
-a_view_r = CreateRenderView()
-Delete(a_view_r)
-
-# Split
-a_view_l = CreateRenderView()
-Delete(a_view_l)
-
-# Split
-a_view_t = CreateRenderView()
-Delete(a_view_t)
-
-# Split
-a_view_b = CreateRenderView()
-reset_view(a_view_b)
-Render(a_view_b)
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME 3DVIEWER_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/3D_viewer)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
-INSTALL(DIRECTORY _refs DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" 3DVIEWER BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" 3DVIEWER EXTRA)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A1 B0)
-
-SET(EXTRA_TESTS A2 A3 A4 A5 A6 A7 A8 A9 B1 B2)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/A0 case
-#%Create animation for Scalar Map for 'vitesse' field of the the given MED file and dumps picture files in JPEG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/A0")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Scalar Map creation
-prs= ScalarMapOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "jpeg"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"A0_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 40 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-scene.Loop = 0
-print("Animation.................................", end=' ')
-scene.Play()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/A1 case
-# Test animation API
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# 1. TimeStamps.med import
-print('Importing "TimeStamps.med"................', end=' ')
-file_path = datadir + "TimeStamps.med"
-OpenDataFile(file_path)
-med_reader = GetActiveSource()
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-# 2. CutLines creation
-print("Creating Cut Lines........................", end=' ')
-med_field = "vitesse"
-cutlines = CutLinesOnField(med_reader, EntityType.NODE, med_field, 1,
- nb_lines = 20,
- orientation1=Orientation.XY, orientation2=Orientation.ZX)
-if cutlines is None:
- print("FAILED")
-else:
- print("OK")
-
-# 3. Display CutLines
-print("Getting a Viewer.........................", end=' ')
-view = GetRenderView()
-if view is None:
- print("FAILED")
-else:
- print("OK")
-cutlines.Visibility = 1
-Render(view=view)
-cutlines.Visibility = 0
-Render(view=view)
-display_only(cutlines, view=view)
-reset_view(view=view)
-
-# 4. Animation
-print("Get Animation scene.....................", end=' ')
-scene = GetAnimationScene()
-if scene is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Duration default... ", scene.Duration)
-scene.Duration = -10
-scene.Duration = 120
-scene.Duration = 0
-scene.Duration = 30
-print("Duration ... ", scene.Duration)
-
-print("Loop ... ", scene.Loop)
-scene.Loop = 1
-print("Loop ... ", scene.Loop)
-scene.Loop = 0
-print("Loop ... ", scene.Loop)
-
-print("AnimationTime ... ", scene.AnimationTime)
-
-scene.Play()
-
-scene.GoToFirst()
-scene.GoToNext()
-scene.GoToNext()
-
-print("AnimationTime ... ", scene.AnimationTime)
-
-scene.GoToPrevious()
-scene.GoToLast()
-
-scene.Stop()
-
-print("AnimationTime ... ", scene.AnimationTime)
-
-scene.AnimationTime = -1
-scene.AnimationTime = scene.TimeKeeper.TimestepValues[1]
-scene.AnimationTime = scene.TimeKeeper.TimestepValues[0]
-
-nb_frames = scene.NumberOfFrames
-print("NumberOfFrames ... ", nb_frames)
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/A2 case
-#%Create animation for Scalar Map for 'pression' field of the the given MED file and dumps picture files in TIFF format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/A2")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Scalar Map creation
-prs= ScalarMapOnField(aProxy,EntityType.CELL,'pression' , 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "tiff"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"A2_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/A4 case
-#%Create animation for Cut Lines for 'pression' field of the the given MED file and dumps picture files in JPEG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/A4")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Cut Lines creation
-prs= CutLinesOnField(aProxy,EntityType.CELL,'pression' , 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "jpeg"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"A4_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/A7 case
-#%Create animation for Cut Lines for 'pression' field of the the given MED file and dumps picture files in PNG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/A7")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Cut Lines creation
-prs= CutLinesOnField(aProxy,EntityType.CELL,'pression' , 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "png"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"A7_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/A8 case
-#%Create animation for Cut Lines for 'pression' field of the the given MED file and dumps picture files in TIFF format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/A8")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Cut Lines creation
-prs= CutLinesOnField(aProxy,EntityType.CELL,'pression' , 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "tiff"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"A8_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/B2 case
-#%Create animation for Cut Planes for 'pression' field of the the given MED file and dumps picture files in JPEG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/B2")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Cut Planes creation
-prs= CutPlanesOnField(aProxy,EntityType.CELL,'pression' , 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "jpeg"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"B2_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/B5 case
-#%Create animation for Cut Planes for 'pression' field of the the given MED file and dumps picture files in PNG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/B5")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Cut Planes creation
-prs= CutPlanesOnField(aProxy,EntityType.CELL,'pression' , 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "png"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"B5_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/B6 case
-#%Create animation for Cut Planes for 'pression' field of the the given MED file and dumps picture files in TIFF format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/B6")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Cut Planes creation
-prs= CutPlanesOnField(aProxy,EntityType.CELL,'pression' , 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "tiff"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"B6_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/C0 case
-#%Create animation for Deformed Shape for 'vitesse' field of the the given MED file and dumps picture files in JPEG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/C0")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Deformed Shape creation
-prs= DeformedShapeOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "jpeg"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"C0_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/C1 case
-#%Create animation for Deformed Shape for 'vitesse' field of the the given MED file and dumps picture files in TIFF format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/C1")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Deformed Shape creation
-prs= DeformedShapeOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "tiff"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"C1_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/C3 case
-#%Create animation for Deformed Shape for 'vitesse' field of the the given MED file and dumps picture files in PNG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/C3")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Deformed Shape creation
-prs= DeformedShapeOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "png"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"C3_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/C8 case
-#%Create animation for Gauss Points for 'pression' field of the the given MED file and dumps picture files in JPEG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/C8")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Gauss Points creation
-prs= GaussPointsOnField(aProxy,EntityType.CELL,'pression' , 1 , multiplier=0.01)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "jpeg"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"C8_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME ANIMATION_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/Animation)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" ANIMATION BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" ANIMATION EXTRA)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/D1 case
-#%Create animation for Gauss Points for 'pression' field of the the given MED file and dumps picture files in PNG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/D1")
-
-theFileName = datadir + "TimeStamps.med"
-
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Gauss Points creation
-prs= GaussPointsOnField(aProxy,EntityType.CELL,'pression' , 2, multiplier=0.01)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "png"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"D1_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/D2 case
-#%Create animation for Gauss Points for 'pression' field of the the given MED file and dumps picture files in TIFF format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/D2")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Gauss Points creation
-prs= GaussPointsOnField(aProxy,EntityType.CELL,'pression' , 2, multiplier=0.01)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "tiff"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"D2_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/D6 case
-#%Create animation for Iso Surfaces for 'pression' field of the the given MED file and dumps picture files in JPEG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/D6")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Iso Surfaces creation
-prs= IsoSurfacesOnField(aProxy,EntityType.CELL,'pression', 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "jpeg"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"D6_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/D9 case
-#%Create animation for Iso Surfaces for 'pression' field of the the given MED file and dumps picture files in PNG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/D9")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Iso Surfaces creation
-prs= IsoSurfacesOnField(aProxy,EntityType.CELL,'pression', 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "png"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"D9_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/E0 case
-#%Create animation for Iso Surfaces for 'pression' field of the the given MED file and dumps picture files in TIFF format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/E0")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Iso Surfaces creation
-prs= IsoSurfacesOnField(aProxy,EntityType.CELL,'pression', 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "tiff"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"E0_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/E4 case
-# Create animation for Plot 3D for 'pression' field of the the given MED file and dumps picture files in JPEG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# for saving snapshots
-picturedir = get_picture_dir("Animation/E4")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Plot 3D creation
-prs= Plot3DOnField(aProxy,EntityType.CELL,'pression' , 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "jpeg"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"E4_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/E7 case
-#%Create animation for Plot 3D for 'pression' field of the the given MED file and dumps picture files in PNG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/E7")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Plot 3D creation
-prs= Plot3DOnField(aProxy,EntityType.CELL,'pression' , 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "png"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"E7_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/E8 case
-# Create animation for Plot 3D for 'pression' field of the the given MED file and dumps picture files in TIFF format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# for saving snapshots
-picturedir = get_picture_dir("Animation/E8")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Plot 3D creation
-prs= Plot3DOnField(aProxy,EntityType.CELL,'pression' , 2)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "tiff"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/pression@@][@@P0']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"E8_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/F2 case
-#%Create animation for Scalar Map on Deformed Shape for 'vitesse' field of the the given MED file and dumps picture files in JPEG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/F2")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Scalar Map on Deformed Shape creation
-prs= DeformedShapeAndScalarMapOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "jpeg"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"F2_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/F5 case
-#%Create animation for Scalar Map on Deformed Shape for 'vitesse' field of the the given MED file and dumps picture files in PNG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/F5")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Scalar Map on Deformed Shape creation
-prs= DeformedShapeAndScalarMapOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "png"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"F5_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/F6 case
-#%Create animation for Scalar Map on Deformed Shape for 'vitesse' field of the the given MED file and dumps picture files in TIFF format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/F6")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Scalar Map on Deformed Shape creation
-prs= DeformedShapeAndScalarMapOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "tiff"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"F6_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/G0 case
-#%Create animation for Stream Lines for 'vitesse' field of the the given MED file and dumps picture files in JPEG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/G0")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Stream Lines creation
-prs= StreamLinesOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-if prs is None:
- # TODO: check why stream lines prs is empty
- print("WARNING! StreamLines presentation wasn't created or is empty...")
-else:
- prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "jpeg"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"G0_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/G3 case
-#%Create animation for Stream Lines for 'vitesse' field of the the given MED file and dumps picture files in PNG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/G3")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Stream Lines creation
-prs= StreamLinesOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "png"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"G3_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/G4case
-#%Create animation for Stream Lines for 'vitesse' field of the the given MED file and dumps picture files in TIFF format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/G3")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Stream Lines creation
-prs= StreamLinesOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "tiff"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"G3_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/G8 case
-#%Create animation for Vectors for 'vitesse' field of the the given MED file and dumps picture files in JPEG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/G8")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Vectors creation
-prs= VectorsOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "jpeg"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"G8_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/H1 case
-#%Create animation for Vectors for 'vitesse' field of the the given MED file and dumps picture files in PNG format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/H1")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Vectors creation
-prs= VectorsOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "png"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"H1_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/animation/H2 case
-#%Create animation for Vectors for 'vitesse' field of the the given MED file and dumps picture files in TIFF format %
-
-import sys
-import os
-from paravistest import *
-from presentations import *
-from pvsimple import *
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Animation/H2")
-
-theFileName = datadir + "TimeStamps.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-print("Creating a Viewer.........................", end=' ')
-aView = GetRenderView()
-reset_view(aView)
-Render(aView)
-
-if aView is None : print("Error")
-else : print("OK")
-
-# Vectors creation
-prs= VectorsOnField(aProxy,EntityType.NODE,'vitesse' , 1)
-prs.Visibility=1
-aView.ResetCamera()
-print("Creating an Animation.....................", end=' ')
-my_format = "tiff"
-print("Current format to save snapshots: ",my_format)
-# Add path separator to the end of picture path if necessery
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# Select only the current field:
-aProxy.AllArrays = []
-aProxy.UpdatePipeline()
-aProxy.AllArrays = ['TS0/dom/ComSup0/vitesse@@][@@P1']
-aProxy.UpdatePipeline()
-
-# Animation creation and saving into set of files into picturedir
-scene = AnimateReader(aProxy,aView,picturedir+"H2_dom."+my_format)
-nb_frames = len(scene.TimeKeeper.TimestepValues)
-
-pics = os.listdir(picturedir)
-if len(pics) != nb_frames:
- print("FAILED!!! Number of made pictures is equal to ", len(pics), " instead of ", nb_frames)
-
-for pic in pics:
- os.remove(picturedir+pic)
-
-# Prepare animation performance
-scene.PlayMode = 1 # set RealTime mode for animation performance
-# set period
-scene.Duration = 30 # correspond to set the speed of animation in VISU
-scene.GoToFirst()
-print("Animation.................................", end=' ')
-scene.Play()
-scene.GoToFirst()
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A1 B2 C0 D1 E0 F2 G0 H1)
-
-SET(EXTRA_TESTS A0 A2 A4 A7 A8 B5 B6 C1 C3 C8 D2 D6 D9
- E4 E7 E8 F5 F6 G3 G4 G8 H2)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-# For make test
-
-SET(TIMEOUT 1000)
-SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
-
-IF(NOT WIN32)
- # Special case for the PV_PLUGIN_PATH environment variable:
- # PV_PLUGIN_PATH=VAL_1;VAL_2;...;VAL_N
- # But the ';' character is used as separator between variables (PATH, LD_LIBRARY_PATH, etc...)
- # So we should shield a sequence ";/" by the '\' character.
- STRING(REGEX REPLACE ";/" "\\\\;/" tests_env "${tests_env}")
-ENDIF(NOT WIN32)
-
-SET(SALOME_TEST_DRIVER "${KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py")
-
-# Common part
-
-SET(TEST_DIRECTORIES
- Util
- 2D_viewer
- 3D_viewer
- ScalarMap
- DeformedShape
- ScalarMap_On_DeformedShape
- CutPlanes
- CutLines
- Vectors
- Plot3D
- IsoSurfaces
- MeshPresentation
- Animation
- GaussPoints
- StreamLines
- SWIG_scripts
-# Tables table reader is not used anymore and CSVReader
-# doesn't suport txt and xls formats, so switch off Tables tests
- ImportMedField
- united
- bugs
- imps
-# dump_study Save trace functionality of ParaView is now working
-# as expected: switch off dump_study tests until it will be corrected.
-)
-
-FOREACH(test_dir ${TEST_DIRECTORIES})
- ADD_SUBDIRECTORY(${test_dir})
-ENDFOREACH()
-
-# Application tests
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs
- RENAME CTestTestfile.cmake)
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-# Define a label for base tests only: PARAVIS_BASE
-# Define a label for extra tests only: PARAVIS_EXTRA
-# Then calling ctest with the label PARAVIS will automatically use both PARAVIS_BASE and PARAVIS_EXTRA
-MACRO(DEFINE_PARAVIS_TEST test_files name label)
- FOREACH(tfile ${test_files})
- SET(TEST_NAME ${COMPONENT_NAME}_${name}_${tfile})
- ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}_${label};REQUIRE_X_SERVER")
- ENDFOREACH()
-ENDMACRO()
-
-SET(TEST_DIRECTORIES
- 2D_viewer
- 3D_viewer
- ScalarMap
- DeformedShape
- ScalarMap_On_DeformedShape
- CutPlanes
- CutLines
- Vectors
- Plot3D
- IsoSurfaces
- MeshPresentation
- Animation
- GaussPoints
- StreamLines
- SWIG_scripts
- Tables
- ImportMedField
- united
- bugs
- imps
- dump_study
-)
-
-FOREACH(test_dir ${TEST_DIRECTORIES})
- SUBDIRS(${test_dir})
-ENDFOREACH()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/A0 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/A0")
-
-file = datadir + "fra.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/A1 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/A1")
-
-file = datadir + "hexa_28320_ELEM.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/A2 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/A2")
-
-file = datadir + "pointe.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/A3 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/A3")
-
-file = datadir + "Fields_group3D.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/A4 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/A4")
-
-file = datadir + "Hexa8.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/A5 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/A5")
-
-file = datadir + "Penta6.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/A6 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/A6")
-
-file = datadir + "clo.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/A7 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/A7")
-
-file = datadir + "Tetra4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/A8 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/A8")
-
-file = datadir + "Tria3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/A9 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/A9")
-
-file = datadir + "Quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/B0 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/B0")
-
-file = datadir + "carre_en_quad4_seg2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/B1 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/B1")
-
-file = datadir + "carre_en_quad4_seg2_fields.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/B2 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/B2")
-
-file = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME CUTLINES_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-IF(SALOME_PARAVIS_ALL_TEST)
- # Increase timeout for specific tests
- SET_TESTS_PROPERTIES(CUTLINES_F4 PROPERTIES TIMEOUT 5000)
-ENDIF()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/CutLines)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" CUTLINES BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" CUTLINES EXTRA)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/E0 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/E0")
-
-file = datadir + "test_55_solid_concentr_dom.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/E1 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/E1")
-
-file = datadir + "H_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/E2 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/E2")
-
-file = datadir + "cas2_2d_couplage_chess_castem.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/E3 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/E3")
-
-file = datadir + "hydro_d10.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/E4 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/E4")
-
-file = datadir + "champc.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/E5 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/E5")
-
-file = datadir + "hydro_sea_alv.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/E6 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/E6")
-
-file = datadir + "toto.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/E7 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/E7")
-
-file = datadir + "couplex_alain.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/E8 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/E8")
-
-file = datadir + "KCOUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/E9 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/E9")
-
-file = datadir + "test_hydro.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/F1 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/F1")
-
-file = datadir + "ml.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/F2 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/F2")
-
-file = datadir + "T_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/F3 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/F3")
-
-file = datadir + "test_hydro_darcy4_out.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/F4 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/F4")
-
-file = datadir + "UO2_250ans.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/F5 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/F5")
-
-file = datadir + "maill.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/F6 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/F6")
-
-file = datadir + "maill.0.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/F8 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/F8")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/F9 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/F9")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/G0 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/G0")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/G1 case
-# Create Cut Lines for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutLines/G1")
-
-file = datadir + "maill.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutLines/G2 case
-# Create Cut lines for field of the the given MED file for 10 timestamps%
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("CutLines/G2")
-
-theFileName = datadir + "Bug829_resu_mode.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-"""Build presentations of the given types for all fields of the given file."""
-#print "Import %s..." % theFileName.split('/')[-1],
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-# Get viewScalarMap
-aView = GetRenderView()
-
-# Create required presentations for the proxy
-# CreatePrsForProxy(aProxy, aView, thePrsTypeList, thePictureDir, thePictureExt, theIsAutoDelete)
-aFieldEntity = EntityType.NODE
-aFieldName = "MODES___DEPL____________________"
-
-#create Cut Lines presentations for 10 timestamps
-for i in range(1,11):
- hide_all(aView, True)
- aPrs = CutLinesOnField(aProxy, aFieldEntity,aFieldName , i)
- if aPrs is None:
- raise RuntimeError("Presentation is None!!!")
- #display only current scalar map
- aPrs.Visibility=1
- reset_view(aView)
- Render(aView)
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- prs_type = PrsTypeEnum.CUTLINES
-
- # Get name of presentation type
- prs_name = PrsTypeEnum.get_name(prs_type)
- f_prs_type = prs_name.replace(' ', '').upper()
- # Construct image file name
- pic_name = picturedir + aFieldName + "_" + str(i) + "_" + f_prs_type + "." + pictureext
-
- # Show and record the presentation
- process_prs_for_test(aPrs, aView, pic_name)
-
-
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A0 B0 E0 F1 G0)
-
-SET(EXTRA_TESTS A1 A2 A3 A4 A5 A6 A7 A8 A9 B1 B2
- E1 E2 E3 E4 E5 E6 E7 E8 E9
- F2 F3 F4 F5 F6 F8 F9 G1 G2)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/A0 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/A0")
-
-file = datadir + "fra.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/A1 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/A1")
-
-file = datadir + "hexa_28320_ELEM.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/A2 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/A2")
-
-file = datadir + "pointe.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/A3 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/A3")
-
-file = datadir + "Fields_group3D.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/A4 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/A4")
-
-file = datadir + "Hexa8.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/A5 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/A5")
-
-file = datadir + "Penta6.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/A6 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/A6")
-
-file = datadir + "clo.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/A7 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/A7")
-
-file = datadir + "Tetra4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/A8 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/A8")
-
-file = datadir + "Tria3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/A9 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/A9")
-
-file = datadir + "Quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/B0 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/B0")
-
-file = datadir + "carre_en_quad4_seg2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/B1 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/B1")
-
-file = datadir + "carre_en_quad4_seg2_fields.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/B2 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/B2")
-
-file = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/B3 case
-
-from paravistest import datadir
-from presentations import CutPlanesOnField, EntityType
-import pvsimple
-
-#====================Stage1: Importing MED file====================
-print("**** Stage1: Importing MED file")
-
-print('Import "ResOK_0000.med"...............', end=' ')
-
-file_path = datadir + "ResOK_0000.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-#====================Stage2: Creating CutPlanes====================
-print("*****Stage2: Creating CutPlanes")
-
-print("Creating Cut Planes.......", end=' ')
-
-node_entity = EntityType.NODE
-field_name = 'vitesse'
-cutplanes = CutPlanesOnField(med_reader, node_entity, field_name, 1)
-
-if cutplanes is None:
- print("FAILED")
-else:
- print("OK")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME CUTPLANES_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/CutPlanes)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" CUTPLANES BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" CUTPLANES EXTRA)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/E0 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/E0")
-
-file = datadir + "test_55_solid_concentr_dom.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/E1 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/E1")
-
-file = datadir + "H_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/E2 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/E2")
-
-file = datadir + "cas2_2d_couplage_chess_castem.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/E3 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/E3")
-
-file = datadir + "hydro_d10.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/E4 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/E4")
-
-file = datadir + "champc.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/E5 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/E5")
-
-file = datadir + "hydro_sea_alv.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/E6 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/E6")
-
-file = datadir + "toto.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/E7 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/E7")
-
-file = datadir + "couplex_alain.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/E8 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/E8")
-
-file = datadir + "KCOUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/E9 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/E9")
-
-file = datadir + "test_hydro.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/F1 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/F1")
-
-file = datadir + "ml.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/F2 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/F2")
-
-file = datadir + "T_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/F3 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/F3")
-
-file = datadir + "test_hydro_darcy4_out.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/F4 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/F4")
-
-file = datadir + "UO2_250ans.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/F5 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/F5")
-
-file = datadir + "maill.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/F6 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/F6")
-
-file = datadir + "maill.0.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/F8 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/F8")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/F9 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/F9")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/G0 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/G0")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/G1 case
-# Create Cut Planes for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("CutPlanes/G1")
-
-file = datadir + "maill.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/CutPlanes/G2 case
-# Create Cut planes for field of the the given MED file for 10 timestamps%
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("CutPlanes/G2")
-
-theFileName = datadir + "Bug829_resu_mode.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-"""Build presentations of the given types for all fields of the given file."""
-#print "Import %s..." % theFileName.split('/')[-1],
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-# Get viewScalarMap
-aView = GetRenderView()
-
-# Create required presentations for the proxy
-# CreatePrsForProxy(aProxy, aView, thePrsTypeList, thePictureDir, thePictureExt, theIsAutoDelete)
-aFieldEntity = EntityType.NODE
-aFieldName = "MODES___DEPL____________________"
-
-#create Cut Planes presentations for 10 timestamps
-for i in range(1,11):
- hide_all(aView, True)
- aPrs = CutPlanesOnField(aProxy, aFieldEntity,aFieldName , i)
- if aPrs is None:
- raise RuntimeError("Presentation is None!!!")
- #display only current scalar map
- aPrs.Visibility=1
- reset_view(aView)
- Render(aView)
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- prs_type = PrsTypeEnum.CUTPLANES
-
- # Get name of presentation type
- prs_name = PrsTypeEnum.get_name(prs_type)
- f_prs_type = prs_name.replace(' ', '').upper()
- # Construct image file name
- pic_name = picturedir + aFieldName + "_" + str(i) + "_" + f_prs_type + "." + pictureext
-
- # Show and record the presentation
- process_prs_for_test(aPrs, aView, pic_name)
-
-
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A0 B0 E0 F1 G0)
-
-SET(EXTRA_TESTS A1 A2 A3 A4 A5 A6 A7 A8 A9 B1 B2 B3
- E1 E2 E3 E4 E5 E6 E7 E8 E9
- F2 F3 F4 F5 F6 F8 F9 G1 G2)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/A0 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/A0")
-
-file = datadir + "fra.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/A1 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/A1")
-
-file = datadir + "hexa_28320_ELEM.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/A2 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/A2")
-
-file = datadir + "pointe.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/A3 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/A3")
-
-file = datadir + "Fields_group3D.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/A4 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/A4")
-
-file = datadir + "Hexa8.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/A5 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/A5")
-
-file = datadir + "Penta6.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/A6 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/A6")
-
-file = datadir + "clo.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/A7 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/A7")
-
-file = datadir + "Tetra4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/A8 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/A8")
-
-file = datadir + "Tria3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/A9 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/A9")
-
-file = datadir + "Quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/B0 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/B0")
-
-file = datadir + "carre_en_quad4_seg2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/B1 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/B1")
-
-file = datadir + "carre_en_quad4_seg2_fields.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/B2 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/B2")
-
-file = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/B3 case
-
-from paravistest import datadir
-from presentations import DeformedShapeOnField, EntityType
-import pvsimple
-
-#====================Stage1: Import from MED file in ParaVis============
-print("**** Stage1: Import from MED file in ParaVis")
-
-print('Import "Tria3.med"....................', end=' ')
-
-file_path = datadir + "Tria3.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-#====================Stage2: Creating Deformed Shape====================
-print("**** Stage2: Creating Deformed Shape")
-
-print("Creating Deformed Shape...............", end=' ')
-
-cell_entity = EntityType.CELL
-field_name = 'vectoriel field'
-defshape = DeformedShapeOnField(med_reader, cell_entity, field_name, 1)
-pvsimple.ResetCamera()
-
-if defshape is None:
- print("FAILED")
-else:
- print("OK")
-
-#====================Stage3: Scale of Deformed Shape====================
-print("**** Stage3: Scale of Deformed Shape")
-
-warp_vector = pvsimple.GetActiveSource()
-print("Default scale: ", warp_vector.ScaleFactor)
-
-print("Set positive scale of Deformed Shape")
-scale = 1
-warp_vector.ScaleFactor = scale
-
-pvsimple.Render()
-print("Scale: ", warp_vector.ScaleFactor)
-
-print("Set negative scale of Deformed Shape")
-scale = -1
-warp_vector.ScaleFactor = scale
-
-pvsimple.Render()
-print("Scale: ", warp_vector.ScaleFactor)
-
-print("Set zero scale of Deformed Shape")
-scale = 0
-warp_vector.ScaleFactor = scale
-
-pvsimple.Render()
-print("Scale: ", warp_vector.ScaleFactor)
-
-#====================Stage4: Coloring method of Deformed Shape===========
-print("**** Stage4: Coloring of Deformed Shape")
-
-color_array = defshape.ColorArrayName[1]
-if color_array:
- print("Default shape is colored by array: ", color_array)
-else:
- print("Default shape is colored by solid color: ", defshape.AmbientColor)
-
-print("Set colored by array mode .... ", end=' ')
-defshape.ColorArrayName = ("CELLS", field_name)
-pvsimple.Render()
-
-if defshape.ColorArrayName[1] == field_name:
- print("OK")
-else:
- print("FAILED")
-
-print("Set colored by solid color mode .... ", end=' ')
-defshape.ColorArrayName = (None, '')
-pvsimple.Render()
-
-if defshape.ColorArrayName[1]:
- print("FAILED")
-else:
- print("OK")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/B4 case
-
-from paravistest import datadir
-from presentations import DeformedShapeOnField, EntityType
-import pvsimple
-
-#====================Stage1: Import from MED file in ParaVis============
-print("**** Stage1: Import from MED file in ParaVis")
-
-print('Import "Hexa8.med"....................', end=' ')
-
-file_path = datadir + "Hexa8.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-#====================Stage2: Creating Deformed Shape====================
-print("**** Stage2: Creating Deformed Shape")
-
-print("Creating Deformed Shape...............", end=' ')
-
-cell_entity = EntityType.CELL
-field_name = 'vectoriel field'
-defshape = DeformedShapeOnField(med_reader, cell_entity, field_name, 1)
-pvsimple.ResetCamera()
-
-if defshape is None:
- print("FAILED")
-else:
- print("OK")
-
-#====================Stage3: Color of Deformed Shape====================
-print("**** Stage3: Color of Deformed Shape")
-
-# Step1
-print("Getting the current color of Deformed Shape in RGB ... ", end=' ')
-color = defshape.AmbientColor
-print(color)
-
-# Step2
-print("Set the positive color in RGB")
-color = [0.3, 0.3, 0.3]
-defshape.AmbientColor = color
-pvsimple.Render()
-
-color = defshape.AmbientColor
-print("Color: ", color)
-
-# Step3
-print("Set the negative R and positive GB")
-color = [-0.3, 0.3, 0.3]
-defshape.AmbientColor = color
-pvsimple.Render()
-
-color = defshape.AmbientColor
-print("Color: ", color)
-
-# Step4
-print("Set the negative R and positive GB")
-color = [0.3, -0.3, 0.3]
-defshape.AmbientColor = color
-pvsimple.Render()
-
-color = defshape.AmbientColor
-print("Color: ", color)
-
-# Step5
-print("Set the negative B and positive RG")
-print("Set the negative R and positive GB")
-color = [0.3, 0.3, -0.3]
-defshape.AmbientColor = color
-pvsimple.Render()
-
-color = defshape.AmbientColor
-print("Color: ", color)
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME DEFORMEDSHAPE_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/DeformedShape)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" DEFORMEDSHAPE BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" DEFORMEDSHAPE EXTRA)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/E0 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/E0")
-
-file = datadir + "test_55_solid_concentr_dom.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/E1 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/E1")
-
-file = datadir + "H_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/E2 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/E2")
-
-file = datadir + "cas2_2d_couplage_chess_castem.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/E3 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/E3")
-
-file = datadir + "hydro_d10.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/E4 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/E4")
-
-file = datadir + "champc.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/E5 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/E5")
-
-file = datadir + "hydro_sea_alv.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/E6 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/E6")
-
-file = datadir + "toto.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/E7 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/E7")
-
-file = datadir + "couplex_alain.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/E8 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/E8")
-
-file = datadir + "KCOUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/E9 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/E9")
-
-file = datadir + "test_hydro.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/F1 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/F1")
-
-file = datadir + "ml.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/F2 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/F2")
-
-file = datadir + "T_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/F3 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/F3")
-
-file = datadir + "test_hydro_darcy4_out.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/F4 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/F4")
-
-file = datadir + "UO2_250ans.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/F5 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/F5")
-
-file = datadir + "maill.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/F6 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/F6")
-
-file = datadir + "maill.0.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/F8 case
-# Create Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("DeformedShape/F8")
-
-file = datadir + "maill.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPE], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/DeformedShape/F9 case
-# Create Deformed Shape for field of the the given MED file for 10 timestamps%
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("DeformedShape/F9")
-
-theFileName = datadir + "Bug829_resu_mode.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-"""Build presentations of the given types for all fields of the given file."""
-#print "Import %s..." % theFileName.split('/')[-1],
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-# Get view
-aView = GetRenderView()
-
-# Create required presentations for the proxy
-# CreatePrsForProxy(aProxy, aView, thePrsTypeList, thePictureDir, thePictureExt, theIsAutoDelete)
-aFieldEntity = EntityType.NODE
-aFieldName = "MODES___DEPL____________________"
-
-#Creation of a set of non-colored and then colored Deformed Shapes, based on time stamps of MODES_DEP field
-for colored in [False,True]:
- colored_str = "_non-colored"
- if colored:
- colored_str = "_colored"
- for i in range(1,11):
- hide_all(aView, True)
- aPrs = DeformedShapeOnField(aProxy, aFieldEntity, aFieldName, i, is_colored=colored)
- if aPrs is None:
- raise RuntimeError("Presentation is None!!!")
- # display only current deformed shape
- #display_only(aView,aPrs)
- aPrs.Visibility =1
-
- reset_view(aView)
- Render(aView)
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- prs_type = PrsTypeEnum.DEFORMEDSHAPE
-
- # Get name of presentation type
- prs_name = PrsTypeEnum.get_name(prs_type)
- f_prs_type = prs_name.replace(' ', '').upper()
- # Construct image file name
- pic_name = picturedir + aFieldName+colored_str + "_" + str(i) + "_" + f_prs_type + "." + pictureext
-
- # Show and record the presentation
- process_prs_for_test(aPrs, aView, pic_name)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A0 B0 E0 F1)
-
-SET(EXTRA_TESTS A1 A2 A3 A4 A5 A6 A7 A8 A9 B1 B2 B3 B4
- E1 E2 E3 E4 E5 E6 E7 E8 E9 F2 F3 F4 F5 F6 F8 F9)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/A0 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/A0")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "hexa_28320_ELEM.med"
-field_name = "pression_elem_dom_pb1"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-view.ViewTime = time
-pvsimple.UpdatePipeline(time=time, proxy=med_reader)
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/A1 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/A1")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "pointe.med"
-field_name = "fieldcelldoublescalar"
-#field_name = "fieldcelldoublevector"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/A2 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/A2")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "Fields_group3D.med"
-field_name = "scalar field"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/A3 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/A3")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "Hexa8.med"
-field_name = "scalar field"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/A4 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/A4")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "Penta6.med"
-field_name = "scalar field"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/A5 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/A5")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "Tetra4.med"
-field_name = "scalar field"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/A6 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/A6")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "Tria3.med"
-field_name = "scalar field"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/A7 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/A7")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "Quad4.med"
-field_name = "scalar field"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/A9 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/A9")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "carre_en_quad4_seg2_fields.med"
-field_name = "AREA"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/B0 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/B0")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "cube_hexa8_quad4.med"
-field_name = "fieldcelldouble"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/B1 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/B1")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "test_55_solid_concentr_dom.med"
-field_name = "RN_precipite_restr"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/B2 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/B2")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "H_COUPLEX1.med"
-field_name = "Head"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/B3 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/B3")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "cas2_2d_couplage_chess_castem.med"
-field_name = "pH"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/B4 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/B4")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "champc.med"
-field_name = "Am241_restriction"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/B5 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/B5")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "hydro_sea_alv.med"
-field_name = "Head"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/B6 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/B6")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "toto.med"
-field_name = "erreur"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/B7 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/B7")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "couplex_alain.med"
-field_name = "Conc. I129"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/B8 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/B8")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "KCOUPLEX1.med"
-field_name = "Head"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/B9 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/B9")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "test_hydro.med"
-field_name = "Head"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/C0 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/C0")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "ml.med"
-field_name = "head_restriction"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/C1 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/C1")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "T_COUPLEX1.med"
-field_name = "Conc. I129"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/C2 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/C2")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "test_hydro_darcy4_out.med"
-field_name = "DarcyVelocity"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/C3 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/C3")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "UO2_250ans.med"
-field_name = "Concentration_O2(aq)_mol per l"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/C4 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/C4")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.3.med"
-field_names = ["REMEUN__ERRE_ELGA_NORE__________", "REMEZEROERRE_ELGA_NORE__________"]
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-for field_name in field_names:
- prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
- if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
- # Display presentation and get snapshot
- pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
- process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/C4 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/C6")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.1.med"
-field_names = ["REMEUN__ERRE_ELGA_NORE__________", "REMEZEROERRE_ELGA_NORE__________"]
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-for field_name in field_names:
- prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
- if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
- # Display presentation and get snapshot
- pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
- process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/C4 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import GaussPointsOnField, EntityType, get_time, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/C7")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.2.med"
-field_names = ["REMEUN__ERRE_ELGA_NORE__________", "REMEZEROERRE_ELGA_NORE__________"]
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-for field_name in field_names:
- prs = GaussPointsOnField(med_reader, EntityType.CELL, field_name, timestamp_nb)
- if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
- # Display presentation and get snapshot
- pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
- process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/C8 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/C8")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "ir.resu.med"
-field_name = "gravit__VARI_ELGA"
-#timestamp_nb = 1
-timestamp_nb = 6 # timestamp 1 is empty
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-pvsimple.Show()
-
-# Create Gauss Points presentation
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-prs = GaussPointsOnField1(med_reader, EntityType.CELL, field_name, timestamp_nb)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/GaussPoints/C9 case
-# Create Gauss Points on the field of the MED file
-
-import os
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("GaussPoints/C9")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-# MED file
-file_name = datadir + "petit.rmed"
-field_name = "RESPIL__SIEF_ELGA"
-timestamp_nb = -1 # last timestamp
-
-pvsimple.OpenDataFile(file_name)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-
-# Create Gauss Points presentation
-view = pvsimple.GetRenderView()
-time = get_time(med_reader, timestamp_nb)
-
-prs = GaussPointsOnField1(med_reader, EntityType.CELL, field_name, timestamp_nb, multiplier=4E-9)
-if prs is None:
- raise RuntimeError("Created presentation is None!!!")
-
-# Display presentation and get snapshot
-pic_name = picturedir + field_name + "_" + str(time) + "_GAUSSPOINTS." + pictureext
-process_prs_for_test(prs, view, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME GAUSSPOINTS_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/GaussPoints)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" GAUSSPOINTS BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" GAUSSPOINTS EXTRA)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A2 B0 C0)
-
-SET(EXTRA_TESTS A0 A1 A3 A4 A5 A6 A7 A9 B1 B2 B3 B4 B5 B6 B7 B8 B9
- C1 C2 C3 C4 C6 C7 C8 C9)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/A0 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "ResOK_0000.med"
-field_names1 = ["temperature", "vitesse", "pression"]
-prs_list1 = [ [1,2,3,4,8], [1,2,3,4,5,6,8,9], [0,1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names1, 1, prs_list1)
-
-# Stream Lines presentation on "vitesse" field is created
-# by ParaView as an empty presentation: no any cells or points.
-# TODO: check why presentation is empty.
-field_names2 = ["vitesse"]
-prs_list2 = [ [7] ]
-
-Import_Med_Field(med_file, field_names2, 0, prs_list2)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/A1 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "TimeStamps.med"
-field_names = ["pression", "temperature", "vitesse"]
-prs_list = [ [0,1,2,3,4,8], [1,2,3,4,8], list(range(1,10)) ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/A2 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "carre_en_quad4_import22.med"
-field_names = ["fieldcelldouble", "fieldnodedouble", "fieldnodedouble", "fieldnodedouble", "fieldnodeint"]
-prs_list = [ list(range(10)), [1,2,3,4,8], [1,2,3,4,8], [1,2,3,4,8], [1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/A3 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "carre_en_quad4_seg2.med"
-field_names = ["fieldcelldouble", "fieldnodedouble", "fieldnodedouble", "fieldnodedouble", "fieldnodeint"]
-prs_list = [ list(range(10)), [1,2,3,4,8], [1,2,3,4,8], [1,2,3,4,8], [1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/A4 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "test_hydro_darcy1a_out.med"
-field_names = ["DarcyVelocity","Head"]
-prs_list = [ list(range(10)), [0,1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/A5 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "clo2.med"
-field_names = ["PRESSION", "TAUX_DE_VIDE", "VITESSE"]
-prs_list = [ [0,1,2,3,4,8], [1,2,3,4,8], list(range(1,10)) ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/A6 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "cube_hexa8_import22.med"
-field_names = ["fieldcelldouble", "fieldnodedouble", "fieldnodedouble", "fieldnodedouble", "fieldnodeint"]
-prs_list = [ list(range(10)), [1,2,3,4,8], [1,2,3,4,8], [1,2,3,4,8], [1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/A7 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "cube_hexa8_quad4_import22.med"
-field_names = ["fieldcelldouble", "fieldnodedouble", "fieldnodedouble", "fieldnodedouble", "fieldnodeint"]
-prs_list = [ list(range(10)), [1,2,3,4,8], [1,2,3,4,8], [1,2,3,4,8], [1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/A8 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "fra1.med"
-field_names = ["TAUX_DE_VIDE", "VITESSE"]
-prs_list = [ [1,2,3,4,8], list(range(1,10)) ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/A9 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "maill.0.med"
-field_names = ["REQT_GD_________________________", "RESUTRQUDEPL____________________", "RESUTRQUERRE_ELGA_NORE__________", "RESUTRQUSIEF_ELGA_DEPL__________", "RESUTRQUSIGM_ELNO_DEPL__________"]
-prs_list = [ list(range(1,10)), list(range(1,10)), list(range(10)), list(range(10)), list(range(10))]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/B0 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "maill.0_volumes.med"
-field_names = ["RETH____FLUX_NOEU_TEMP__________", "RETH____TEMP____________________"]
-prs_list = [ list(range(1,10)), [1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/B1 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "maill.1.med"
-field_names = ["RETH____FLUX_NOEU_TEMP__________", "RETH____TEMP____________________"]
-prs_list = [ list(range(1,10)), [1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/B2 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "maill.2.med"
-field_names = ["RETH____FLUX_NOEU_TEMP__________","RETH____TEMP____________________"]
-prs_list = [ list(range(1,10)), [1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/B4 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "pointe_4fields.med"
-field_names = ["fieldcelldoublescalar", "fieldcelldoublevector", "fieldnodedouble", "fieldnodedouble", "fieldnodedouble", "fieldnodeint"]
-prs_list = [ [0,1,2,3,4,8], list(range(10)), [1,2,3,4,8], [1,2,3,4,8], [1,2,3,4,8], [1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/B5 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "pointe.med"
-field_names = ["fieldcelldoublescalar", "fieldcelldoublevector", "fieldnodedouble", "fieldnodedouble", "fieldnodedouble", "fieldnodeint"]
-prs_list = [ [0,1,2,3,4,8], list(range(10)), [1,2,3,4,8], [1,2,3,4,8], [1,2,3,4,8], [1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/B6 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "polygones.med"
-field_names = ["bord_:_distorsion","bord_:_familles","bord_:_non-ortho"]
-prs_list = [ [0,1,2,3,4,8], [0,1,2,3,4,8], [0,1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/B7 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "recoll_bord.med"
-field_names = ["bord_:_distorsion","bord_:_familles","bord_:_non-ortho"]
-prs_list = [ [0,1,2,3,4,8], [0,1,2,3,4,8], [0,1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/B8 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "resu.2.med"
-field_names = ["RETH____FLUX_NOEU_TEMP__________","RETH____TEMP____________________"]
-prs_list = [ list(range(1,10)), [1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/B9 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "test_2D.med"
-field_names = ["field_v","field_v_p"]
-prs_list = [ [0,1,2,3,4,8], [0,1,2,3,4,8] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/C0 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.1.med"
-field_names = ["REMEZEROERRE_ELGA_NORE__________", "RETHZEROTEMP____________________"]
-prs_list = [ [0,1], [1] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/C1 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.2.med"
-field_names = ["REMEUN__ERRE_ELGA_NORE__________", "RETHUN__TEMP____________________"]
-prs_list = [ [0,1], [1] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ImportMedField/C2 case
-# Import MED file; create presentations for the given fields.
-
-from paravistest import datadir, Import_Med_Field
-
-med_file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.3.med"
-field_names = ["REMEZEROERRE_ELGA_NORE__________", "RETHZEROTEMP____________________"]
-prs_list = [ [0,1], [1] ]
-
-Import_Med_Field(med_file, field_names, 1, prs_list)
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME IMPORTMEDFIELD_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/ImportMedField)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" IMPORTMEDFIELD BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" IMPORTMEDFIELD EXTRA)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A0 B0 C0)
-
-SET(EXTRA_TESTS A1 A2 A3 A4 A5 A6 A7 A8 A9 B1 B2 B4 B5 B6 B7 B8 B9 C1 C2)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/A0 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/A0")
-
-file = datadir + "fra.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/A1 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/A1")
-
-file = datadir + "hexa_28320_ELEM.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/A2 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/A2")
-
-file = datadir + "pointe.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/A3 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/A3")
-
-file = datadir + "Fields_group3D.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/A4 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/A4")
-
-file = datadir + "Hexa8.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/A5 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/A5")
-
-file = datadir + "Penta6.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/A6 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/A6")
-
-file = datadir + "clo.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/A7 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/A7")
-
-file = datadir + "Tetra4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/A8 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/A8")
-
-file = datadir + "Tria3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/A9 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/A9")
-
-file = datadir + "Quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/B0 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/B0")
-
-file = datadir + "carre_en_quad4_seg2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/B1 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/B1")
-
-file = datadir + "carre_en_quad4_seg2_fields.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/B2 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/B2")
-
-file = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME ISOSURFACES_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/IsoSurfaces)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" ISOSURFACES BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" ISOSURFACES EXTRA)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/E0 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/E0")
-
-file = datadir + "test_55_solid_concentr_dom.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/E1 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/E1")
-
-file = datadir + "H_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/E2 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/E2")
-
-file = datadir + "cas2_2d_couplage_chess_castem.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/E3 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/E3")
-
-file = datadir + "hydro_d10.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/E4 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/E4")
-
-file = datadir + "champc.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/E5 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/E5")
-
-file = datadir + "hydro_sea_alv.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/E6 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/E6")
-
-file = datadir + "toto.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/E7 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/E7")
-
-file = datadir + "couplex_alain.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/E8 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/E8")
-
-file = datadir + "KCOUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/E9 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/E9")
-
-file = datadir + "test_hydro.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/F1 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/F1")
-
-file = datadir + "ml.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/F2 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/F2")
-
-file = datadir + "T_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/F3 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/F3")
-
-file = datadir + "test_hydro_darcy4_out.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/F4 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/F4")
-
-file = datadir + "UO2_250ans.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/F5 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/F5")
-
-file = datadir + "maill.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/F6 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/F6")
-
-file = datadir + "maill.0.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/F8 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/F8")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/F9 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/F9")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/G0 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/G0")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/G1 case
-# Create Iso Surface for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("IsoSurfaces/G1")
-
-file = datadir + "maill.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.ISOSURFACES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/IsoSurfaces/G2 case
-# Create Iso surfaces for field of the the given MED file for 10 timestamps%
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("IsoSurfaces/G2")
-
-theFileName = datadir + "Bug829_resu_mode.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-"""Build presentations of the given types for all fields of the given file."""
-#print "Import %s..." % theFileName.split('/')[-1],
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-# Get viewScalarMap
-aView = GetRenderView()
-
-# Create required presentations for the proxy
-# CreatePrsForProxy(aProxy, aView, thePrsTypeList, thePictureDir, thePictureExt, theIsAutoDelete)
-aFieldEntity = EntityType.NODE
-aFieldName = "MODES___DEPL____________________"
-
-#create Iso Surfaces presentations for 10 timestamps
-for i in range(1,11):
- #hide_all(aView, True)
- aPrs = IsoSurfacesOnField(aProxy, aFieldEntity,aFieldName , i)
- if aPrs is None:
- raise RuntimeError("Presentation is None!!!")
- #display only current scalar map
- display_only(aPrs, aView)
- reset_view(aView)
- Render(aView)
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- prs_type = PrsTypeEnum.ISOSURFACES
-
- # Get name of presentation type
- prs_name = PrsTypeEnum.get_name(prs_type)
- f_prs_type = prs_name.replace(' ', '').upper()
- # Construct image file name
- pic_name = picturedir + aFieldName + "_" + str(i) + "_" + f_prs_type + "." + pictureext
-
- # Show and record the presentation
- process_prs_for_test(aPrs, aView, pic_name)
-
-
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A0 B0 E1 F1)
-
-SET(EXTRA_TESTS A1 A2 A3 A4 A5 A6 A7 A8 A9 B1 B2
- E0 E2 E3 E4 E5 E6 E7 E8 E9 F2 F3 F4 F5 F6 F8 F9 G0 G1 G2)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/A0 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/A0")
-
-file = datadir + "fra.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/A1 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/A1")
-
-file = datadir + "hexa_28320_ELEM.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/A2 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/A2")
-
-file = datadir + "pointe.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/A3 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/A3")
-
-file = datadir + "Fields_group3D.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/A4 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/A4")
-
-file = datadir + "Hexa8.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/A5 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/A5")
-
-file = datadir + "Penta6.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/A6 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/A6")
-
-file = datadir + "clo.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/A7 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/A7")
-
-file = datadir + "Tetra4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/A8 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/A8")
-
-file = datadir + "Tria3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/A9 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/A9")
-
-file = datadir + "Quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/B0 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/B0")
-
-file = datadir + "carre_en_quad4_seg2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/B1 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/B1")
-
-file = datadir + "carre_en_quad4_seg2_fields.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/B2 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/B2")
-
-file = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME MESH_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/MeshPresentation)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" MESH BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" MESH EXTRA)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/E0 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/E0")
-
-file = datadir + "test_55_solid_concentr_dom.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/E1 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/E1")
-
-file = datadir + "H_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/E2 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/E2")
-
-file = datadir + "cas2_2d_couplage_chess_castem.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/E3 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/E3")
-
-file = datadir + "hydro_d10.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/E4 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/E4")
-
-file = datadir + "champc.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/E5 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/E5")
-
-file = datadir + "hydro_sea_alv.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/E6 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/E6")
-
-file = datadir + "toto.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/E7 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/E7")
-
-file = datadir + "couplex_alain.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/E8 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/E8")
-
-file = datadir + "KCOUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/E9 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/E9")
-
-file = datadir + "test_hydro.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/F0 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/F0")
-
-file = datadir + "gro5couches.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/F1 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/F1")
-
-file = datadir + "ml.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/F2 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/F2")
-
-file = datadir + "T_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/F3 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/F3")
-
-file = datadir + "test_hydro_darcy4_out.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/F4 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/F4")
-
-file = datadir + "UO2_250ans.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/F5 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/F5")
-
-file = datadir + "maill.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/F6 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/F6")
-
-file = datadir + "maill.0.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/F8 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/F8")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/F9 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/F9")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/G0 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/G0")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/G1 case
-# Create Mesh Presentation for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("MeshPresentation/G1")
-
-file = datadir + "maill.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.MESH], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/G3 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/G3")
-
-theFileName = datadir + "Box1.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "Box1"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name, entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/G4 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/G4")
-
-theFileName = datadir + "Box1Moderate.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "Box1Moderate"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/G5 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/G5")
-
-theFileName = datadir + "Box2.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "Box2"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/G6 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/G6")
-
-theFileName = datadir + "Box2Moderate.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "Box2Moderate"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/G7 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/G7")
-
-theFileName = datadir + "Box3.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "Box3"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/G8 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/G8")
-
-theFileName = datadir + "BoxEvenSmaller1.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "BoxEvenSmaller1"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/G9 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/G9")
-
-theFileName = datadir + "BoxHexa1.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "BoxHexa1"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/H0 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/H0")
-
-theFileName = datadir + "BoxHexa2.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "BoxHexa2"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/H1 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/H1")
-
-theFileName = datadir + "BoxModSmall1.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "BoxModSmall1"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/H2 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/H2")
-
-theFileName = datadir + "BoxModSmall2.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "BoxModSmall2"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/H3 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/H3")
-
-theFileName = datadir + "BoxTetra2.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "BoxTetra2"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/H4 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/H4")
-
-theFileName = datadir + "ComplexIncludedTetra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "ComplexIncludedTetra"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/H5 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/H5")
-
-theFileName = datadir + "ComplexIncludingTetra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "ComplexIncludingTetra"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/H6 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/H6")
-
-theFileName = datadir + "CornerTetra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "CornerTetra"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/H7 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/H7")
-
-theFileName = datadir + "DegenEdgeXY.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "DegenEdgeXY"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/H8 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/H8")
-
-theFileName = datadir + "DegenFaceXYZ.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "DegenFaceXYZ"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/H9 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/H9")
-
-theFileName = datadir + "DegenTranslatedInPlane.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "DegenTranslatedInPlane"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/I0 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/I0")
-
-theFileName = datadir + "TinyBox.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "TinyBox"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/I1 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/I1")
-
-theFileName = datadir + "TrickyTetra1.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "TrickyTetra1"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/I2 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/I2")
-
-theFileName = datadir + "UnitTetra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "UnitTetra"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/I3 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/I3")
-
-theFileName = datadir + "UnitTetraDegenT.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "UnitTetraDegenT"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/I4 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/I4")
-
-theFileName = datadir + "square1.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "Mesh_2"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/I5 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/I5")
-
-theFileName = datadir + "square1_split1.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "Mesh_2_1"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/I6 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/I6")
-
-theFileName = datadir + "square1_split2.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "Mesh_2_2"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/I7 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/I7")
-
-theFileName = datadir + "square1_split3.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "Mesh_2_3"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/I8 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/I8")
-
-theFileName = datadir + "square2.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "Mesh_3"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/I9 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/I9")
-
-theFileName = datadir + "square2_split1.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "Mesh_3_1"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/J0 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/J0")
-
-theFileName = datadir + "DividedGenTetra1.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "DividedGenTetra1"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/J1 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/J1")
-
-theFileName = datadir + "DividedGenTetra2.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "DividedGenTetra2"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/J2 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/J2")
-
-theFileName = datadir + "DividedUnitTetra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "DividedUnitTetra"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/J3 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/J3")
-
-theFileName = datadir + "DividedUnitTetraSimpler.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "DividedUnitTetraSimpler"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/J4 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/J4")
-
-theFileName = datadir + "GenTetra1.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "GenTetra1"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/J5 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/J5")
-
-theFileName = datadir + "GenTetra2.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "GenTetra2"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/J6 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/J6")
-
-theFileName = datadir + "GeneralTetra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "GeneralTetra"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/J7 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/J7")
-
-theFileName = datadir + "HalfstripOnly.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "HalfstripOnly"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/J8 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/J8")
-
-theFileName = datadir + "HalfstripOnly2.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "HalfstripOnly2"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/J9 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/J9")
-
-theFileName = datadir + "LargeInconsistentTetra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "LargeInconsistent"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/K0 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/K0")
-
-theFileName = datadir + "LargeUnitTetra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "LargeUnitTetra"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/K1 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/K1")
-
-theFileName = datadir + "MovedHexaBox1.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "MovedHexaBox1"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/K2 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/K2")
-
-theFileName = datadir + "MovedHexaBox2.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "MovedHexaBox2"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/K3 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/K3")
-
-theFileName = datadir + "NudgedDividedUnitTetra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "NudgedDividedUnitTetra"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/K4 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/K4")
-
-theFileName = datadir + "NudgedDividedUnitTetraSimpler.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "NudgedDividedUnitTetraSimpler"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/K5 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/K5")
-
-theFileName = datadir + "NudgedSimpler.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "NudgedSimpler"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/K6 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/K6")
-
-theFileName = datadir + "NudgedTetra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "NudgedTetra"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/K7 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/K7")
-
-theFileName = datadir + "SimpleHalfstripOnly.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "SimpleHalfstripOnly"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/K8 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/K8")
-
-theFileName = datadir + "SimpleIncludedTetra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "SimpleIncludedTetra"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/K9 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/K9")
-
-theFileName = datadir + "SimpleIncludingTetra.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "SimpleIncludingTetra"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/L0 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/L0")
-
-theFileName = datadir + "square2_split2.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "Mesh_3_2"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/MeshPresentation/L0 case
-# Create mesh presentation for nodes and cells of the the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("MeshPresentation/L1")
-
-theFileName = datadir + "Bug829_resu_mode.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-
-aView = GetRenderView()
-
-#%Creation of the mesh presentation%
-mesh_name = "MAIL"
-
-#^Presentation on "onNodes" and '"onCells" family^
-entity_types = [EntityType.NODE,EntityType.CELL]
-for entity_type in entity_types:
- entity_name = EntityType.get_name(entity_type)
- mesh = MeshOnEntity(aProxy, mesh_name ,entity_type)
- if mesh is None:
- msg = "ERROR!!!Presentation of mesh on '"+entity_name+"' family wasn't created..."
- raise RuntimeError(msg)
- mesh.Visibility=1
- reset_view(aView)
- Render()
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- entity_name = EntityType.get_name(entity_type)
- # Construct image file name
- pic_name = picturedir + mesh_name + "_" + entity_name + "." + pictureext
-
- process_prs_for_test(mesh, aView, pic_name)
-
-
-
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A0 B0 E2 F2 G3 H1 I0 J0 K1 L0)
-
-SET(EXTRA_TESTS A1 A2 A3 A4 A5 A6 A7 A8 A9 B1 B2 E0 E1 E3 E4 E5 E6 E7 E8 E9
- F1 F3 F4 F5 F6 F8 F9 G0 G1 G4 G5 G6 G7 G8 G9
- H0 H2 H3 H4 H5 H6 H7 H8 H9 I1 I2 I3 I4 I5 I6 I7 I8 I9
- J1 J2 J3 J4 J5 J6 J7 J8 J9 K0 K2 K3 K4 K5 K6 K7 K8 K9 L1)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/A0 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/A0")
-
-file = datadir + "fra.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/A1 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/A1")
-
-file = datadir + "hexa_28320_ELEM.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/A2 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/A2")
-
-file = datadir + "pointe.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/A3 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/A3")
-
-file = datadir + "Fields_group3D.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/A4 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/A4")
-
-file = datadir + "Hexa8.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/A5 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/A5")
-
-file = datadir + "Penta6.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/A6 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/A6")
-
-file = datadir + "clo.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/A7 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/A7")
-
-file = datadir + "Tetra4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/A8 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/A8")
-
-file = datadir + "Tria3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/A9 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/A9")
-
-file = datadir + "Quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/B0 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/B0")
-
-file = datadir + "carre_en_quad4_seg2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/B1 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/B1")
-
-file = datadir + "carre_en_quad4_seg2_fields.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/B2 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/B2")
-
-file = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME PLOT3D_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/Plot3D)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" PLOT3D BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" PLOT3D EXTRA)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/E0 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/E0")
-
-file = datadir + "test_55_solid_concentr_dom.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/E1 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/E1")
-
-file = datadir + "H_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/E2 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/E2")
-
-file = datadir + "cas2_2d_couplage_chess_castem.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/E3 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/E3")
-
-file = datadir + "hydro_d10.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/E4 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/E4")
-
-file = datadir + "champc.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/E5 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/E5")
-
-file = datadir + "hydro_sea_alv.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/E6 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/E6")
-
-file = datadir + "toto.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/E7 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/E7")
-
-file = datadir + "couplex_alain.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/E8 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/E8")
-
-file = datadir + "KCOUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/E9 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/E9")
-
-file = datadir + "test_hydro.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/F1 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/F1")
-
-file = datadir + "ml.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/F2 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/F2")
-
-file = datadir + "T_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/F3 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/F3")
-
-file = datadir + "test_hydro_darcy4_out.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/F4 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/F4")
-
-file = datadir + "UO2_250ans.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/F5 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/F5")
-
-file = datadir + "maill.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/F6 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/F6")
-
-file = datadir + "maill.0.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/F8 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/F8")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/F9 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/F9")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/G0 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/G0")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/G1 case
-# Create Plot3D for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Plot3D/G1")
-
-file = datadir + "maill.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.PLOT3D], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Plot3D/G2 case
-# Create Plot 3D for field of the the given MED file for 10 timestamps%
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-from pvsimple import *
-
-picturedir = get_picture_dir("Plot3D/G2")
-
-theFileName = datadir + "Bug829_resu_mode.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-
-#print "Import %s..." % theFileName.split('/')[-1],
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-# Get viewScalarMap
-aView = GetRenderView()
-
-aFieldEntity = EntityType.NODE
-aFieldName = "MODES___DEPL____________________"
-
-#create Plot 3D presentations for 10 timestamps
-for i in range(1,11):
- hide_all(aView, True)
- aPrs = Plot3DOnField(aProxy, aFieldEntity,aFieldName , i)
- if aPrs is None:
- raise RuntimeError("Presentation is None!!!")
- #display only current scalar map
- aPrs.Visibility=1
- reset_view(aView)
- Render(aView)
-
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- prs_type = PrsTypeEnum.PLOT3D
-
- # Get name of presentation type
- prs_name = PrsTypeEnum.get_name(prs_type)
- f_prs_type = prs_name.replace(' ', '').upper()
- # Construct image file name
- pic_name = picturedir + aFieldName + "_" + str(i) + "_" + f_prs_type + "." + pictureext
-
- # Show and record the presentation
- process_prs_for_test(aPrs, aView, pic_name)
-
-
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A1 B0 E0 F1 G0)
-
-SET(EXTRA_TESTS A0 A2 A3 A4 A5 A6 A7 A8 A9 B1 B2 E1 E2 E3 E4 E5 E6 E7 E8 E9
- F2 F3 F4 F5 F6 F8 F9 G1 G2)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/A1 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-#====================Stage1: Importing MED file====================
-
-print("**** Stage1: Importing MED file")
-
-print('Import "ResOK_0000.med"...............', end=' ')
-file_path = datadir + "ResOK_0000.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-cell_entity = EntityType.CELL
-node_entity = EntityType.NODE
-
-#====================Stage2: Displaying vector field===============
-
-print("**** Stage3: Displaying vector field")
-
-print('Get view...................', end=' ')
-view = pvsimple.GetRenderView()
-if view is None:
- print("FAILED")
-else:
- reset_view(view)
- print("OK")
-
-print("Creating Scalar Map.......", end=' ')
-scalarmap = ScalarMapOnField(med_reader, node_entity, 'vitesse', 1)
-if scalarmap is None:
- print("FAILED")
-else:
- bar = get_bar()
- bar.Orientation = 'Horizontal'
- bar.Position = [0.1, 0.1]
- #bar.Position2 = [0.1, 0.25]
- bar.AspectRatio = 3
-
- display_only(scalarmap, view)
- print("OK")
-
-view.ResetCamera()
-
-print("Creating Stream Lines.....", end=' ')
-streamlines = StreamLinesOnField(med_reader, node_entity, 'vitesse', 1)
-if streamlines is None:
- print("FAILED")
-else:
- display_only(streamlines, view)
- print("OK")
-
-print("Creating Vectors..........", end=' ')
-vectors = VectorsOnField(med_reader, node_entity, 'vitesse', 1)
-if vectors is None:
- print("FAILED")
-else:
- display_only(vectors, view)
- print("OK")
-
-print("Creating Iso Surfaces.....", end=' ')
-isosurfaces = IsoSurfacesOnField(med_reader, node_entity, 'vitesse', 1)
-if isosurfaces is None:
- print("FAILED")
-else:
- display_only(isosurfaces, view)
- print("OK")
-
-print("Creating Cut Planes.......", end=' ')
-cutplanes = CutPlanesOnField(med_reader, node_entity, 'vitesse', 1,
- nb_planes=30, orientation=Orientation.YZ)
-if cutplanes is None:
- print("FAILED")
-else:
- display_only(cutplanes, view)
- print("OK")
-
-print("Creating Scalar Map On Deformed Shape.......", end=' ')
-scalarmapondefshape = DeformedShapeAndScalarMapOnField(med_reader,
- node_entity,
- 'vitesse', 2,
- None,
- cell_entity,
- 'pression')
-if scalarmapondefshape is None:
- print("FAILED")
-else:
- display_only(scalarmapondefshape, view)
- print("OK")
-
-#====================Stage3: Another Med file import====================
-
-print('Import "Fields_group3D.med"...............', end=' ')
-file_path = datadir + "Fields_group3D.med"
-pvsimple.OpenDataFile(file_path)
-med_reader1 = pvsimple.GetActiveSource()
-
-if med_reader1 is None:
- print("FAILED")
-else:
- print("OK")
-
-#====================Stage4: Displaying scalar field====================
-
-print("**** Stage4: Displaying scalar field")
-
-print("Creating Scalar Map.......", end=' ')
-scalarmap1 = ScalarMapOnField(med_reader1, cell_entity, 'scalar field', 1)
-if scalarmap1 is None:
- print("FAILED")
-else:
- display_only(scalarmap1, view)
- print("OK")
-
-view.ResetCamera()
-
-print("Creating Iso Surfaces.....", end=' ')
-isosurfaces1 = IsoSurfacesOnField(med_reader1, cell_entity, 'scalar field', 1)
-if isosurfaces1 is None:
- print("FAILED")
-else:
- display_only(isosurfaces1, view)
- print("OK")
-
-print("Creating Cut Planes.......", end=' ')
-cutplanes1 = CutPlanesOnField(med_reader1, cell_entity, 'scalar field', 1,
- orientation=Orientation.YZ)
-if cutplanes1 is None:
- print("FAILED")
-else:
- print("OK")
-
-slice_filter = pvsimple.GetActiveSource()
-slice_filter.SliceType.Normal = [1.0, 0.0, 0.0]
-display_only(cutplanes1, view)
-
-print("Creating Scalar Map On Deformed Shape.......", end=' ')
-scalarmapondefshape1 = DeformedShapeAndScalarMapOnField(med_reader1,
- cell_entity,
- 'vectoriel field', 1)
-if scalarmapondefshape1 is None:
- print("FAILED")
-else:
- display_only(scalarmapondefshape1, view)
- print("OK")
-
-#====================Stage5: Object browser popup====================
-
-print("**** Stage5: Object browser popup")
-
-print("Creating mesh.............", end=' ')
-
-mesh_name = 'mailles_MED'
-mesh = MeshOnEntity(med_reader1, mesh_name, cell_entity)
-if mesh is None:
- print("FAILED")
-else:
- display_only(mesh, view)
- print("OK")
-
-print("Changing type of presentation of mesh:")
-mesh.Representation = 'Wireframe'
-pvsimple.Render()
-prs_type = mesh.Representation
-print("Presentation type..", prs_type)
-
-mesh.Representation = 'Points'
-pvsimple.Render()
-prs_type = mesh.Representation
-print("Presentation type..", prs_type)
-
-mesh.Representation = 'Surface'
-pvsimple.Render()
-prs_type = mesh.Representation
-print("Presentation type..", prs_type)
-
-shrink = pvsimple.Shrink(med_reader1)
-mesh_shrinked = pvsimple.GetRepresentation(shrink)
-display_only(mesh_shrinked, view)
-
-print("Changing color of mesh....", end=' ')
-color = [0, 0, 1]
-mesh.DiffuseColor = color
-display_only(mesh, view)
-print("OK")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/A3 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-print('Importing "TimeStamps.med"...............', end=' ')
-file_path = datadir + "TimeStamps.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating Cut Lines........................", end=' ')
-med_field = "vitesse"
-cutlines = CutLinesOnField(med_reader, EntityType.NODE, med_field, 1,
- nb_lines=20,
- orientation1=Orientation.XY,
- orientation2=Orientation.ZX)
-if cutlines is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Getting a viewer.........................", end=' ')
-view = pvsimple.GetRenderView()
-if view is None:
- print("FAILED")
-else:
- reset_view(view)
- print("OK")
-
-cutlines.Visibility = 1
-view.ResetCamera()
-pvsimple.Render()
-
-print("Creating an Animation.....................", end=' ')
-scalarmap = ScalarMapOnField(med_reader, EntityType.NODE, med_field, 2)
-
-scene = pvsimple.AnimateReader(med_reader, view)
-if scene is None:
- print("FAILED")
-else:
- print("OK")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/A4 case
-
-import math
-import random
-from time import sleep
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-DELAY = 0.25
-
-# Get view
-view = pvsimple.GetRenderView()
-sleep(DELAY)
-
-# Destroy the view
-delete_pv_object(view)
-
-
-# Create view and set background
-view = pvsimple.CreateRenderView()
-reset_view(view)
-
-color = [0, 0.3, 1]
-view.Background = color
-pvsimple.Render()
-
-# Import MED file
-med_file = datadir + "pointe.med"
-field_name = "fieldnodedouble"
-entity = EntityType.NODE
-timestamp = 1
-
-pvsimple.OpenDataFile(med_file)
-med_reader = pvsimple.GetActiveSource()
-
-
-# Create scalar map
-scalarmap = ScalarMapOnField(med_reader, entity, field_name, timestamp)
-print("ScalarMapOnField(...)")
-pvsimple.Show(scalarmap.Input)
-
-# Set view properties
-print("view.CameraFocalPoint = [0, 0, 0]")
-view.CameraFocalPoint = [0, 0, 0]
-print("view.CameraParallelScale = 2")
-view.CameraParallelScale = 2
-print("pvsimple.ResetCamera(view)")
-pvsimple.ResetCamera(view)
-
-# Play with scalar bar
-bar = get_bar()
-lt = bar.LookupTable
-
-range_min = lt.RGBPoints[0]
-range_max = lt.RGBPoints[4]
-delta = (range_max - range_min) / 2.0
-nb_colors = lt.NumberOfTableValues
-nb_colors = 64
-lt.Discretize = 1
-for i in range(2, nb_colors):
- lt.NumberOfTableValues = nb_colors
- x = range_min + delta * i / nb_colors
- y = range_max - delta * i / nb_colors
- lt.RGBPoints[0] = x
- lt.RGBPoints[4] = y
- pvsimple.Render(view)
- sleep(DELAY / 4.0)
-
-lt.RGBPoints[0] = range_min
-lt.RGBPoints[4] = range_max
-
-print("pvsimple.ResetCamera(view)")
-pvsimple.Render(view)
-sleep(DELAY)
-
-# Destroy the view
-print("Destroy the view with Scalar Map")
-delete_pv_object(view)
-
-
-# Create another view for cut planes
-view = pvsimple.CreateRenderView()
-reset_view(view)
-
-color = [0, 0.7, 0]
-view.Background = color
-pvsimple.Render(view)
-
-displacement = 0.5
-orient = Orientation.YZ
-cutplanes = CutPlanesOnField(med_reader, entity, field_name, timestamp,
- orientation=orient,
- displacement=displacement)
-print("CutPlanesOnField(...)")
-
-display_only(cutplanes, view)
-print("display_only(cutplanes, view)")
-
-cam_pos = view.CameraPosition
-cam_pos[0] = cam_pos[0] + 10
-print("Set view.CameraPosition")
-cutplanes.Scale[0] = 3
-cutplanes.Scale[1] = 10
-pvsimple.Render(view)
-sleep(DELAY)
-
-pvsimple.ResetCamera(view)
-
-slice_filter = cutplanes.Input
-offset_vals = slice_filter.SliceOffsetValues
-nb_planes = len(offset_vals)
-nb_planes = 30
-bounds = get_bounds(med_reader)
-for i in range(nb_planes, 1, -1):
- x = math.pi / 2.0 * (nb_planes - i) / nb_planes
- y = math.pi / 2.0 * (nb_planes - i) / nb_planes
- normal = get_normal_by_orientation(orient, x, y)
- slice_filter.SliceType.Normal = normal
- pos = get_positions(i, normal, bounds, displacement)
- slice_filter.SliceOffsetValues = pos
- pvsimple.Render(view)
- sleep(DELAY)
-
-nb_planes = 10
-normal = [0, 1, 0]
-slice_filter.SliceType.Normal = normal
-for i in range(1, nb_planes):
- pos = get_positions(i, normal, bounds, displacement)
- slice_filter.SliceOffsetValues = pos
- pvsimple.Render(view)
- sleep(DELAY)
-
-slice_filter.SliceType.Normal = [0, 0, 1]
-slice_filter.UpdatePipeline()
-print("pvsimple.ResetCamera(view)")
-pvsimple.ResetCamera(view)
-sleep(DELAY)
-
-# Destroy the view
-print("Destroy the view with Cut Planes")
-delete_pv_object(view)
-
-
-# Create one more view for isosurfaces
-view = pvsimple.CreateRenderView()
-reset_view(view)
-
-color = [1, 0.7, 0]
-view.Background = color
-pvsimple.Render(view)
-sleep(DELAY)
-
-isosurf = IsoSurfacesOnField(med_reader, entity, field_name, timestamp)
-print("IsoSurfacesOnField(...)")
-display_only(isosurf, view)
-pvsimple.ResetCamera(view)
-print("display_only(isosurf, view)")
-sleep(DELAY)
-
-contour = isosurf.Input
-nb_surfaces = len(contour.Isosurfaces)
-nb_surfaces = 32
-scalar_range = get_data_range(med_reader, entity, field_name, cut_off=True)
-for i in range(2, nb_surfaces):
- contours = get_contours(scalar_range, i)
- contour.Isosurfaces = contours
- pvsimple.Render(view)
- sleep(DELAY)
-
-contour.Isosurfaces = get_contours(scalar_range, 10)
-contour.UpdatePipeline()
-print("pvsimple.ResetCamera(view)")
-pvsimple.ResetCamera(view)
-sleep(DELAY)
-
-# Destroy the view
-print("Destroy the view with Iso Surfaces")
-delete_pv_object(view)
-
-
-# Create one more view for cut lines
-view = pvsimple.CreateRenderView()
-reset_view(view)
-
-color = [0.7, 0.7, 0.7]
-view.Background = color
-pvsimple.Render(view)
-sleep(DELAY)
-
-cutlines, curves = CutLinesOnField(med_reader, entity, field_name, timestamp,
- orientation1=Orientation.ZX,
- orientation2=Orientation.YZ,
- generate_curves=True)
-print("CutLinesOnField(...)")
-display_only(cutlines, view)
-pvsimple.ResetCamera(view)
-print("display_only(cutlines, view)")
-sleep(DELAY)
-
-xy_view = pvsimple.CreateXYPlotView()
-print("pvsimple.CreateXYPlotView()")
-index = 0
-for curve in curves:
- xyrep = pvsimple.Show(curve, xy_view)
- xyrep.AttributeType = 'Point Data'
- xyrep.UseIndexForXAxis = 0
- xyrep.XArrayName = 'arc_length'
- pvsimple.Render(xy_view)
- set_visible_lines(xyrep, [field_name])
- xyrep.SeriesLabel = [field_name, 'Y' + str(index)]
- r = str(random.random())
- g = str(random.random())
- b = str(random.random())
- xyrep.SeriesColor = [field_name, r, g, b]
- index += 1
-
-pvsimple.Render(xy_view)
-sleep(DELAY)
-
-# Destroy two views
-#print "Destroy two views: with Cut Lines and the curves"
-#delete_pv_object(view)
-#delete_pv_object(xy_view)
-
-# Create one more view for animation
-view = pvsimple.CreateRenderView()
-reset_view(view)
-
-med_file = datadir + "TimeStamps.med"
-field_name = "vitesse"
-entity = EntityType.NODE
-timestamp = 2
-
-pvsimple.OpenDataFile(med_file)
-med_reader = pvsimple.GetActiveSource()
-
-isosurf = IsoSurfacesOnField(med_reader, entity, field_name, timestamp)
-print("IsoSurfacesOnField(...)")
-pvsimple.ResetCamera(view)
-
-print("Start Animation")
-pvsimple.AnimateReader(med_reader, view)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/A5 case
-# Create table and display it as curves
-
-from paravistest import tablesdir
-import pvsimple
-from presentations import delete_pv_object
-
-# Define script for table creation
-script = """
-import math
-
-
-# Get table output
-table = self.GetTableOutput()
-
-nb_rows = 10
-nb_cols = 200
-
-# Create first column
-col1 = vtk.vtkDoubleArray()
-col1.SetName('Frequency')
-for i in xrange(0, nb_rows):
- col1.InsertNextValue(i * 10 + 1)
-table.AddColumn(col1)
-
-# Create the rest columns
-for i in xrange(1, nb_cols + 1):
- col = vtk.vtkDoubleArray()
- col.SetName('Power ' + str(i))
-
- # Fill the next column
- for j in xrange(0, nb_rows):
- if j % 2 == 1:
- col.InsertNextValue(math.log10(j * 30 * math.pi / 180) * 20 + i * 15 + j * 5)
- else:
- col.InsertNextValue(math.sin(j * 30 * math.pi / 180) * 20 + i * 15 + j * 5)
-
- table.AddColumn(col)
-"""
-
-# Creating programmable source (table)
-ps = pvsimple.ProgrammableSource()
-ps.OutputDataSetType = 'vtkTable'
-ps.Script = script
-pvsimple.RenameSource("Very useful data", ps)
-ps.UpdatePipeline()
-
-# Display curves
-cur_view = pvsimple.GetRenderView()
-if cur_view:
- delete_pv_object(cur_view)
-xy_view = pvsimple.CreateXYPlotView()
-xy_view.ChartTitle = 'Very useful data'
-xy_view.BottomAxisTitle = '[ Wt ]'
-xy_view.LeftAxisTitle = 'Frequency [ Hz ]'
-
-xy_rep = pvsimple.Show(ps)
-xy_rep.AttributeType = 'Row Data'
-xy_rep.UseIndexForXAxis = 0
-xy_rep.XArrayName = 'Frequency'
-xy_rep.SeriesVisibility = ['Frequency', '0']
-
-pvsimple.Render()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/A6 case
-# Import a table from file and show it in 2D viewer
-
-from paravistest import tablesdir
-from presentations import *
-import pvsimple
-
-# Import table from CSV file
-file_path = tablesdir + "sinus.csv"
-sinus_csv = pvsimple.CSVReader(FileName=file_path)
-
-# Import settings
-sinus_csv.DetectNumericColumns = 1
-sinus_csv.UseStringDelimiter = 1
-sinus_csv.FieldDelimiterCharacters = ' '
-sinus_csv.HaveHeaders = 1
-
-# Display curve
-cur_view = pvsimple.GetRenderView()
-if cur_view:
- delete_pv_object(cur_view)
-xy_view = pvsimple.CreateXYPlotView()
-
-xy_rep = pvsimple.Show(sinus_csv)
-xy_rep.AttributeType = 'Row Data'
-xy_rep.UseIndexForXAxis = 0
-xy_rep.XArrayName = 'x'
-xy_rep.SeriesVisibility = ['x', '0']
-
-pvsimple.Render()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/A7 case
-
-import time
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-view = pvsimple.GetRenderView()
-reset_view(view)
-delay = 1
-
-def after_set(error_string, prop_name, old_value, new_value):
- print(prop_name, ": old_value = ", old_value, "new_value = ", new_value)
- if error_string == "":
- time.sleep(delay)
- else:
- print(prop_name, " error = ", error_string)
- pass
- pass
-
-
-def change_representation(prs, repres, opacity, linew):
- if prs is None:
- print("FAILED")
- return
- else:
- print("OK")
-
- display_only(prs, view)
- view.ResetCamera()
-
- time.sleep(delay)
-
- old_prs_type = prs.Representation
- if old_prs_type != repres:
- err_str = ''
- try:
- prs.Representation = repres
- except:
- err_str = "Error"
- after_set(err_str, "Representation", old_prs_type, repres)
- pass
-
- old_opacity = prs.Opacity
- if old_opacity != opacity:
- err_str = ''
- try:
- prs.Opacity = opacity # double value [0, 1]
- except:
- err_str = "Error"
- after_set(err_str, "Opacity", old_opacity, opacity)
- pass
-
- old_linew = prs.LineWidth
- if old_linew != linew:
- err_str = ''
- try:
- prs.LineWidth = linew # double value, recommended round [1, 10]
- except:
- err_str = "Error"
- after_set(err_str, "LineWidth", old_linew, linew)
- pass
-
- print("")
- pass
-
-
-# ResOK_0000.med
-
-print('Import "ResOK_0000.med"...............', end=' ')
-file_path = datadir + "ResOK_0000.med"
-field_name = 'vitesse'
-node_entity = EntityType.NODE
-
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating Scalar Map.......", end=' ')
-scmap = ScalarMapOnField(med_reader, node_entity, field_name, 1)
-change_representation(scmap, 'Surface With Edges', 0.3, 5)
-
-print("Creating Stream Lines.......", end=' ')
-slines = StreamLinesOnField(med_reader, node_entity, field_name, 1)
-change_representation(slines, 'Wireframe', 0.5, 3)
-
-print("Creating Vectors..........", end=' ')
-vec = VectorsOnField(med_reader, node_entity, field_name, 1)
-change_representation(vec, 'Wireframe', 0.7, 2)
-
-print("Creating Iso Surfaces.....", end=' ')
-iso = IsoSurfacesOnField(med_reader, node_entity, field_name, 1)
-change_representation(iso, 'Surface', 0.4, 8)
-
-print("Creating Cut Planes.......", end=' ')
-clines = CutPlanesOnField(med_reader, node_entity, field_name, 1)
-change_representation(clines, 'Points', 0.6, 4)
-
-
-# fra.med
-
-print('Import "fra.med"...............', end=' ')
-file_path = datadir + "fra.med"
-field_name = 'VITESSE'
-
-pvsimple.SetActiveSource(None)
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating Scalar Map.......", end=' ')
-scmap = ScalarMapOnField(med_reader, node_entity, field_name, 1)
-change_representation(scmap, 'Wireframe', 0.5, 3)
-
-print("Creating Iso Surfaces.....", end=' ')
-iso = IsoSurfacesOnField(med_reader, node_entity, field_name, 1)
-change_representation(iso, 'Wireframe', 0.5, 3)
-
-print("Creating Cut Planes.......", end=' ')
-cplanes = CutPlanesOnField(med_reader, node_entity, field_name, 1)
-change_representation(cplanes, 'Surface', 0.5, 3)
-
-print("Creating Scalar Map On Deformed Shape.......", end=' ')
-defmap = DeformedShapeAndScalarMapOnField(med_reader, node_entity,
- field_name, 1)
-change_representation(defmap, 'Surface', 0.5, 3)
-
-print("Creating Deformed Shape.......", end=' ')
-defshape = DeformedShapeOnField(med_reader, node_entity, field_name, 1)
-defshape.ColorArrayName = field_name
-change_representation(defshape, 'Wireframe', 0.5, 3)
-
-print("Creating Cut Lines.......", end=' ')
-clines = CutLinesOnField(med_reader, node_entity, field_name, 1)
-change_representation(clines, 'Wireframe', 0.5, 3)
-
-print("Creating Plot 3D.......", end=' ')
-plot3d = Plot3DOnField(med_reader, node_entity, field_name, 1)
-change_representation(plot3d, 'Surface', 0.5, 3)
-change_representation(plot3d, 'Outline', 0.8, 2)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/A8 case
-# Create table
-
-import pvsimple
-
-# Define script for table creation
-script = """
-import math
-
-
-# Get table output
-table = self.GetTableOutput()
-
-nb_rows = 10
-nb_cols = 200
-
-# Create first column
-col1 = vtk.vtkDoubleArray()
-col1.SetName('Frequency')
-for i in xrange(0, nb_rows):
- col1.InsertNextValue(i * 10 + 1)
-table.AddColumn(col1)
-
-# Create the rest columns
-for i in xrange(1, nb_cols + 1):
- col = vtk.vtkDoubleArray()
- col.SetName('Power ' + str(i))
-
- # Fill the next column
- for j in xrange(0, nb_rows):
- if j % 2 == 1:
- col.InsertNextValue(math.log10(j * 30 * math.pi / 180) * 20 + i * 15 + j * 5)
- else:
- col.InsertNextValue(math.sin(j * 30 * math.pi / 180) * 20 + i * 15 + j * 5)
-
- table.AddColumn(col)
-"""
-
-# Creating programmable source (table)
-ps = pvsimple.ProgrammableSource()
-ps.OutputDataSetType = 'vtkTable'
-ps.Script = script
-pvsimple.RenameSource("Very useful data", ps)
-ps.UpdatePipeline()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/A9 case
-# Import MED file; create Scalar Map, Cut Planes, Cut Lines,
-# Cut Segment, Iso Surfaces, Animation; display curves.
-
-import math
-import random
-import sys
-from time import sleep
-
-from presentations import *
-
-
-# Delay
-DELAY = 0.25
-
-# MED files and table directories
-samples_dir = os.getenv("DATA_DIR")
-datadir = None
-tablesdir = None
-if samples_dir is not None:
- samples_dir = os.path.normpath(samples_dir)
- datadir = samples_dir + "/MedFiles/"
- tablesdir = samples_dir + "/Tables/"
-
-# Get view
-view = pvs.GetRenderView()
-sleep(DELAY)
-
-# Destroy the view
-delete_pv_object(view)
-
-
-# Create view and set background
-view = pvs.CreateRenderView()
-reset_view(view)
-
-color = [0, 0.3, 1]
-view.Background = color
-pvs.Render()
-
-# Load MED reader plugin
-pv_root_dir = os.getenv("PARAVIS_ROOT_DIR")
-if sys.platform == "win32":
- pvs.LoadPlugin(pv_root_dir + "/lib/paraview/MEDReaderPlugin.dll")
-elif sys.platform == "darwin":
- pvs.LoadPlugin(pv_root_dir + "/lib/paraview/libMEDReaderPlugin.dylib")
-else:
- pvs.LoadPlugin(pv_root_dir + "/lib/paraview/libMEDReaderPlugin.so")
-
-# Import MED file
-med_file = datadir + "pointe.med"
-field_name = "fieldnodedouble"
-entity = EntityType.NODE
-timestamp = 1
-
-med_reader = pvs.MEDReader(FileName=med_file)
-med_reader.UpdatePipeline()
-
-# Create scalar map
-scalarmap = ScalarMapOnField(med_reader, entity, field_name, timestamp)
-pvs.Show(scalarmap.Input)
-
-# Set view properties
-print("view.CameraFocalPoint = [0, 0, 0]")
-view.CameraFocalPoint = [0, 0, 0]
-print("view.CameraParallelScale = 2")
-view.CameraParallelScale = 2
-print("pvs.ResetCamera(view)")
-pvs.ResetCamera(view)
-
-# Play with scalar bar
-bar = get_bar()
-lt = bar.LookupTable
-
-range_min = lt.RGBPoints[0]
-range_max = lt.RGBPoints[4]
-delta = (range_max - range_min) / 2.0
-nb_colors = lt.NumberOfTableValues
-nb_colors = 64
-lt.Discretize = 1
-for i in range(2, nb_colors):
- lt.NumberOfTableValues = nb_colors
- x = range_min + delta * i / nb_colors
- y = range_max - delta * i / nb_colors
- lt.RGBPoints[0] = x
- lt.RGBPoints[4] = y
- pvs.Render(view)
- sleep(DELAY / 4.0)
-
-lt.RGBPoints[0] = range_min
-lt.RGBPoints[4] = range_max
-
-print("pvs.ResetCamera(view)")
-pvs.ResetCamera(view)
-
-# Create another view for cut planes
-view = pvs.CreateRenderView()
-reset_view(view)
-
-color = [0, 0.7, 0]
-view.Background = color
-pvs.Render(view)
-
-displacement = 0.5
-orient = Orientation.YZ
-cutplanes = CutPlanesOnField(med_reader, entity, field_name, timestamp,
- orientation=orient,
- displacement=displacement)
-print("CutPlanesOnField(...)")
-
-display_only(cutplanes, view)
-print("display_only(cutplanes, view)")
-
-cam_pos = view.CameraPosition
-cam_pos[0] = cam_pos[0] + 10
-print("Set view.CameraPosition")
-cutplanes.Scale[0] = 3
-cutplanes.Scale[1] = 10
-pvs.Render(view)
-sleep(DELAY)
-
-pvs.ResetCamera(view)
-
-slice_filter = cutplanes.Input
-offset_vals = slice_filter.SliceOffsetValues
-nb_planes = len(offset_vals)
-nb_planes = 30
-bounds = get_bounds(med_reader)
-for i in range(nb_planes, 1, -1):
- x = math.pi / 2.0 * (nb_planes - i) / nb_planes
- y = math.pi / 2.0 * (nb_planes - i) / nb_planes
- normal = get_normal_by_orientation(orient, x, y)
- slice_filter.SliceType.Normal = normal
- pos = get_positions(i, normal, bounds, displacement)
- slice_filter.SliceOffsetValues = pos
- pvs.Render(view)
- sleep(DELAY)
-
-nb_planes = 10
-normal = [0, 1, 0]
-slice_filter.SliceType.Normal = normal
-for i in range(1, nb_planes):
- pos = get_positions(i, normal, bounds, displacement)
- slice_filter.SliceOffsetValues = pos
- pvs.Render(view)
- sleep(DELAY)
-
-slice_filter.SliceType.Normal = [0, 0, 1]
-slice_filter.UpdatePipeline()
-print("pvs.ResetCamera(view)")
-pvs.ResetCamera(view)
-
-# Create one more view for iso surfaces
-view = pvs.CreateRenderView()
-reset_view(view)
-
-color = [1, 0.7, 0]
-view.Background = color
-pvs.Render(view)
-sleep(DELAY)
-
-isosurf = IsoSurfacesOnField(med_reader, entity, field_name, timestamp)
-display_only(isosurf, view)
-pvs.ResetCamera(view)
-print("display_only(isosurf, view)")
-sleep(DELAY)
-
-contour = isosurf.Input
-nb_surfaces = len(contour.Isosurfaces)
-nb_surfaces = 32
-scalar_range = get_data_range(med_reader, entity, field_name, cut_off=True)
-for i in range(2, nb_surfaces):
- contours = get_contours(scalar_range, i)
- contour.Isosurfaces = contours
- pvs.Render(view)
- sleep(DELAY)
-
-contour.Isosurfaces = get_contours(scalar_range, 10)
-contour.UpdatePipeline()
-print("pvs.ResetCamera(view)")
-pvs.ResetCamera(view)
-
-# Create one more view for cut lines
-view = pvs.CreateRenderView()
-reset_view(view)
-
-color = [0.7, 0.7, 0.7]
-view.Background = color
-pvs.Render(view)
-sleep(DELAY)
-
-cutlines, curves = CutLinesOnField(med_reader, entity, field_name, timestamp,
- orientation1=Orientation.ZX,
- orientation2=Orientation.YZ,
- generate_curves=True)
-print("CutLinesOnField(...)")
-display_only(cutlines, view)
-pvs.ResetCamera(view)
-print("display_only(cutlines, view)")
-sleep(DELAY)
-
-xy_view = pvs.CreateXYPlotView()
-print("pvs.CreateXYPlotView()")
-index = 0
-for curve in curves:
- xyrep = pvs.Show(curve, xy_view)
- xyrep.AttributeType = 'Point Data'
- xyrep.UseIndexForXAxis = 0
- xyrep.XArrayName = 'arc_length'
- pvs.Render(xy_view)
- set_visible_lines(xyrep, [field_name])
- xyrep.SeriesLabel = [field_name, 'Y' + str(index)]
- r = str(random.random())
- g = str(random.random())
- b = str(random.random())
- xyrep.SeriesColor = [field_name, r, g, b]
- index += 1
-
-pvs.Render(xy_view)
-sleep(DELAY)
-
-# Create one more view for cut segment
-view = pvs.CreateRenderView()
-reset_view(view)
-
-color = [0.0, 0.7, 0.3]
-view.Background = color
-pvs.Render(view)
-sleep(DELAY)
-
-point1 = [0.0, -1.0, 2.5]
-point2 = [0.0, 1.0, 2.5]
-cutsegment = CutSegmentOnField(med_reader, entity, field_name, timestamp,
- point1, point2)
-print("CutSegmentOnField(...)")
-display_only(cutsegment, view)
-pvs.ResetCamera(view)
-print("display_only(cutsegment, view)")
-sleep(DELAY)
-
-xy_view = pvs.CreateXYPlotView()
-curve = pvs.Show(cutsegment.Input, xy_view)
-curve.AttributeType = 'Point Data'
-curve.UseIndexForXAxis = 0
-curve.XArrayName = 'arc_length'
-set_visible_lines(xyrep, [field_name])
-
-pvs.Render(xy_view)
-sleep(DELAY)
-
-
-# Create one more view for animation
-view = pvs.CreateRenderView()
-reset_view(view)
-
-med_file = datadir + "TimeStamps.med"
-field_name = "vitesse"
-entity = EntityType.NODE
-timestamp = 2
-
-med_reader = pvs.MEDReader(FileName=med_file)
-
-isosurf = IsoSurfacesOnField(med_reader, entity, field_name, timestamp)
-pvs.ResetCamera(view)
-
-print("Start Animation")
-pvs.AnimateReader(med_reader, view)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/B0 case
-# Create table
-
-from paravistest import tablesdir
-import pvsimple
-
-# Define script for table creation
-script = """
-import math
-
-
-# Get table output
-table = self.GetTableOutput()
-
-nb_rows = 10
-nb_cols = 200
-
-# Create first column
-col1 = vtk.vtkDoubleArray()
-col1.SetName('Frequency')
-for i in xrange(0, nb_rows):
- col1.InsertNextValue(i * 10 + 1)
-table.AddColumn(col1)
-
-# Create the rest columns
-for i in xrange(1, nb_cols + 1):
- col = vtk.vtkDoubleArray()
- col.SetName('Power ' + str(i))
-
- # Fill the next column
- for j in xrange(0, nb_rows):
- if j % 2 == 1:
- col.InsertNextValue(math.log10(j * 30 * math.pi / 180) * 20 + i * 15 + j * 5)
- else:
- col.InsertNextValue(math.sin(j * 30 * math.pi / 180) * 20 + i * 15 + j * 5)
-
- table.AddColumn(col)
-"""
-
-# Creating programmable source (table)
-ps = pvsimple.ProgrammableSource()
-ps.OutputDataSetType = 'vtkTable'
-ps.Script = script
-pvsimple.RenameSource("Very useful data", ps)
-ps.UpdatePipeline()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/B1 case
-
-import math
-import random
-from time import sleep
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-DELAY = 0.25
-
-# Get view
-view = pvsimple.GetRenderView()
-sleep(DELAY)
-
-# Destroy the view
-delete_pv_object(view)
-
-
-# Create view and set background
-view = pvsimple.CreateRenderView()
-reset_view(view)
-
-color = [0, 0.3, 1]
-view.Background = color
-pvsimple.Render()
-
-# Import MED file
-med_file = datadir + "pointe.med"
-field_name = "fieldnodedouble"
-entity = EntityType.NODE
-timestamp = 1
-
-pvsimple.OpenDataFile(med_file)
-med_reader = pvsimple.GetActiveSource()
-
-
-# Create scalar map
-scalarmap = ScalarMapOnField(med_reader, entity, field_name, timestamp)
-print("ScalarMapOnField(...)")
-pvsimple.Show(scalarmap.Input)
-
-# Set view properties
-print("view.CameraFocalPoint = [0, 0, 0]")
-view.CameraFocalPoint = [0, 0, 0]
-print("view.CameraParallelScale = 2")
-view.CameraParallelScale = 2
-print("pvsimple.ResetCamera(view)")
-pvsimple.ResetCamera(view)
-
-# Play with scalar bar
-bar = get_bar()
-lt = bar.LookupTable
-
-range_min = lt.RGBPoints[0]
-range_max = lt.RGBPoints[4]
-delta = (range_max - range_min) / 2.0
-nb_colors = lt.NumberOfTableValues
-nb_colors = 64
-lt.Discretize = 1
-for i in range(2, nb_colors):
- lt.NumberOfTableValues = nb_colors
- x = range_min + delta * i / nb_colors
- y = range_max - delta * i / nb_colors
- lt.RGBPoints[0] = x
- lt.RGBPoints[4] = y
- pvsimple.Render(view)
- sleep(DELAY / 4.0)
-
-lt.RGBPoints[0] = range_min
-lt.RGBPoints[4] = range_max
-
-print("pvsimple.ResetCamera(view)")
-pvsimple.Render(view)
-sleep(DELAY)
-
-# Destroy the view
-print("Destroy the view with Scalar Map")
-delete_pv_object(view)
-
-
-# Create another view for cut planes
-view = pvsimple.CreateRenderView()
-reset_view(view)
-
-color = [0, 0.7, 0]
-view.Background = color
-pvsimple.Render(view)
-
-displacement = 0.5
-orient = Orientation.YZ
-cutplanes = CutPlanesOnField(med_reader, entity, field_name, timestamp,
- orientation=orient,
- displacement=displacement)
-print("CutPlanesOnField(...)")
-
-display_only(cutplanes, view)
-print("display_only(cutplanes, view)")
-
-cam_pos = view.CameraPosition
-cam_pos[0] = cam_pos[0] + 10
-print("Set view.CameraPosition")
-cutplanes.Scale[0] = 3
-cutplanes.Scale[1] = 10
-pvsimple.Render(view)
-sleep(DELAY)
-
-pvsimple.ResetCamera(view)
-
-slice_filter = cutplanes.Input
-offset_vals = slice_filter.SliceOffsetValues
-nb_planes = len(offset_vals)
-nb_planes = 30
-bounds = get_bounds(med_reader)
-for i in range(nb_planes, 1, -1):
- x = math.pi / 2.0 * (nb_planes - i) / nb_planes
- y = math.pi / 2.0 * (nb_planes - i) / nb_planes
- normal = get_normal_by_orientation(orient, x, y)
- slice_filter.SliceType.Normal = normal
- pos = get_positions(i, normal, bounds, displacement)
- slice_filter.SliceOffsetValues = pos
- pvsimple.Render(view)
- sleep(DELAY)
-
-nb_planes = 10
-normal = [0, 1, 0]
-slice_filter.SliceType.Normal = normal
-for i in range(1, nb_planes):
- pos = get_positions(i, normal, bounds, displacement)
- slice_filter.SliceOffsetValues = pos
- pvsimple.Render(view)
- sleep(DELAY)
-
-slice_filter.SliceType.Normal = [0, 0, 1]
-slice_filter.UpdatePipeline()
-print("pvsimple.ResetCamera(view)")
-pvsimple.ResetCamera(view)
-sleep(DELAY)
-
-# Destroy the view
-print("Destroy the view with Cut Planes")
-delete_pv_object(view)
-
-
-# Create one more view for isosurfaces
-view = pvsimple.CreateRenderView()
-reset_view(view)
-
-color = [1, 0.7, 0]
-view.Background = color
-pvsimple.Render(view)
-sleep(DELAY)
-
-isosurf = IsoSurfacesOnField(med_reader, entity, field_name, timestamp)
-print("IsoSurfacesOnField(...)")
-display_only(isosurf, view)
-pvsimple.ResetCamera(view)
-print("display_only(isosurf, view)")
-sleep(DELAY)
-
-contour = isosurf.Input
-nb_surfaces = len(contour.Isosurfaces)
-nb_surfaces = 32
-scalar_range = get_data_range(med_reader, entity, field_name, cut_off=True)
-for i in range(2, nb_surfaces):
- contours = get_contours(scalar_range, i)
- contour.Isosurfaces = contours
- pvsimple.Render(view)
- sleep(DELAY)
-
-contour.Isosurfaces = get_contours(scalar_range, 10)
-contour.UpdatePipeline()
-print("pvsimple.ResetCamera(view)")
-pvsimple.ResetCamera(view)
-sleep(DELAY)
-
-# Destroy the view
-print("Destroy the view with Iso Surfaces")
-delete_pv_object(view)
-
-
-# Create one more view for cut lines
-view = pvsimple.CreateRenderView()
-reset_view(view)
-
-color = [0.7, 0.7, 0.7]
-view.Background = color
-pvsimple.Render(view)
-sleep(DELAY)
-
-cutlines, curves = CutLinesOnField(med_reader, entity, field_name, timestamp,
- orientation1=Orientation.ZX,
- orientation2=Orientation.YZ,
- generate_curves=True)
-print("CutLinesOnField(...)")
-display_only(cutlines, view)
-pvsimple.ResetCamera(view)
-print("display_only(cutlines, view)")
-sleep(DELAY)
-
-xy_view = pvsimple.CreateXYPlotView()
-print("pvsimple.CreateXYPlotView()")
-index = 0
-for curve in curves:
- xyrep = pvsimple.Show(curve, xy_view)
- xyrep.AttributeType = 'Point Data'
- xyrep.UseIndexForXAxis = 0
- xyrep.XArrayName = 'arc_length'
- pvsimple.Render(xy_view)
- set_visible_lines(xyrep, [field_name])
- xyrep.SeriesLabel = [field_name, 'Y' + str(index)]
- r = str(random.random())
- g = str(random.random())
- b = str(random.random())
- xyrep.SeriesColor = [field_name, r, g, b]
- index += 1
-
-pvsimple.Render(xy_view)
-sleep(DELAY)
-
-# Destroy two views
-#print "Destroy two views: with Cut Lines and the curves"
-#delete_pv_object(view)
-#delete_pv_object(xy_view)
-
-
-# Create one more view for cut segment
-view = pvsimple.CreateRenderView()
-reset_view(view)
-
-color = [0.0, 0.7, 0.3]
-view.Background = color
-pvsimple.Render(view)
-sleep(DELAY)
-
-point1 = [0.0, -1.0, 2.5]
-point2 = [0.0, 1.0, 2.5]
-cutsegment = CutSegmentOnField(med_reader, entity, field_name, timestamp,
- point1, point2)
-
-print("CutSegmentOnField(...)")
-display_only(cutsegment, view)
-pvsimple.ResetCamera(view)
-print("display_only(cutsegment, view)")
-sleep(DELAY)
-
-xy_view = pvsimple.CreateXYPlotView()
-curve = pvsimple.Show(cutsegment.Input, xy_view)
-curve.AttributeType = 'Point Data'
-curve.UseIndexForXAxis = 0
-curve.XArrayName = 'arc_length'
-set_visible_lines(curve, [field_name])
-
-pvsimple.Render(xy_view)
-sleep(DELAY)
-
-
-# Create one more view for animation
-view = pvsimple.CreateRenderView()
-reset_view(view)
-
-med_file = datadir + "TimeStamps.med"
-field_name = "vitesse"
-entity = EntityType.NODE
-timestamp = 2
-
-pvsimple.OpenDataFile(med_file)
-med_reader = pvsimple.GetActiveSource()
-
-isosurf = IsoSurfacesOnField(med_reader, entity, field_name, timestamp)
-print("IsoSurfacesOnField(...)")
-pvsimple.ResetCamera(view)
-
-print("Start Animation")
-pvsimple.AnimateReader(med_reader, view)
+++ /dev/null
-
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/B4 case
-
-import sys
-import os
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-# Import MED file
-med_file_path = datadir + "pointe.med"
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- raise RuntimeError("MED file was not imported successfully.")
-
-# Create presentations
-try:
- if os.access(med_file_path, os.R_OK) :
- if os.access(med_file_path, os.W_OK) :
- mesh_name = "maa1"
- entity = EntityType.NODE
- field_name = "fieldnodedouble"
- timestamp_id = 1
-
- scalarmap = ScalarMapOnField(med_reader, entity, field_name, timestamp_id)
- if get_nb_components(med_reader, entity, field_name) > 1:
- vectors = VectorsOnField(med_reader, entity, field_name, timestamp_id)
- cutplanes = CutPlanesOnField(med_reader, entity, field_name, timestamp_id)
-
- mesh = MeshOnEntity(med_reader, mesh_name, entity)
- else:
- print("We have no permission to rewrite medFile")
- else:
- print("We have no permission to read medFile, it will not be opened");
-except:
- print(sys.exc_info()[0])
- print(sys.exc_info()[1])
- print(sys.exc_info()[2])
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/B5 case
-
-from time import sleep
-
-from paravistest import datadir, tablesdir
-from presentations import *
-import pvsimple
-
-DELAY = 2
-
-# Step 1
-print('Importing "pointe.med"...............', end=' ')
-file_path = datadir + "pointe.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-field_name = "fieldnodedouble"
-entity = EntityType.NODE
-timestamp = 1
-
-
-# Step 2
-view1 = pvsimple.GetRenderView()
-print("view1 = pvsimple.GetRenderView()")
-
-sleep(DELAY)
-
-delete_pv_object(view1)
-print("delete_pv_object(view1)")
-
-
-# Step 3
-view2 = pvsimple.CreateRenderView()
-print("view2 = pvsimple.CreateRenderView()")
-
-color = [0.0, 0.3, 1.0]
-view2.Background = color
-print("view2.Background =", str(color))
-pvsimple.Render(view2)
-
-scalarmap = ScalarMapOnField(med_reader, entity, field_name, timestamp)
-print("ScalarMapOnField(...)")
-scalarmap.Visibility = 1
-pvsimple.Render(view2)
-
-view2.CameraFocalPoint = [0, 0, 0]
-print("view2.CameraFocalPoint = [0, 0, 0]")
-view2.CameraParallelScale = 2
-print("view2.CameraParallelScale = 2")
-pvsimple.Render(view2)
-
-view2.ResetCamera()
-print("view2.ResetCamera()")
-pvsimple.Render(view2)
-
-sleep(DELAY)
-
-
-# Step 4
-view3 = pvsimple.CreateRenderView()
-print("view3 = pvsimple.CreateRenderView()")
-
-color = [0.0, 0.7, 0.0]
-view3.Background = color
-print("view3.Background = ", str(color))
-pvsimple.Render(view3)
-
-cutplanes = CutPlanesOnField(med_reader, entity, field_name, timestamp,
- orientation=Orientation.XY)
-print("CutPlanesOnField(...)")
-
-display_only(cutplanes, view3)
-print("display_only(cutplanes, view3)")
-
-point = view3.CameraFocalPoint
-point[0] = point[0] + 10
-view3.CameraFocalPoint = point
-print("view3.CameraFocalPoint = ", str(point))
-
-view3.ResetCamera()
-print("view3.ResetCamera()")
-pvsimple.Render(view3)
-print("pvsimple.Render(view3)")
-
-sleep(DELAY)
-
-
-# Step 5
-view4 = pvsimple.CreateRenderView()
-print("view4 = pvsimple.CreateRenderView()")
-
-color = [1.0, 0.7, 0.0]
-view4.Background = color
-print("view5.Background = ", str(color))
-pvsimple.Render(view4)
-
-isosurfaces = IsoSurfacesOnField(med_reader, entity, field_name, timestamp)
-print("isosurfaces = IsoSurfacesOnField(...)")
-
-display_only(isosurfaces, view4)
-print("display_only(isosurfaces, view4)")
-view4.ResetCamera()
-print("view4.ResetCamera()")
-
-pvsimple.Render(view4)
-print("pvsimple.Render(view4)")
-
-sleep(DELAY)
-
-
-# Step 6
-view5 = pvsimple.CreateRenderView()
-print("view5 = pvsimple.CreateRenderView()")
-
-color = [0.7, 0.7, 0.7]
-view5.Background = color
-print("view5.Background =", str(color))
-pvsimple.Render(view5)
-
-cutlines = CutLinesOnField(med_reader, entity, field_name, timestamp,
- orientation1=Orientation.ZX,
- orientation2=Orientation.YZ)
-print("cutlines = CutLinesOnField(...)")
-
-display_only(cutlines, view5)
-print("display_only(cutlines, view5)")
-pvsimple.ResetCamera(view5)
-print("pvsimple.ResetCamera(view5)")
-
-sleep(DELAY)
-
-
-# Step 7
-file_path = tablesdir + "sinus.csv"
-sinus_csv = pvsimple.CSVReader(FileName=file_path)
-sinus_csv.FieldDelimiterCharacters = ' '
-
-view6 = pvsimple.CreateXYPlotView()
-print("view6 = pvsimple.CreateXYPlotView()")
-
-xy_rep = pvsimple.Show(sinus_csv)
-xy_rep.AttributeType = 'Row Data'
-xy_rep.UseIndexForXAxis = 0
-xy_rep.XArrayName = 'x'
-xy_rep.SeriesVisibility = ['x', '0']
-
-sleep(DELAY)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/B6 case
-# Create table of integer, create table of real, create curves
-
-from paravistest import tablesdir
-import pvsimple
-from presentations import delete_pv_object
-
-# Define script for table of integer creation
-script_ti = """
-def add_column(table, name, lst):
- col = vtk.vtkIntArray()
- col.SetName(name)
- for item in lst:
- col.InsertNextValue(item)
- table.AddColumn(col)
-
-# Get table output
-table = self.GetTableOutput()
-
-# Add columns
-lst = [1,2,3,4,5,6,7,8,9,10]
-add_column(table, 'FR', lst)
-
-lst = [110,120,130,140,150,160,170,180,190,200]
-add_column(table, 'SR', lst)
-
-lst = [-1,272,0,0,-642,10000,13,578,-578,99]
-add_column(table, 'TR', lst)
-"""
-
-# Define script for table of real creation
-script_tr = """
-import math
-
-
-# Get table output
-table = self.GetTableOutput()
-
-# Create first column
-col1 = vtk.vtkDoubleArray()
-col1.SetName('Row 0')
-for i in xrange(0, 21):
- col1.InsertNextValue(i * 10 + 1)
-table.AddColumn(col1)
-
-# Create the rest columns
-for i in range(1, 11):
- col = vtk.vtkDoubleArray()
- col.SetName('Row ' + str(i))
-
- # Fill the next column
- col.InsertNextValue(1)
- for j in range(1, 21):
- if j % 2 == 1:
- col.InsertNextValue(math.log10(j * 30 * math.pi / 180) * 20 + i * 15 + j * 5)
- else:
- col.InsertNextValue(math.sin(j * 30 * math.pi / 180) * 20 + i * 15 + j * 5)
-
- table.AddColumn(col)
-"""
-
-# Creating programmable source for the table of integer
-ps_ti = pvsimple.ProgrammableSource()
-ps_ti.OutputDataSetType = 'vtkTable'
-ps_ti.Script = script_ti
-pvsimple.RenameSource("TEST table of integer", ps_ti)
-ps_ti.UpdatePipeline()
-
-# Creating programmable source for the table of real
-ps_tr = pvsimple.ProgrammableSource()
-ps_tr.OutputDataSetType = 'vtkTable'
-ps_tr.Script = script_tr
-pvsimple.RenameSource("TEST table of real", ps_tr)
-ps_tr.UpdatePipeline()
-
-# Replace the current view with chart line one
-xy_view1 = pvsimple.CreateXYPlotView()
-xy_view1.ChartTitle = 'TEST table of real'
-xy_view1.BottomAxisTitle = '[ Wt ]'
-xy_view1.LeftAxisTitle = 'Row 0 [ Hz ]'
-
-# Display curves for the table of real
-tr_rep = pvsimple.Show(ps_tr)
-tr_rep.AttributeType = 'Row Data'
-tr_rep.UseIndexForXAxis = 0
-tr_rep.XArrayName = 'Row 0'
-tr_rep.SeriesVisibility = ['Row 0', '0', 'Row 4', '0', \
-'Row 6', '0', 'Row 8', '0', 'Row 9', '0']
-
-# Set 'Square' marker style for 'Row 5' line
-tr_rep.SeriesMarkerStyle = ['Row 5', '3']
-# Set 'Dash' line style for 'Row 5' line
-tr_rep.SeriesLineStyle = ['Row 5', '2']
-# Set color for 'Row 5' line
-tr_rep.SeriesColor = ['Row 5', '0', '0.7', '0.3']
-# Set 'Diamond' marker style for 'Row 10' line
-tr_rep.SeriesMarkerStyle = ['Row 10', '5']
-# Set 'Dot' line style for 'Row 10' line
-tr_rep.SeriesLineStyle = ['Row 10', '3']
-# Set color for 'Row 10' line
-tr_rep.SeriesColor = ['Row 10', '0.2', '0.2', '0.9']
-
-# Create another chart line view
-xy_view2 = pvsimple.CreateXYPlotView()
-xy_view2.ChartTitle = 'TEST table of integer'
-xy_view2.LeftAxisTitle = 'FR [ m/h ]'
-
-# Display curves for the table of integer
-ti_rep = pvsimple.Show(ps_ti, xy_view2)
-ti_rep.AttributeType = 'Row Data'
-ti_rep.UseIndexForXAxis = 0
-ti_rep.XArrayName = 'FR'
-ti_rep.SeriesVisibility = ['SR', '0']
-
-# Change legend label for "FR" line
-ti_rep.SeriesLabel = ["FR", "FREQ"]
-
-# Set 'Square' marker style for 'FR' line
-ti_rep.SeriesMarkerStyle = ['FR', '3']
-# Set 'Dash' line style for 'FR' line
-ti_rep.SeriesLineStyle = ['FR', '2']
-# Set color for 'FR' line
-ti_rep.SeriesColor = ['FR', '0', '0.7', '0.3']
-
-
-# Update views
-pvsimple.Render(xy_view1)
-pvsimple.Render(xy_view2)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/B7 case
-# Import a table from file and show it in 2D viewer
-
-from paravistest import tablesdir
-from presentations import *
-import pvsimple
-
-# Import table from CSV file
-file_path = tablesdir + "table_test.csv"
-table_csv = pvsimple.CSVReader(FileName=file_path)
-
-# Set space as separator
-table_csv.FieldDelimiterCharacters = ';'
-
-# Display curve
-cur_view = pvsimple.GetRenderView()
-if cur_view:
- delete_pv_object(cur_view)
-xy_view = pvsimple.CreateXYPlotView()
-
-xy_rep = pvsimple.Show(table_csv)
-xy_rep.AttributeType = 'Row Data'
-xy_rep.UseIndexForXAxis = 0
-xy_rep.XArrayName = 'X'
-xy_rep.SeriesVisibility = ['X', '0']
-
-# Set view properties
-title = xy_view.ChartTitle
-xy_view.ChartTitle = "Change the title from python"
-pvsimple.Render(xy_view)
-
-xy_view.LeftAxisTitle = "Y axis"
-xy_view.BottomAxisTitle = "X axis"
-pvsimple.Render(xy_view)
-
-xy_view.ShowLegend = 0
-pvsimple.Render(xy_view)
-
-xy_view.ShowLeftAxisGrid = 0
-xy_view.ShowLeftAxisLabels = 0
-xy_view.ShowBottomAxisGrid = 0
-xy_view.ShowBottomAxisLabels = 0
-xy_view.ShowRightAxisGrid = 0
-xy_view.ShowRightAxisLabels = 0
-xy_view.ShowTopAxisGrid = 0
-xy_view.ShowTopAxisLabels = 0
-pvsimple.Render(xy_view)
-xy_view.ShowLeftAxisGrid = 1
-xy_view.ShowLeftAxisLabels = 1
-pvsimple.Render(xy_view)
-xy_view.ShowBottomAxisGrid = 1
-xy_view.ShowBottomAxisLabels = 1
-pvsimple.Render(xy_view)
-
-# Set logarithmic scaling
-xy_view.LeftAxisLogScale = 1
-pvsimple.Render(xy_view)
-xy_view.BottomAxisLogScale = 1
-pvsimple.Render(xy_view)
-
-# Set representation properties
-
-# Show/hide curves
-xy_rep.SeriesVisibility = ['Y0', '0', 'Y1', '0',
- 'Y2', '0', 'Y3', '0']
-pvsimple.Render(xy_view)
-xy_rep.SeriesVisibility = ['Y0', '1']
-pvsimple.Render(xy_view)
-xy_rep.SeriesVisibility = ['Y1', '1']
-pvsimple.Render(xy_view)
-xy_rep.SeriesVisibility = ['Y2', '1']
-pvsimple.Render(xy_view)
-
-xy_rep.SeriesVisibility = ['Y3', '1']
-xy_rep.SeriesVisibility = ['Y3', '0']
-xy_rep.SeriesVisibility = ['Y3', '1']
-pvsimple.Render(xy_view)
-
-# Line style
-xy_rep.SeriesLineStyle = ['Y0', '5']
-pvsimple.Render(xy_view)
-xy_rep.SeriesLineStyle = ['Y1', '4']
-pvsimple.Render(xy_view)
-xy_rep.SeriesLineStyle = ['Y2', '3']
-pvsimple.Render(xy_view)
-xy_rep.SeriesLineStyle = ['Y3', '2']
-pvsimple.Render(xy_view)
-
-# Line thickness
-values = (2, 4, 6, 8, 10, 1)
-for val in values:
- xy_rep.SeriesLineThickness = ['Y3', str(val)]
- pvsimple.Render(xy_view)
-
-xy_rep.SeriesLineStyle = ['Y3', '0']
-pvsimple.Render(xy_view)
-
-# Marker type
-xy_rep.SeriesMarkerStyle = ['Y3', '5']
-pvsimple.Render(xy_view)
-xy_rep.SeriesMarkerStyle = ['Y2', '4']
-pvsimple.Render(xy_view)
-xy_rep.SeriesMarkerStyle = ['Y1', '3']
-pvsimple.Render(xy_view)
-xy_rep.SeriesMarkerStyle = ['Y0', '8']
-pvsimple.Render(xy_view)
-
-# Marker size
-for val in values:
- xy_rep.SeriesLineThickness = ['Y3', str(val)]
- pvsimple.Render(xy_view)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/B8 case
-
-import paravistest
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/B9 case
-
-from paravistest import datadir
-from presentations import EntityType, ScalarMapOnField, CutPlanesOnField, delete_pv_object
-import pvsimple
-
-# Get view
-view = pvsimple.GetRenderView()
-if view:
- delete_pv_object(view)
-
-# Import MED file
-med_file = datadir + "pointe.med"
-field_name = "fieldnodedouble"
-entity = EntityType.NODE
-timestamp = 1
-
-pvsimple.OpenDataFile(med_file)
-med_reader = pvsimple.GetActiveSource()
-
-# Create presentations
-view1 = pvsimple.CreateRenderView()
-scalarmap = ScalarMapOnField(med_reader, entity, field_name, timestamp)
-pvsimple.ResetCamera(view1)
-
-view2 = pvsimple.CreateRenderView()
-cutlines = CutPlanesOnField(med_reader, entity, field_name, timestamp)
-pvsimple.ResetCamera(view2)
-
-# Delete
-source = cutlines.Input
-delete_pv_object(source)
-delete_pv_object(med_reader)
-
-# Render views
-pvsimple.Render(view1)
-pvsimple.Render(view2)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/C3 case
-# Create table and display curves
-
-import pvsimple
-
-# Define script for table creation
-script = """
-import math
-
-
-# Get table output
-table = self.GetTableOutput()
-
-nb_rows = 10
-nb_cols = 200
-
-# Create first column
-col1 = vtk.vtkDoubleArray()
-col1.SetName('Frequency')
-for i in xrange(0, nb_rows):
- col1.InsertNextValue(i * 10 + 1)
-table.AddColumn(col1)
-
-# Create the rest columns
-for i in xrange(1, nb_cols + 1):
- col = vtk.vtkDoubleArray()
- col.SetName('Power ' + str(i))
-
- # Fill the next column
- for j in xrange(0, nb_rows):
- if j % 2 == 1:
- col.InsertNextValue(math.log10(j * 30 * math.pi / 180) * 20 + i * 15 + j * 5)
- else:
- col.InsertNextValue(math.sin(j * 30 * math.pi / 180) * 20 + i * 15 + j * 5)
-
- table.AddColumn(col)
-"""
-
-# Creating programmable source (table)
-ps = pvsimple.ProgrammableSource()
-ps.OutputDataSetType = 'vtkTable'
-ps.Script = script
-pvsimple.RenameSource("Very useful data", ps)
-ps.UpdatePipeline()
-
-# Display table
-# TODO: no possibility to create spreadsheet view
-
-# Display curves
-xy_view = pvsimple.CreateXYPlotView()
-xy_view.ChartTitle = 'Very useful data'
-xy_view.BottomAxisTitle = '[ Wt ]'
-xy_view.LeftAxisTitle = 'Frequency [ Hz ]'
-
-xy_rep = pvsimple.Show(ps)
-xy_rep.AttributeType = 'Row Data'
-xy_rep.UseIndexForXAxis = 0
-xy_rep.XArrayName = 'Frequency'
-xy_rep.SeriesVisibility = ['Frequency', '0']
-pvsimple.Render(xy_view)
-
-# Hide legend
-xy_view.ShowLegend = 0
-pvsimple.Render(xy_view)
-
-# Set logarithmic scaling for Y axis
-xy_view.LeftAxisLogScale = 1
-pvsimple.Render(xy_view)
-
-# Set linear scaling for Y axis
-xy_view.LeftAxisLogScale = 0
-pvsimple.Render(xy_view)
-
-# Set logarithmic scaling for X axis
-xy_view.BottomAxisLogScale = 1
-pvsimple.Render(xy_view)
-
-# Show legend
-xy_view.ShowLegend = 1
-pvsimple.Render(xy_view)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/C6 case
-# Import a table from file and show it in 2D viewer
-
-from paravistest import tablesdir
-from presentations import *
-import pvsimple
-
-# 1. Import tables from file
-file_path = tablesdir + "tables_test.xls"
-table_reader = pvsimple.CSVReader(FileName=file_path)
-if table_reader is None:
- print("FAILED to import tables from tables_test.xls file.")
-
-# 2. Create curves viewer
-cur_view = pvsimple.GetRenderView()
-if cur_view:
- delete_pv_object(cur_view)
-xy_view = pvsimple.CreateXYPlotView()
-
-# 3. Display curves in the viewer
-xy_rep = pvsimple.Show(table_reader)
-xy_rep.AttributeType = 'Row Data'
-xy_rep.UseIndexForXAxis = 0
-xy_rep.XArrayName = 'toto 1 [s]'
-xy_rep.SeriesVisibility = [xy_rep.XArrayName, '0']
-xy_rep.SeriesVisibility = ['vtkOriginalIndices', '0']
-pvsimple.Render(xy_view)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/SWIG_scripts/C7 case
-# Import a table in Post-Pro specific format from file;
-# create 3D representation of the table and show it in 3D viewer
-
-import sys
-
-from paravistest import tablesdir, get_picture_dir, pictureext
-from presentations import *
-import pvsimple
-
-# Import table from file
-print('Import file with tables....', end=' ')
-file_path = tablesdir + "table_test.xls"
-table_reader = pvsimple.TableReader(FileName=file_path)
-if table_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-# Get default settings of the reader
-available_tables = table_reader.GetPropertyValue("AvailableTables")
-is_detect_num = table_reader.DetectNumericColumns
-first_str_as_title = table_reader.FirstStringAsTitles
-delimiter = table_reader.ValueDelimiter
-table_nb = table_reader.TableNumber
-
-print("Default reader settings:")
-print("Available tables: ", available_tables)
-print("Detect Numeric Columns: ", is_detect_num)
-print("Interpret First String As Column Titles: ", first_str_as_title)
-print("Value Delimiter: '%s'" % delimiter)
-print("Table Number: ", table_nb)
-
-
-# Create 3D representation of the table with the
-# help of "Table To 3D" filter,
-# in Post-Pro this representation is known as "Pointmap3d"
-table_to_3d = pvsimple.TableTo3D(table_reader)
-
-print('Create "Table To 3D" filter....', end=' ')
-if table_to_3d is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Default 'Table To 3D' filter settings:")
-print("Scale Factor: ", table_to_3d.ScaleFactor)
-print("Use Optimus Scale: ", table_to_3d.UseOptimusScale)
-print("Presentation Type: ", table_to_3d.PresentationType)
-print("Number Of Contours: ", table_to_3d.NumberOfContours)
-
-
-# Show table 3D representation
-
-# Get 3D view
-print('Get 3D view...................', end=' ')
-view = pvsimple.GetRenderView()
-if view is None:
- print("FAILED")
-else:
- reset_view(view)
- print("OK")
-
-pointmap3d = pvsimple.GetRepresentation(table_to_3d)
-
-table_name = available_tables
-if isinstance(available_tables, list):
- table_name = available_tables[table_nb]
-
-vector_mode = 'Magnitude'
-nb_components = 1
-entity = EntityType.NODE
-
-# Get lookup table
-lookup_table = get_lookup_table(table_name, nb_components, vector_mode)
-if hasattr(lookup_table,"LockDataRange"):
- lookup_table.LockDataRange = 0
-elif hasattr(lookup_table,"LockScalarRange"):
- lookup_table.LockScalarRange = 0
-else:
- raise RuntimeError("Object %s has no 'LockDataRange' or 'LockScalarRange' attribute!"%(lookup_table))
-
-# Set properties
-pointmap3d.ColorArrayName = (EntityType.get_pvtype(entity), table_name)
-pointmap3d.LookupTable = lookup_table
-
-# Add scalar bar
-add_scalar_bar(table_name, nb_components, vector_mode,
- lookup_table, "")
-
-# Reset view
-reset_view(view=view)
-
-# Write image
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("SWIG_scripts/C7")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-file_name = picturedir + "pointmap3d." + pictureext
-pvsimple.WriteImage(file_name, view=view, Magnification=1)
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME SWIGSCRIPTS_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/SWIG_scripts)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" SWIGSCRIPTS BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" SWIGSCRIPTS EXTRA)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A3 B0 C3)
-
-SET(EXTRA_TESTS A1 A4 A5 A6 A7 A8 A9 B1 B4 B5 B6 B7 B8 B9 C6)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/A0 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/A0")
-
-file = datadir + "fra.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/A1 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/A1")
-
-file = datadir + "hexa_28320_ELEM.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/A2 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/A2")
-
-file = datadir + "pointe.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/A3 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/A3")
-
-file = datadir + "Fields_group3D.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/A4 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/A4")
-
-file = datadir + "Hexa8.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/A5 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/A5")
-
-file = datadir + "Penta6.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/A6 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/A6")
-
-file = datadir + "clo.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/A7 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/A7")
-
-file = datadir + "Tetra4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/A8 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/A8")
-
-file = datadir + "Tria3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/A9 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/A9")
-
-file = datadir + "Quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/B0 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/B0")
-
-file = datadir + "carre_en_quad4_seg2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/B1 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/B1")
-
-file = datadir + "carre_en_quad4_seg2_fields.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/B2 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/B2")
-
-file = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/B3 case
-# Test ScalarMap interface methods.
-
-from paravistest import datadir
-import presentations
-import pvsimple
-
-# 1. Import MED file
-
-print('Importing "fra.med"...', end=' ')
-file_path = datadir + "fra.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-# 2. Create ScalarMap
-field_name = 'TAUX_DE_VIDE'
-entity = presentations.EntityType.NODE
-myMeshName='LE VOLUME'
-
-scalarmap = presentations.ScalarMapOnField(med_reader, entity, field_name, 1)
-if scalarmap is None:
- print("FAILED")
-
-# 3. Scalar mode
-lookup_table = scalarmap.LookupTable
-print("Vector mode .....", lookup_table.VectorMode)
-print("Vector component .....", lookup_table.VectorComponent)
-
-lookup_table.VectorMode = 'Component'
-lookup_table.VectorComponent = 0
-
-scalarmap.LookupTable = lookup_table
-
-print("Vector mode .....", scalarmap.LookupTable.VectorMode)
-print("Vector component .....", scalarmap.LookupTable.VectorComponent)
-
-# 4. Scaling mode
-scalarmap.LookupTable.UseLogScale = 1
-print("Use logarithmic scaling ....", scalarmap.LookupTable.UseLogScale)
-
-scalarmap.LookupTable.UseLogScale = 0
-print("Use logarithmic scaling ....", scalarmap.LookupTable.UseLogScale)
-
-# 5. Scalar range
-print("Set scalar range min=12 < max=120 ...", end=' ')
-rmin = 12
-rmax = 120
-scalarmap.LookupTable.RGBPoints[0] = rmin
-scalarmap.LookupTable.RGBPoints[4] = rmax
-print("min = ", scalarmap.LookupTable.RGBPoints[0]," : max = ",scalarmap.LookupTable.RGBPoints[4])
-
-print("Set scalar range min=max=12 ...", end=' ')
-rmin = 120
-rmax = rmin
-scalarmap.LookupTable.RGBPoints[0] = rmin
-scalarmap.LookupTable.RGBPoints[4] = rmax
-print("min = ", scalarmap.LookupTable.RGBPoints[0]," : max = ",scalarmap.LookupTable.RGBPoints[4])
-
-print("Set scalar range min=120 > max=15 ...", end=' ')
-rmin = 120
-rmax = 15
-scalarmap.LookupTable.RGBPoints[0] = rmin
-scalarmap.LookupTable.RGBPoints[4] = rmax
-print("min = ", scalarmap.LookupTable.RGBPoints[0]," : max = ",scalarmap.LookupTable.RGBPoints[4])
-
-# 6. Bar orientation
-bar = presentations.get_bar()
-
-print("Set bar orientation = 'Horizontal'")
-bar.Orientation = 'Horizontal'
-print("Bar orientation ....", bar.Orientation)
-
-print("Set bar orientation = 'Vertical'")
-bar.Orientation = 'Vertical'
-print("Bar orientation ....", bar.Orientation)
-
-# 7. Position of scalar bar
-print("Default position ....", bar.Position)
-
-print("Set left down corner position")
-bar.Position = [0, 0]
-print("Position =", bar.Position)
-
-print("Set position outside of the screen")
-bar.Position = [-1, -1]
-print("Position =", bar.Position)
-
-# 8. Size of scalar bar
-print("Default Length=", bar.ScalarBarLength," : Thickness=", bar.ScalarBarThickness)
-
-print("Set positive Height and Width")
-h = 0.4
-w = 0.2 * 600 * 0.4
-bar.ScalarBarLength = h
-bar.ScalarBarThickness = int(w)
-print("Length=", bar.ScalarBarLength," : Thickness=", bar.ScalarBarThickness)
-
-print("Set negative Height and Width")
-h = -0.4
-w = -0.2 * 600 * 0.4
-bar.ScalarBarLength = h
-bar.ScalarBarThickness = int(w)
-print("Length=", bar.ScalarBarLength," : Thickness=", bar.ScalarBarThickness)
-
-# 9. Number of colors
-print("Default number of colors = ", scalarmap.LookupTable.NumberOfTableValues)
-
-scalarmap.LookupTable.Discretize = 1
-
-#print "Set negative number of colors"
-#nb_colors = -128
-#scalarmap.LookupTable.NumberOfTableValues = nb_colors
-#print "Number of colors =", scalarmap.LookupTable.NumberOfTableValues
-
-print("Set zero number of colors")
-nb_colors = 0
-scalarmap.LookupTable.NumberOfTableValues = nb_colors
-print("Number of colors =", scalarmap.LookupTable.NumberOfTableValues)
-
-print("Set positive number of colors")
-nb_colors = 256
-scalarmap.LookupTable.NumberOfTableValues = nb_colors
-print("Number of colors =", scalarmap.LookupTable.NumberOfTableValues)
-
-# NumberOfLabels no longer exists since Paraview 5.4
-
-# 10. Number of labels
-# print("Default number of labels = ", bar.NumberOfLabels)
-
-#print("Set negative number of labels")
-#nb_labels = -10
-#bar.NumberOfLabels = nb_labels
-#print("Number of labels=", bar.NumberOfLabels)
-
-#print("Set zero number of labels")
-#nb_labels = 0
-#bar.NumberOfLabels = nb_labels
-#print("Number of labels=", bar.NumberOfLabels)
-
-#print("Set positive number of labels")
-#nb_labels = 10
-#bar.NumberOfLabels = nb_labels
-#print("Number of labels=", bar.NumberOfLabels)
-
-# 11. Scalar bar title
-print('Default Title ="', bar.Title, '"')
-
-print("Set not null title")
-title = "Scalar Bar Title"
-bar.Title = title
-print(' Title ="', bar.Title, '"')
-
-print("Set title from spaces")
-title=' '
-bar.Title = title
-print(' Title ="', bar.Title, '"')
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME SCALARMAP_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/ScalarMap)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
-INSTALL(DIRECTORY _refs DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" SCALARMAP BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" SCALARMAP EXTRA)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/E0 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/E0")
-
-file = datadir + "test_55_solid_concentr_dom.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/E1 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/E1")
-
-file = datadir + "H_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/E2 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/E2")
-
-file = datadir + "cas2_2d_couplage_chess_castem.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/E3 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/E3")
-
-file = datadir + "hydro_d10.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/E4 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/E4")
-
-file = datadir + "champc.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/E5 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/E5")
-
-file = datadir + "hydro_sea_alv.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/E6 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/E6")
-
-file = datadir + "toto.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/E7 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/E7")
-
-file = datadir + "couplex_alain.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/E8 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/E8")
-
-file = datadir + "KCOUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/E9 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/E9")
-
-file = datadir + "test_hydro.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/F1 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/F1")
-
-file = datadir + "ml.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/F2 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/F2")
-
-file = datadir + "T_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/F3 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/F3")
-
-file = datadir + "test_hydro_darcy4_out.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/F4 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/F4")
-
-file = datadir + "UO2_250ans.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/F5 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/F5")
-
-file = datadir + "maill.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/F6 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/F6")
-
-file = datadir + "maill.0.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/F8 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/F8")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/F9 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/F9")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/G0 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/G0")
-
-file = datadir + "homard_ASTER_OSF_MEDV2.1.5_1_v2.3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/G1 case
-# Create Scalar Map for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap/G1")
-
-file = datadir + "maill.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap/G2 case
-# Create Scalar Map for field of the the given MED file for 10 timestamps%
-
-import sys
-import os
-from paravistest import datadir, pictureext, get_picture_dir, compare_view_to_ref_image
-from pvsimple import GetActiveSource, GetRenderView, Render, OpenDataFile
-from presentations import ScalarMapOnField, hide_all, EntityType, PrsTypeEnum,reset_view,process_prs_for_test
-
-picturedir = get_picture_dir("ScalarMap/G2")
-
-theFileName = datadir + "Bug829_resu_mode.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-"""Build presentations of the given types for all fields of the given file."""
-#print "Import %s..." % theFileName.split('/')[-1],
-result = OpenDataFile(theFileName)
-proxy = GetActiveSource()
-if proxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-# Get view
-aView = GetRenderView()
-
-
-import time
-
-aFieldEntity = EntityType.NODE
-aFieldName = "MODES___DEPL____________________"
-#create Scalar Map presentations for 10 timestamps
-for i in range(1,11):
- hide_all(aView, True)
- aPrs = ScalarMapOnField(proxy, aFieldEntity,aFieldName , i)
- if aPrs is None:
- raise RuntimeError("Presentation is None!!!")
- #display only current scalar map
- aPrs.Visibility=1
- reset_view(aView)
- Render(aView)
-
- prs_type = PrsTypeEnum.SCALARMAP
-
- # Get name of presentation type
- prs_name = PrsTypeEnum.get_name(prs_type)
- f_prs_type = prs_name.replace(' ', '').upper()
- # Construct image file name
- base_name = aFieldName + "_" + str(i) + "_" + f_prs_type + "." + pictureext
- pic_name = os.path.join(picturedir, base_name)
-
- # Show and record the presentation
- process_prs_for_test(aPrs, aView, pic_name)
-
- # Compare to baseline
- current_dir = os.path.dirname(os.path.realpath(__file__))
- baseline = os.path.join(current_dir, "_refs", base_name)
- compare_view_to_ref_image(aView, baseline, threshold=1)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A1 B0 E0 F3 G0)
-
-SET(EXTRA_TESTS A0 A2 A3 A4 A5 A6 A7 A8 A9 B1 B2 B3 E1 E2 E3 E4 E5 E6 E7 E8 E9
- F1 F2 F4 F5 F6 F8 F9 G1 G2)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/A0 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/A0")
-
-file = datadir + "fra.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/A1 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/A1")
-
-file = datadir + "hexa_28320_ELEM.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/A2 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/A2")
-
-file = datadir + "pointe.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/A3 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/A3")
-
-file = datadir + "Fields_group3D.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/A4 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/A4")
-
-file = datadir + "Hexa8.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/A5 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/A5")
-
-file = datadir + "Penta6.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/A6 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/A6")
-
-file = datadir + "clo.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/A7 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/A7")
-
-file = datadir + "Tetra4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/A8 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/A8")
-
-file = datadir + "Tria3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/A9 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/A9")
-
-file = datadir + "Quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/B0 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/B0")
-
-file = datadir + "carre_en_quad4_seg2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/B1 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/B1")
-
-file = datadir + "carre_en_quad4_seg2_fields.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/B2 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/B2")
-
-file = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/B3 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-#====================Stage1: Import MED file=========================
-print('Importing "fra.med"...................', end=' ')
-medFile = datadir + "fra.med"
-pvsimple.OpenDataFile(medFile)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-view = pvsimple.GetRenderView()
-reset_view(view)
-
-#=============Stage2: Create Scalar Map On Deformed Shape=============
-field_name = "VITESSE"
-node_entity = EntityType.NODE
-timestamp = 1
-
-print("Creating Scalar Map On Deformed Shape...................", end=' ')
-smondefshape1 = DeformedShapeAndScalarMapOnField(med_reader, node_entity,
- field_name, 1)
-
-if smondefshape1 is None:
- print("FAILED")
-else:
- display_only(smondefshape1, view)
- pvsimple.ResetCamera(view)
- print("OK")
-
-#=============Stage3: Create with 'Y' vector mode========================
-hide_all(view)
-smondefshape2 = DeformedShapeAndScalarMapOnField(med_reader,
- node_entity,
- field_name, 1,
- vector_mode='Y')
-
-print("Creating Scalar Map On Deformed Shape with 'Y' scalar mode.....", end=' ')
-if smondefshape2 is None:
- print("FAILED")
-else:
- print("OK")
-
-#=============Stage4: scaling of Scalar Map On Deformed Shape============
-bar = get_bar()
-lt = bar.LookupTable
-
-print("Changing scaling mode:")
-lt.UseLogScale = 0
-print("Log scaling ....", lt.UseLogScale)
-pvsimple.Render(view)
-
-lt.UseLogScale = 1
-print("Log scaling ....", lt.UseLogScale)
-pvsimple.Render()
-
-#=============Stage5: range of Scalar Map On Deformed Shape==============
-print("Changing scalar range:")
-range_min = 12
-range_max = 120
-lt.RGBPoints[0] = range_min
-lt.RGBPoints[4] = range_max
-print("min = " + str(lt.RGBPoints[0]) + "; max = " + str(lt.RGBPoints[4]))
-pvsimple.Render(view)
-
-range_min = 120
-range_max = 120
-lt.RGBPoints[0] = range_min
-lt.RGBPoints[4] = range_max
-print("min = " + str(lt.RGBPoints[0]) + "; max = " + str(lt.RGBPoints[4]))
-pvsimple.Render(view)
-
-range_min = 120
-range_max = 15
-lt.RGBPoints[0] = range_min
-lt.RGBPoints[4] = range_max
-print("min = " + str(lt.RGBPoints[0]) + "; max = " + str(lt.RGBPoints[4]))
-pvsimple.Render(view)
-
-#=============Stage6: bar orientation of Scalar Map On Deformed Shape==
-print("Changing bar orientation:")
-print("Default orientation: ", bar.Orientation)
-
-print("Set horizontal bar orientation")
-bar.Orientation = 'Horizontal'
-print("Bar orientation: ", bar.Orientation)
-pvsimple.Render(view)
-
-print("Set vertical bar orientation")
-bar.Orientation = 'Vertical'
-print("Bar orientation: ", bar.Orientation)
-pvsimple.Render(view)
-
-#=============Stage7: bar position of Scalar Map On Deformed Shape ====
-print("Changing bar position:")
-print("Default position: ", bar.Position)
-
-print("Set position X,Y positive")
-x_pos = 200
-y_pos = 100
-bar.Position = [x_pos, y_pos]
-print("Bar position [X,Y]: ", bar.Position)
-pvsimple.Render(view)
-
-print("Set position X negative ,Y positive")
-x_pos = -100
-y_pos = 150
-bar.Position = [x_pos, y_pos]
-print("Bar position [X,Y]: ", bar.Position)
-pvsimple.Render(view)
-
-print("Set position X positive, Y negative")
-x_pos = 100
-y_pos = -100
-bar.Position = [x_pos, y_pos]
-print("Bar position [X,Y]: ", bar.Position)
-pvsimple.Render(view)
-
-print("Set position X = 0.1, Y = 0.01")
-x_pos = 0.1
-y_pos = 0.01
-bar.Position = [x_pos, y_pos]
-print("Bar position [X,Y]: ", bar.Position)
-pvsimple.Render(view)
-
-#============Stage8: bar size of Scalar Map On Deformed Shape===========
-print("Changing bar size:")
-print("Default ScalarBarLength: ", bar.ScalarBarLength)
-print("Default ScalarBarThickness: ", bar.ScalarBarThickness)
-
-print("Set length = length*1.2")
-length = bar.ScalarBarLength * 1.2
-bar.ScalarBarLength = length
-print("Bar length: ", bar.ScalarBarLength)
-pvsimple.Render(view)
-
-print("Set thickness = thickness*2")
-thickness = bar.ScalarBarThickness * 2
-bar.ScalarBarThickness = thickness
-print("Bar thickness: ", bar.ScalarBarThickness)
-pvsimple.Render(view)
-
-#=============Stage9: nb of colors of Scalar Map On Deformed Shape======
-print("Changing number of colors:")
-print("Default number of colors: ", lt.NumberOfTableValues)
-lt.Discretize = 1
-
-#print "Set negative number of colors"
-#num = -128
-#lt.NumberOfTableValues = num
-#print "Number of colors: ", lt.NumberOfTableValues
-#pvsimple.Render(view)
-
-print("Set zero number of colors")
-num = 0
-lt.NumberOfTableValues = num
-print("Number of colors: ", lt.NumberOfTableValues)
-pvsimple.Render(view)
-
-print("Set positive number of colors")
-num = 256
-lt.NumberOfTableValues = num
-print("Number of colors: ", lt.NumberOfTableValues)
-pvsimple.Render(view)
-
-# NumberOfLabels no longer exists in Paraview 5.4
-#=============Stage10: nb of labels of Scalar Map On Deformed Shape=====
-#print("Changing number of labels:")
-#print("Default number of labels: ", bar.NumberOfLabels)
-
-#print("Set negative number of labels")
-#num = -128
-#bar.NumberOfLabels = num
-#print("Number of labels: ", bar.NumberOfLabels)
-#pvsimple.Render(view)
-
-#print("Set zero number of labels")
-#num = 0
-#bar.NumberOfLabels = num
-#print("Number of labels: ", bar.NumberOfLabels)
-#pvsimple.Render(view)
-
-#print("Set positive number of labels")
-#num = 256
-#bar.NumberOfLabels = num
-#print("Number of labels: ", bar.NumberOfLabels)
-#pvsimple.Render(view)
-
-#=============Stage11: bar title of Scalar Map On Deformed Shape=========
-print("Changing bar title:")
-print("Default bar title: ", bar.Title)
-
-print("Set not null title")
-title = "Scalar Bar Title"
-bar.Title = title
-print('Bar title: "' + bar.Title + '"')
-pvsimple.Render(view)
-
-print("Set title from spaces")
-title = ' '
-bar.Title = title
-print('Bar title: "' + bar.Title + '"')
-pvsimple.Render(view)
-
-#============Stage12: scale factor of ScalarMap On Deformed Shape =====
-print("Changing scale factor:")
-warp_vector = smondefshape2.Input
-
-print('Default scale: ', warp_vector.ScaleFactor)
-
-scale = 0.8
-warp_vector.ScaleFactor = scale
-warp_vector.UpdatePipeline()
-print("Scale: ", warp_vector.ScaleFactor)
-pvsimple.Render(view)
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME DEFORMEDSHAPESCALARMAP_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/ScalarMap_On_DeformedShape)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" DEFORMEDSHAPESCALARMAP BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" DEFORMEDSHAPESCALARMAP EXTRA)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/E0 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/E0")
-
-file = datadir + "test_55_solid_concentr_dom.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/E1 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/E1")
-
-file = datadir + "H_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/E2 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/E2")
-
-file = datadir + "cas2_2d_couplage_chess_castem.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/E3 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/E3")
-
-file = datadir + "hydro_d10.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/E4 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/E4")
-
-file = datadir + "champc.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/E5 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/E5")
-
-file = datadir + "hydro_sea_alv.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/E6 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/E6")
-
-file = datadir + "toto.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/E7 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/E7")
-
-file = datadir + "couplex_alain.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/E8 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/E8")
-
-file = datadir + "KCOUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/E9 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/E9")
-
-file = datadir + "test_hydro.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/F1 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/F1")
-
-file = datadir + "ml.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/F2 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/F2")
-
-file = datadir + "T_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/F3 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/F3")
-
-file = datadir + "test_hydro_darcy4_out.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/F4 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/F4")
-
-file = datadir + "UO2_250ans.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/F5 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/F5")
-
-file = datadir + "maill.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/F6 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/F6")
-
-file = datadir + "maill.0.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/ScalarMap_On_DeformedShape/F8 case
-# Create Scalar Map on Deformed Shape for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("ScalarMap_On_DeformedShape/F8")
-
-file = datadir + "maill.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.DEFORMEDSHAPESCALARMAP], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A0 B0 E0 F2)
-
-SET(EXTRA_TESTS A1 A2 A3 A4 A5 A6 A7 A8 A9 B1 B2 B3 E1 E2 E3 E4 E5 E6 E7 E8 E9
- F1 F3 F4 F5 F6 F8)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/A0 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/A0")
-
-file = datadir + "fra.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/A1 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/A1")
-
-file = datadir + "hexa_28320_ELEM.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/A2 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/A2")
-
-file = datadir + "pointe.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/A3 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/A3")
-
-file = datadir + "Fields_group3D.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/A4 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/A4")
-
-file = datadir + "Hexa8.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/A5 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/A5")
-
-file = datadir + "Penta6.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/A6 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/A6")
-
-file = datadir + "clo.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/A7 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/A7")
-
-file = datadir + "Tetra4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/A8 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/A8")
-
-file = datadir + "Tria3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/A9 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/A9")
-
-file = datadir + "Quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/B0 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/B0")
-
-file = datadir + "carre_en_quad4_seg2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/B1 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/B1")
-
-file = datadir + "carre_en_quad4_seg2_fields.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/B2 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/B2")
-
-file = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/B3 case
-# Create Stream Lines for all fields of each MED file from the given MED files list
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/B3")
-
-# Create presentations
-files = ["fra", "TimeStamps", "pointe", "Fields_group3D", "Hexa8", "Penta6", "Quad4", "Tetra4", "Tria3", "clo", "carre_en_quad4_seg2", "carre_en_quad4_seg2_fields", "cube_hexa8_quad4"]
-
-for item in files:
- file = datadir + item + ".med"
- print(" --------------------------------- ")
- print("file ", file)
- print("\nCreatePrsForFile...")
- print("BREAKPOINT_1")
- CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/B4 case
-# StreamTracer filter properties
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-# 1. Import MED file
-print('Import "ResOK_0000.med"...............', end=' ')
-file_path = datadir + "ResOK_0000.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-# 2. Creating StreamLines
-print("Creating Stream Lines.....", end=' ')
-streamlines = StreamLinesOnField(med_reader, EntityType.NODE, 'vitesse', 1)
-if streamlines is None:
- print("FAILED")
-else:
- print("OK")
-
-# 3. StreamLines parameters
-stream_tracer = pvsimple.GetActiveSource()
-
-print("Initial Step Length: ", stream_tracer.InitialStepLength)
-print("Integration Direction: ", stream_tracer.IntegrationDirection)
-print("Integration Step Unit: ", stream_tracer.IntegrationStepUnit)
-print("Integrator Type: ", stream_tracer.IntegratorType)
-print("Interpolator Type: ", stream_tracer.InterpolatorType)
-print("Maximum Error: ", stream_tracer.MaximumError)
-print("Minimum Step Length: ", stream_tracer.MinimumStepLength)
-print("Maximum Step Length: ", stream_tracer.MaximumStepLength)
-print("Maximum Steps: ", stream_tracer.MaximumSteps)
-print("Maximum Streamline Length: ", stream_tracer.MaximumStreamlineLength)
-print("Seed Type: ", type(stream_tracer.SeedType))
-print("Point1: ", stream_tracer.SeedType.Point1)
-print("Point2: ", stream_tracer.SeedType.Point2)
-# print "Center: ", stream_tracer.SeedType.Center
-# print "Number Of Points: ", stream_tracer.SeedType.NumberOfPoints
-# print "Radius: ", stream_tracer.SeedType.Radius
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME STREAMLINES_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/StreamLines)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" STREAMLINES BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" STREAMLINES EXTRA)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/E0 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/E0")
-
-file = datadir + "test_55_solid_concentr_dom.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/E1 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/E1")
-
-file = datadir + "H_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/E2 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/E2")
-
-file = datadir + "cas2_2d_couplage_chess_castem.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/E3 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/E3")
-
-file = datadir + "hydro_d10.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/E4 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/E4")
-
-file = datadir + "champc.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/E5 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/E5")
-
-file = datadir + "hydro_sea_alv.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/E6 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/E6")
-
-file = datadir + "toto.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/E7 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/E7")
-
-file = datadir + "couplex_alain.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/E8 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/E8")
-
-file = datadir + "KCOUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/E9 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/E9")
-
-file = datadir + "test_hydro.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/F1 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/F1")
-
-file = datadir + "ml.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/F2 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/F2")
-
-file = datadir + "T_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/F3 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/F3")
-
-file = datadir + "test_hydro_darcy4_out.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/F4 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/F4")
-
-file = datadir + "UO2_250ans.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/F5 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/F5")
-
-file = datadir + "maill.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/F6 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/F6")
-
-file = datadir + "maill.0.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/F8 case
-# Create Stream Lines for all fields of the the given MED file
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/F8")
-
-file = datadir + "maill.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("\nCreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.STREAMLINES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/F9 case
-
-import sys
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import StreamLinesOnField, EntityType, \
- reset_view, process_prs_for_test
-import pvsimple
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("StreamLines/F9")
-
-# Import of the "Bug829_resu_mode.med" file
-file_path = datadir + "Bug829_resu_mode.med"
-
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- raise RuntimeError("Bug829_resu_mode.med was not imported!!!")
-
-# Get view
-view = pvsimple.GetRenderView()
-
-# Create a set of Stream Lines, based on time stamps of "MODES_DEPL" field
-print("BREAKPOINT_1")
-
-for i in range(1, 11):
- prs = StreamLinesOnField(med_reader, EntityType.NODE, "MODES___DEPL____________________", i)
- if prs is None:
- raise RuntimeError("Presentation on timestamp {0} is None!!!".
- format(i))
-
- picture_path = picturedir + "/" + "time_stamp_" + str(i) + "." + pictureext
- process_prs_for_test(prs, view, picture_path)
-
-print("BREAKPOINT_2")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/StreamLines/G0 case
-# StreamTracer filter properties
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-# 1. Import MED file
-file_path = datadir + "new_case.rmed"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("new_case.rmed was not imported!!!")
-
-# 2. Creation of a set of "StreamLines" presentations, based on time stamps of "RESU_DEPL" field
-streamlines = StreamLinesOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1)
-if streamlines is None:
- raise RuntimeError("Presentation is None!!!")
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A1 B2 E0 F2)
-
-SET(EXTRA_TESTS A0 A2 A3 A4 A5 A6 A7 A8 A9 B0 B1 B3 B4
- E1 E2 E3 E4 E5 E6 E7 E8 E9 F1 F3 F4 F5 F6 F8 F9 G0)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/tables/A0 case
-# Import table in Post-Pro specific format from the file;
-# choose 'sinus' table; create curve.
-
-import sys
-
-from paravistest import tablesdir, get_picture_dir, pictureext
-from presentations import *
-import pvsimple
-
-# Import table from file
-print('Import tables_test.xls ....', end=' ')
-file_path = tablesdir + "tables_test.xls"
-table_reader = pvsimple.TableReader(FileName=file_path)
-if table_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-# Get available tables
-print('Get available tables .....')
-available_tables = table_reader.GetPropertyValue("AvailableTables")
-if (available_tables is None) or (len(available_tables) == 0):
- print("FAILED")
-else:
- print(available_tables)
-
-# Choose 'sinus' table
-table_reader.TableNumber = available_tables.GetData().index('sinus')
-table_reader.UpdatePipeline()
-
-# Create curves
-cur_view = pvsimple.GetRenderView()
-if cur_view:
- delete_pv_object(cur_view)
-xy_view = pvsimple.CreateXYPlotView()
-
-# xy_rep = pvsimple.Show(table_reader)
-xy_rep = pvsimple.Show(table_reader)
-xy_rep.AttributeType = 'Row Data'
-xy_rep.UseIndexForXAxis = 0
-x_array = xy_rep.GetPropertyValue("SeriesNamesInfo")[0]
-xy_rep.XArrayName = x_array
-xy_rep.SeriesVisibility = [x_array, '0']
-pvsimple.Render(xy_view)
-
-# Write image
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Tables/A0")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-file_name = picturedir + "sinus." + pictureext
-pvsimple.WriteImage(file_name, view=xy_view, Magnification=1)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/tables/A2 case
-# Import table in Post-Pro specific format from the file;
-# create curves.
-
-import sys
-
-from paravistest import tablesdir, get_picture_dir, pictureext
-from presentations import *
-import pvsimple
-
-# Import table from file
-print('Import flux.tab.txt ....', end=' ')
-file_path = tablesdir + "flux.tab.txt"
-table_reader = pvsimple.TableReader(FileName=file_path)
-if table_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-# Get available tables
-print('Get available tables .....')
-available_tables = table_reader.GetPropertyValue("AvailableTables")
-if (available_tables is None) or (len(available_tables) == 0):
- print("FAILED")
-else:
- print(available_tables)
-
-# Create curves
-cur_view = pvsimple.GetRenderView()
-if cur_view:
- delete_pv_object(cur_view)
-xy_view = pvsimple.CreateXYPlotView()
-
-xy_rep = pvsimple.Show(table_reader)
-xy_rep.AttributeType = 'Row Data'
-xy_rep.UseIndexForXAxis = 0
-x_array = xy_rep.GetPropertyValue("SeriesNamesInfo")[0]
-xy_rep.XArrayName = x_array
-xy_rep.SeriesVisibility = [x_array, '0']
-
-xy_rep.Visibility = 0
-pvsimple.Render(xy_view)
-xy_rep.Visibility = 1
-pvsimple.Render(xy_view)
-
-# Write image
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Tables/A2")
-if not picturedir.endswith(os.sep):
- picturedir += os.sep
-
-file_name = picturedir + "flux_tab." + pictureext
-pvsimple.WriteImage(file_name, view=xy_view, Magnification=1)
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME TABLES_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/Tables)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" TABLES BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" TABLES EXTRA)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A0)
-
-SET(EXTRA_TESTS A2)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-SET(dist_testscript_DATA
- paravistest.py
- )
-
-SALOME_INSTALL_SCRIPTS("${dist_testscript_DATA}" ${SALOME_INSTALL_SCRIPT_SCRIPTS})
+++ /dev/null
-# Copyright (C) 2010-2016 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 module provides auxiliary classes, functions and variables for testing.
-"""
-
-#from __future__ import print_function
-
-from math import fabs
-import os
-import tempfile
-import getpass
-from datetime import date
-import struct
-import sys
-
-# Auxiliary variables
-
-# Data directory
-samples_dir = os.getenv("DATA_DIR")
-datadir = None
-tablesdir = None
-texturesdir = None
-if samples_dir is not None:
- samples_dir = os.path.normpath(samples_dir)
- datadir = samples_dir + "/MedFiles/"
- tablesdir = samples_dir + "/Tables/"
- texturesdir = samples_dir + "/Textures/"
-
-# Graphics files extension
-pictureext = os.getenv("PIC_EXT")
-if pictureext == None:
- pictureext = "png"
-
-
-# Auxiliary classes
-class RepresentationType:
- """
- Types of representation.
- """
- OUTLINE = 0
- POINTS = 1
- WIREFRAME = 2
- SURFACE = 3
- SURFACEEDGES = 4
- VOLUME = 5
- POINTSPRITE = 6
-
- _type2name = {OUTLINE: 'Outline',
- POINTS: 'Points',
- WIREFRAME: 'Wireframe',
- SURFACE: 'Surface',
- SURFACEEDGES: 'Surface With Edges',
- VOLUME: 'Volume',
- POINTSPRITE: 'Point Sprite'}
-
- @classmethod
- def get_name(cls, type):
- """Return paraview representation type by the primitive type."""
- return cls._type2name[type]
-
-
-# Auxiliary functions
-def test_values(value, et_value, check_error=0):
- """Test values."""
- error = 0
- length = len(value)
- et_length = len(et_value)
- if (length != et_length):
- err_msg = "ERROR!!! There is different number of created " + str(length) + " and etalon " + str(et_length) + " values!!!"
- print(err_msg)
- error = error + 1
- else:
- for i in range(et_length):
- if abs(et_value[i]) > 1:
- max_val = abs(0.001 * et_value[i])
- if abs(et_value[i] - value[i]) > max_val:
- err_msg = "ERROR!!! Got value " + str(value[i]) + " is not equal to etalon value " + str(ret_value[i]) + "!!!"
- print(err_msg)
- error = error + 1
- else:
- max_val = 0.001
- if abs(et_value[i] - value[i]) > max_val:
- err_msg = "ERROR!!! Got value " + value[i] + " is not equal to etalon value " + et_value[i] + "!!!"
- error = error + 1
- if check_error and error > 0:
- err_msg = ("There is(are) some error(s) was(were) found... "
- "For more info see ERRORs above...")
- raise RuntimeError(err_msg)
- return error
-
-
-def get_picture_dir(subdir):
- res_dir = os.getenv("PARAVIS_TEST_PICS")
- if not res_dir:
- # Add username and current date to unify the directory
- cur_user = getpass.getuser()
- cur_date = date.today().strftime("%Y%m%d")
- res_dir = tempfile.gettempdir() + \
- "/pic_" + cur_user + \
- "/test_" + cur_date
- # Add subdirectory for the case to the directory path
- res_dir += "/" + subdir
- # Create the directory if doesn't exist
- res_dir = os.path.normpath(res_dir)
- if not os.path.exists(res_dir):
- os.makedirs(res_dir)
- else:
- # Clean the directory
- for root, dirs, files in os.walk(res_dir):
- for f in files:
- os.remove(os.path.join(root, f))
-
- return res_dir
-
-
-def call_and_check(prs, property_name, value, do_raise=1, compare_toler=-1.0):
- """Utility function for 3D viewer test for common check of different
- types of presentation parameters set"""
- if property_name == 'Representation':
- if value in prs.GetProperty('RepresentationTypesInfo'):
- prs.SetPropertyWithName(property_name, value)
- error_string = None
- else:
- error_string = (str(value) + " value of " + property_name + " is not available for this type of presentations")
- else:
- try:
- prs.SetPropertyWithName(property_name, value)
- except ValueError:
- error_string = (str(value) + "value of " + property_name + " is not available for this type of presentations")
- else:
- error_string = None
- is_good = (error_string is None)
- if not is_good:
- if do_raise:
- raise RuntimeError(error_string)
- else:
- print(error_string)
- else:
- # compare just set value and the one got from presentation
- really_set_value = prs.GetPropertyValue(property_name)
- is_equal = 1
- if compare_toler > 0:
- is_equal = (fabs(really_set_value - value) < compare_toler)
- else:
- is_equal = (really_set_value == value)
- if not is_equal:
- msg = str(really_set_value) + " has been set instead"
- if do_raise:
- raise RuntimeError(msg)
- else:
- print(msg)
- is_good = False
-
- return is_good
-
-
-def compare_lists(value, et_value, check_error=0, eps=1e-04):
- """
- Compare two lists: the same length and equality of corresponding items
- param value - list to be compared
- param et_value - etalon list
- param check_error - flag to catch exception if errors>0
- check_error=0 no exception, check_error !=0 catch exception
- param eps - defines tolerance for comparison
- return error - number of errors
- """
-
- error=0
- length = len(value)
- et_length = len(et_value)
- if length != et_length:
- print("ERROR!!! There is different number of items in created ", length, " and etalon ", et_length, " lists!!!")
- error=error+1
- else:
- for i in range(et_length):
- if abs(et_value[i]) > 1:
- MAX = abs(eps*et_value[i])
- else:
- MAX = eps
- if abs(et_value[i] - value[i])> MAX:
- print("ERROR!!!", i, "-th item", value[i], " is not equal to etalon item", et_value[i], "!!!")
- error=error+1
- if check_error and error > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
- return error
-
-
-def setShaded(view, shading):
- """Utility function to set shaded mode in view"""
- if shading == 0:
- view.LightDiffuseColor = [1, 1, 1]
- if shading == 1:
- view.LightDiffuseColor = [0, 0, 0]
-
-
-def TimeStampId(proxy):
- """Return tuple for the given MED proxy: (mesh_name, {field_name: [entity, timestamp_id]})
- Originally defined in KERNEL_TEST/Tools/CommonFunctions file.
- """
- import presentations
- mesh_name = presentations.get_mesh_full_names(proxy).pop()
- iterations = {}
-
- # get list of field names
- all_fields = proxy.GetProperty("FieldsTreeInfo")[::2]
-
- # get timestamps
- timestamps = proxy.TimestepValues.GetData()
- timestamp_nb = len(timestamps)
-
- for field in all_fields:
- entity = presentations.get_field_entity(field)
- field_short_name = presentations.get_field_short_name(field)
-
- iterations[field_short_name] = [entity, timestamp_nb]
-
- return mesh_name, iterations
-
-
-def Import_Med_Field(filename, field_names, check_errors=0, prs=[]):
- """Builds presentations on the given fields of the MED file.
- Originally defined in VISU_TEST/Grids/visu/ImportMedField/begin file.
-
- Arguments:
- filename : the full path to med file
- field_names : the list of field names (for ex: ["pression","temperature","vitesse"])
- prs : [[0,1,...], [], []]; empty list (sublist(s)) is ignored
- 0-VISU.TGAUSSPOINTS
- 1-VISU.TSCALARMAP
- 2-VISU.TISOSURFACE
- 3-VISU.TCUTPLANES
- 4-VISU.TCUTLINES
- 5-VISU.TDEFORMEDSHAPE
- 6-VISU.TVECTORS
- 7-VISU.TSTREAMLINES
- 8-VISU.TPLOT3D
- 9-VISU.TSCALARMAPONDEFORMEDSHAPE
- """
- import presentations
-
- nb_errors = 0
-
- print("File: ", filename)
-
- # check the file accessibility
- if not os.access(filename, os.F_OK):
- msg = "File " + filename + " does not exist!!!"
- raise RuntimeError(msg)
-
- # import MED file
- import pvsimple
- pvsimple.OpenDataFile(filename)
- proxy = presentations.pvs.GetActiveSource()
- if proxy is None:
- raise RuntimeError("ERROR!!! Can't import file!!!")
-
- for i in range(len(field_names)):
- print("Name of the field: ", field_names[i])
-
- if len(prs) != 0:
- if len(prs[i]) != 0:
- mesh_name, iterations = TimeStampId(proxy)
-
- if field_names[i] in iterations:
- entity = iterations[field_names[i]][0]
- iteration = iterations[field_names[i]][1]
- else:
- msg="There is no information about TimeStampId of the " + field_names[i] + " field!!!"
- raise RuntimeError(msg)
-
- err = nb_errors
-
- for type in prs[i]:
- try:
- if type==0:
- if presentations.GaussPointsOnField(proxy, entity, field_names[i], iteration) is None:
- print("ERROR!!! Created GaussPoints presentation is None!!!"); nb_errors+=1
- if type==1:
- if presentations.ScalarMapOnField(proxy, entity, field_names[i], iteration) is None:
- print("ERROR!!! Created ScalarMap presentation is None!!!"); nb_errors+=1
- if type==2:
- if presentations.IsoSurfacesOnField(proxy, entity, field_names[i], iteration) is None:
- print("ERROR!!! Created IsoSurfaces presentation is None!!!"); nb_errors+=1
- if type==3:
- if presentations.CutPlanesOnField(proxy, entity, field_names[i], iteration) is None:
- print("ERROR!!! Created CutPlanes presentation is None!!!"); nb_errors+=1
- if type==4:
- if presentations.CutLinesOnField(proxy, entity, field_names[i], iteration) is None:
- print("ERROR!!! Created CutLines presentation is None!!!"); nb_errors+=1
- if type==5:
- if presentations.DeformedShapeOnField(proxy, entity, field_names[i], iteration) is None:
- print("ERROR!!! Created DeformedShape presentation is None!!!"); nb_errors+=1
- if type==6:
- if presentations.VectorsOnField(proxy, entity, field_names[i], iteration) is None:
- print("ERROR!!! Created Vectors presentation is None!!!"); nb_errors+=1
- if type==7:
- if presentations.StreamLinesOnField(proxy, entity, field_names[i], iteration) is None:
- print("ERROR!!! Created StreamLines presentation is None!!!"); nb_errors+=1
- if type==8:
- if presentations.Plot3DOnField(proxy, entity, field_names[i], iteration) is None:
- print("ERROR!!! Created Plot3D presentation is None!!!"); nb_errors+=1
- if type==9:
- if presentations.DeformedShapeAndScalarMapOnField(proxy, entity, field_names[i], iteration) is None:
- print("ERROR!!! Created ScalarMapOnDeformedShape presentation is None!!!"); nb_errors+=1
- except ValueError:
- """ This exception comes from get_nb_components(...) function.
- The reason of exception is an implementation of MEDReader
- activating the first leaf when reading MED file (refer to
- MEDFileFieldRepresentationTree::activateTheFirst() and
- MEDFileFieldRepresentationTree::getTheSingleActivated(...) methods).
- """
- print("ValueError exception is catched")
- continue
-
- # check if number of errors has increased
- if err == nb_errors:
- print("Presentation(s) creation...OK")
-
- if nb_errors > 0 and check_errors:
- raise RuntimeError("Errors occured!!! For more information see ERRORs above...")
- else:
- return nb_errors
-
-def delete_with_inputs(obj):
- """Deletes the given object with all its inputs"""
- import pvsimple
- import presentations
-
- obj_to_delete = obj
- while obj_to_delete is not None:
- tmp_obj = obj_to_delete
- obj_to_delete = None
- if hasattr(tmp_obj, 'Input'):
- obj_to_delete = tmp_obj.Input
-
- presentations.delete_pv_object(tmp_obj)
-
-def get_png_picture_resolution(infile):
- """Returns size (width, height) of the PNG image"""
- f = open(infile, 'rb')
- data = f.read(24)
- f.close()
- if not (data[:8] == '\211PNG\r\n\032\n'and (data[12:16] == 'IHDR')):
- raise RuntimeError("File '%s' is not PNG image"%(infile))
-
- w, h = struct.unpack('>LL', data[16:24])
- width = int(w)
- height = int(h)
- return (width,height)
-
-def save_trace(afile,atrace):
- """Saves atrace in afile"""
- f = open(afile, 'w')
- f.write(atrace)
- f.close()
-
-def compare_view_to_ref_image(view, image_file, threshold=10):
- import vtk.test.Testing
- # warning: vtkGetTempDir looks at sys.argv contents...
- save_sys_argv = sys.argv
- sys.argv = []
- vtk.test.Testing.VTK_TEMP_DIR = vtk.util.misc.vtkGetTempDir()
-
- try:
- vtk.test.Testing.compareImage(view.GetRenderWindow(),
- image_file,
- threshold=threshold)
- vtk.test.Testing.interact()
- except:
- sys.argv = save_sys_argv
- print("<b>ERROR!!! Pictures differs from reference image !!!</b>");
- print("Picture: "+image_file)
- raise
- pass
- sys.argv = save_sys_argv
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/A0 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/A0")
-
-file = datadir + "fra.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/A1 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/A1")
-
-file = datadir + "hexa_28320_ELEM.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/A2 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/A2")
-
-file = datadir + "pointe.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/A3 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/A3")
-
-file = datadir + "Fields_group3D.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/A4 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/A4")
-
-file = datadir + "Hexa8.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/A5 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/A5")
-
-file = datadir + "Penta6.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/A6 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/A6")
-
-file = datadir + "clo.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/A7 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/A7")
-
-file = datadir + "Tetra4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/A8 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/A8")
-
-file = datadir + "Tria3.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/A9 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/A9")
-
-file = datadir + "Quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/B0 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/B0")
-
-file = datadir + "carre_en_quad4_seg2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/B1 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/B1")
-
-file = datadir + "carre_en_quad4_seg2_fields.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/B2 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/B2")
-
-file = datadir + "cube_hexa8_quad4.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/B3 case
-
-import sys
-
-from paravistest import datadir
-from presentations import VectorsOnField, EntityType
-import pvsimple
-
-#====================Stage1: Importing MED file====================
-
-print("**** Stage1: Importing MED file")
-
-print('Import "ResOK_0000.med"...............', end=' ')
-medFile = datadir + "ResOK_0000.med"
-pvsimple.OpenDataFile(medFile)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-cell_entity = EntityType.CELL
-node_entity = EntityType.NODE
-
-#====================Stage2: Creation of Vectors====================
-
-print("Creating Vectors..........", end=' ')
-vectors = VectorsOnField(med_reader, node_entity, 'vitesse', 1)
-
-if vectors is None:
- print("FAILED")
-else:
- print("OK")
-
-#====================Stage3: Change properties======================
-glyph = vectors.Input
-
-print("Default LineWidth : ", vectors.LineWidth)
-print("Default GlyphType : ", glyph.GlyphType)
-print("Default subtype : ", glyph.GlyphType.GlyphType)
-print("Default GlyphPos : ", glyph.GlyphType.Center)
-
-print("Changing value of line width")
-#width = -10
-#vectors.LineWidth = width
-#print "Negative value -10 : ", vectors.LineWidth
-#pvsimple.Render()
-
-width = 10
-vectors.LineWidth = width
-print("Positive value 10 : ", vectors.LineWidth)
-pvsimple.Render()
-
-# width = 0
-# vectors.LineWidth = width
-# print "Zero value 0 : ", vectors.LineWidth
-# pvsimple.Render()
-
-width = 2
-vectors.LineWidth = width
-print("Positive value 2 : ", vectors.LineWidth)
-pvsimple.Render()
-
-print("Changing glyph type")
-gtype = "Arrow"
-glyph.GlyphType = gtype
-print("Arrow type : ", glyph.GlyphType)
-pvsimple.Render()
-
-gtype = "Cone"
-glyph.GlyphType = gtype
-glyph.GlyphType.Resolution = 3
-glyph.GlyphType.Height = 4
-print("Cone type: " + str(glyph.GlyphType) + ", resolution: " + str(glyph.GlyphType.Resolution))
-pvsimple.Render()
-
-glyph.GlyphType.Resolution = 6
-print("Cone type: " + str(glyph.GlyphType) + ", resolution: " + str(glyph.GlyphType.Resolution))
-pvsimple.Render()
-
-gtype = "Line"
-glyph.GlyphType = gtype
-print("Line Type : ", glyph.GlyphType)
-pvsimple.Render()
-
-gtype = "2D Glyph"
-glyph.GlyphType = gtype
-glyph.GlyphType.GlyphType = "Arrow"
-pvsimple.Render()
-
-print("Changing glyph position")
-pos = [0.0, 0.0, 0.0]
-glyph.GlyphType.Center = pos
-print("Center position : ", glyph.GlyphType.Center)
-pvsimple.Render()
-
-pos = [0.5, 0.0, 0.0]
-glyph.GlyphType.Center = pos
-print("Tail position : ", glyph.GlyphType.Center)
-pvsimple.Render()
-
-pos = [-0.5, 0.0, 0.0]
-glyph.GlyphType.Center = pos
-print("Head position : ", glyph.GlyphType.Center)
-pvsimple.Render()
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME VECTORS_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/Vectors)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" VECTORS BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" VECTORS EXTRA)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/E0 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/E0")
-
-file = datadir + "test_55_solid_concentr_dom.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/E1 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/E1")
-
-file = datadir + "H_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/E2 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/E2")
-
-file = datadir + "cas2_2d_couplage_chess_castem.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/E3 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/E3")
-
-file = datadir + "hydro_d10.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/E4 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/E4")
-
-file = datadir + "champc.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/E5 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/E5")
-
-file = datadir + "hydro_sea_alv.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/E6 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/E6")
-
-file = datadir + "toto.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/E7 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/E7")
-
-file = datadir + "couplex_alain.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/E8 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/E8")
-
-file = datadir + "KCOUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/E9 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/E9")
-
-file = datadir + "test_hydro.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/F1 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/F1")
-
-file = datadir + "ml.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/F2 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/F2")
-
-file = datadir + "T_COUPLEX1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/F3 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/F3")
-
-file = datadir + "test_hydro_darcy4_out.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/F4 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/F4")
-
-file = datadir + "UO2_250ans.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/F5 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/F5")
-
-file = datadir + "maill.1.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/F6 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/F6")
-
-file = datadir + "maill.0.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/F8 case
-# Create Vectors for all data of the given MED file
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-# Directory for saving snapshots
-picturedir = get_picture_dir("Vectors/F8")
-
-file = datadir + "maill.2.med"
-print(" --------------------------------- ")
-print("file ", file)
-print(" --------------------------------- ")
-print("CreatePrsForFile...")
-CreatePrsForFile(file, [PrsTypeEnum.VECTORS], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/Vectors/F9 case
-# Create Vectors for field of the the given MED file for 10 timestamps%
-
-import os
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from pvsimple import GetActiveSource, GetRenderView, Render, OpenDataFile, UpdatePipeline
-from presentations import VectorsOnField, hide_all,EntityType,PrsTypeEnum,reset_view,process_prs_for_test, get_time
-
-picturedir = get_picture_dir("Vectors/F9")
-
-theFileName = datadir + "Bug829_resu_mode.med"
-print(" --------------------------------- ")
-print("file ", theFileName)
-print(" --------------------------------- ")
-
-"""Build presentations of the given types for all fields of the given file."""
-#print "Import %s..." % theFileName.split('/')[-1],
-result = OpenDataFile(theFileName)
-aProxy = GetActiveSource()
-if aProxy is None:
- raise RuntimeError("Error: can't import file.")
-else: print("OK")
-# Get view
-aView = GetRenderView()
-time_value = get_time(aProxy, 0)
-aView.ViewTime = time_value
-UpdatePipeline(time=time_value, proxy=aProxy)
-
-# Create required presentations for the proxy
-# CreatePrsForProxy(aProxy, aView, thePrsTypeList, thePictureDir, thePictureExt, theIsAutoDelete)
-aFieldEntity = EntityType.NODE
-aFieldName = "MODES___DEPL____________________"
-
-#Creation of a set of non-colored and then colored Vectors presentations, based on time stamps of MODES_DEP field
-for colored in [False,True]:
- colored_str = "_non-colored"
- if colored:
- colored_str = "_colored"
- for i in range(1,11):
- hide_all(aView, True)
- aPrs = VectorsOnField(aProxy, aFieldEntity, aFieldName, i, is_colored=colored)
- if aPrs is None:
- raise RuntimeError("Presentation is None!!!")
- # display only current deformed shape
- #display_only(aView,aPrs)
- aPrs.Visibility =1
- reset_view(aView)
- Render(aView)
- # Add path separator to the end of picture path if necessery
- if not picturedir.endswith(os.sep):
- picturedir += os.sep
- prs_type = PrsTypeEnum.VECTORS
-
- # Get name of presentation type
- prs_name = PrsTypeEnum.get_name(prs_type)
- f_prs_type = prs_name.replace(' ', '').upper()
- # Construct image file name
- pic_name = picturedir + aFieldName+colored_str + "_" + str(i) + "_" + f_prs_type + "." + pictureext
- # Show and record the presentation
- process_prs_for_test(aPrs, aView, pic_name)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A0 B1 E0 F1)
-
-SET(EXTRA_TESTS A1 A2 A3 A4 A5 A6 A7 A8 A9 B0 B2 B3 E1 E2 E3 E4 E5 E6 E7 E8 E9
- F2 F3 F4 F5 F6 F8 F9)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs/A0 case
-
-import sys
-import os
-from paravistest import datadir, pictureext, get_picture_dir
-import presentations
-import pvsimple
-
-picturedir = get_picture_dir("bugs/A0")
-
-# 1. Import MED file
-print('Importing "hydro_sea_alv.med"...', end=' ')
-file_path = datadir + "hydro_sea_alv.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-# 2. Create cut lines on "Head" field
-mesh_name = "maillage_migr3d"
-field_name = "Head"
-cell_entity = presentations.EntityType.CELL
-timestamps = med_reader.TimestepValues.GetData()
-
-for ts in range(1, len(timestamps) + 1):
- print("Timestamp: ", ts)
- cutlines = presentations.CutLinesOnField(med_reader, cell_entity, field_name, ts,
- orientation1=presentations.Orientation.ZX,
- orientation2=presentations.Orientation.YZ)
- pic_name = mesh_name + "_" + str(cell_entity) + "_" + field_name + "_" + str(ts) + "_TCUTLINES." + pictureext
- pic_path = os.path.join(picturedir, pic_name)
- print(pic_path)
- presentations.process_prs_for_test(cutlines, pvsimple.GetRenderView(), pic_path)
- nb_lines = len(cutlines.Input.SliceOffsetValues)
- print("Number of lines = ", nb_lines)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs/A1 case
-
-import sys
-import os
-import time
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-import pvsimple
-
-picturedir = get_picture_dir("bugs/A1")
-
-med_file_path = datadir + "fra1.med"
-pic_path = os.path.join(picturedir, "A1." + pictureext)
-
-# 1. Import MED file
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-# 2. Create mesh
-mesh = MeshOnEntity(med_reader, "LE VOLUME", EntityType.CELL)
-mesh.Representation = 'Surface With Edges'
-
-# 3. Display mesh and make snapshot
-view = pvsimple.GetRenderView()
-
-display_only(mesh, view)
-reset_view(view)
-
-view.CameraViewUp = [0,1,0]
-view.CameraPosition = [0, 42, -200]
-view.CameraFocalPoint = [25, 0, 5]
-view.CameraParallelScale = 1
-
-view.ResetCamera()
-
-pvsimple.Render(view)
-
-print("Picure file name is " + pic_path)
-pvs.WriteImage(pic_path, view=view, Magnification=1)
-time.sleep(1)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs/A2 case
-
-import sys
-import os
-import time
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-import pvsimple
-
-picturedir = get_picture_dir("bugs/A2")
-
-med_file_path = datadir + "carre_MIXTE_0000.med"
-pic_path = os.path.join(picturedir, "A2." + pictureext)
-
-print("BREAKPOINT_1")
-# 1. Import MED file
-print('Importing "carre_MIXTE_0000.med"...', end=' ')
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-# 2. Create mesh
-print("Creating MeshOnEntity..............", end=' ')
-mesh = MeshOnEntity(med_reader, "dom", EntityType.CELL)
-
-if mesh is None:
- print("FAILED")
-else:
- mesh.Representation = 'Surface With Edges'
- print("OK")
-
-# 3. Display mesh and make snapshot
-view = pvsimple.GetRenderView()
-
-display_only(mesh, view)
-reset_view(view)
-
-view.CameraViewUp = [0, 0, 1]
-view.CameraPosition = [50, 180, 0]
-view.CameraFocalPoint = [0.2, 0, 0.5]
-view.CameraParallelScale = 0.1
-
-#view.ResetCamera()
-
-pvsimple.Render(view)
-
-print("Picure file name is " + pic_path)
-pvs.WriteImage(pic_path, view=view, Magnification=1)
-time.sleep(1)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs/A3 case
-
-import time
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-# 1. Import MED file
-med_file_path = datadir + "hexa_28320_ELEM.med"
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-# 2. Create vectors
-vectors = VectorsOnField(med_reader, EntityType.CELL, "vitesse_elem_dom_pb1", 2) # 1e-05
-
-display_only(vectors)
-reset_view()
-time.sleep(1)
-
-#vectors.Input.SetScaleFactor = 0.005
-display_only(vectors)
-reset_view()
-time.sleep(1)
-
-
-#vectors.Input.SetScaleFactor = 0.002
-#display_only(vectors)
-#reset_view()
-#time.sleep(1)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs/A4 case
-
-import time
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-# 1. Import MED file
-med_file_path = datadir + "carre_ELEM_0000.med"
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-# 2. Create vectors
-vectors = VectorsOnField(med_reader, EntityType.CELL, "vitesse", 1) # 0
-vectors.Input.GlyphType = "Line"
-
-display_only(vectors)
-reset_view()
-
-time.sleep(1)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs/A5 case
-
-import os
-import salome
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-import pvsimple
-
-salome.salome_init()
-myStudy = salome.myStudy
-
-data_file = datadir + "TimeStamps.med"
-
-tmp_dir = os.getenv("TmpDir")
-if tmp_dir == None:
- import tempfile
- tmp_dir = tempfile.mkdtemp()
-
-save_file = os.path.join(tmp_dir, "TimeStamps_save.hdf")
-print("Save to file ", save_file)
-
-pvsimple.OpenDataFile(data_file)
-myStudy.SaveAs(save_file, 0, 0)
-
-myStudy.Open(data_file)
-
-os.remove(save_file)
-
-print("OK")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs/A6 case
-
-import sys
-import os
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-import pvsimple
-
-picturedir = get_picture_dir("bugs/A6")
-
-med_file_path = datadir + "fra.med"
-
-# 1. Import MED file
-print('Importing "fra.med"....', end=' ')
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- raise RuntimeError("Error")
-else:
- print("OK")
-
-# 2. Create mesh
-mesh_names = get_mesh_full_names(med_reader)
-for mesh_name in [get_field_short_name(name) for name in mesh_names]:
- print("Mesh name: ", mesh_name)
- mesh = MeshOnEntity(med_reader, mesh_name, EntityType.CELL)
- if mesh is None:
- raise RuntimeError("Error")
-
- mesh.Representation = 'Wireframe'
-
- pic_path = os.path.join(picturedir, mesh_name + "_Cell." + pictureext)
- pic_path = re.sub("\s+","_", pic_path)
- print("Save picture ", pic_path)
- process_prs_for_test(mesh, pvsimple.GetRenderView(), pic_path)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs/A7 case
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import CreatePrsForFile, PrsTypeEnum
-
-picturedir = get_picture_dir("bugs/A7")
-
-med_file_path = datadir + "hexa_28320_ELEM.med"
-CreatePrsForFile(med_file_path, [PrsTypeEnum.MESH], picturedir, pictureext)
-CreatePrsForFile(med_file_path, [PrsTypeEnum.SCALARMAP], picturedir, pictureext)
-CreatePrsForFile(med_file_path, [PrsTypeEnum.CUTPLANES], picturedir, pictureext)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs/A9 case
-
-import os
-import sys
-
-from paravistest import datadir, get_picture_dir, pictureext
-from presentations import *
-import pvsimple
-
-picturedir = get_picture_dir("bugs/A9")
-
-# 1. Step1: Import MED file
-print("**** Step1: Importing MED file")
-
-print('Import "sortie_med_volumique.med"...............', end=' ')
-file_path = datadir + "sortie_med_volumique.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-print('Get view........................................', end=' ')
-view = pvsimple.GetRenderView()
-if view is None:
- print("FAILED")
-else:
- reset_view(view)
- print("OK")
-
-mesh_name = 'Volume fluide'
-cell_entity = EntityType.CELL
-node_entity = EntityType.NODE
-
-# 2. Step2: Displaying mesh
-errors = 0
-
-print("**** Step2: Display mesh")
-print("BREAKPOINT_1")
-
-# Creation of Mesh presentation on nodes
-print("Creating Mesh presentation on nodes.......")
-mesh = MeshOnEntity(med_reader, mesh_name, node_entity)
-if mesh is None:
- print("ERROR!!! Mesh presentation on nodes creation FAILED!!!")
- errors += 1
-else:
- picture_path = os.path.join(picturedir, "MeshPresentation_OnNodes." + pictureext)
- process_prs_for_test(mesh, view, picture_path)
- print("OK")
-
-# Creation of Mesh presentation on cells
-print("Creating Mesh presentation on cells.......")
-mesh = MeshOnEntity(med_reader, mesh_name, cell_entity)
-if mesh is None:
- print("ERROR!!! Mesh presentation on cells creation FAILED!!!")
- errors += 1
-else:
- picture_path = os.path.join(picturedir, "MeshPresentation_OnCells." + pictureext)
- process_prs_for_test(mesh, view, picture_path)
- print("OK")
-
-# 3. Step3: Displaying scalar field 'Dissip'
-print("**** Step3: Display scalar field 'Dissip'")
-
-entity = cell_entity
-
-# Scalar Map creation
-print("Creating Scalar Map.......", end=' ')
-scalarmap = ScalarMapOnField(med_reader, entity, 'Dissip', 1)
-
-if scalarmap is None:
- print("ERROR!!! Scalar Map creation FAILED!!!")
- errors += 1
-else:
- picture_path = os.path.join(picturedir, "ScalarMap_Dissip." + pictureext)
- process_prs_for_test(scalarmap, view, picture_path)
- print("OK")
-
-# Iso Surfaces creation
-print("Creating Iso Surfaces.......", end=' ')
-isosurfaces = IsoSurfacesOnField(med_reader, entity, 'Dissip', 1)
-
-if isosurfaces is None:
- print("ERROR!!! Iso Surfaces creation FAILED!!!")
- errors += 1
-else:
- picture_path = os.path.join(picturedir, "IsoSurfaces_Dissip." + pictureext)
- process_prs_for_test(isosurfaces, view, picture_path)
- print("OK")
-
-# Gauss Points creation
-print("Creating Gauss Points.......", end=' ')
-gausspoints = GaussPointsOnField(med_reader, entity, 'Dissip', 1)
-
-if gausspoints is None:
- print("ERROR!!! Gauss Points creation FAILED!!!")
- errors += 1
-else:
- picture_path = os.path.join(picturedir, "GaussPoints_Dissip." + pictureext)
- process_prs_for_test(isosurfaces, view, picture_path)
- print("OK")
-
-# 4. Step4: Displaying vectoriel field 'VitesseX'
-entity = cell_entity
-
-print("**** Step5: Display vectoriel field 'VitesseX'")
-# Deformed Shape creation
-print("Creating Deformed Shape.......", end=' ')
-
-defshape = DeformedShapeOnField(med_reader, entity, 'VitesseX', 1)
-if defshape is None:
- print("ERROR!!! Deformed Shape creation FAILED!!!")
- errors += 1
-else:
- picture_path = os.path.join(picturedir, "DeformedShape_VitesseX." + pictureext)
- process_prs_for_test(defshape, view, picture_path)
- print("OK")
-
-# Vectors creation
-print("Creating Vectors.......", end=' ')
-vectors = VectorsOnField(med_reader, entity, 'VitesseX', 1)
-
-if vectors is None:
- print("ERROR!!! Vectors creation FAILED!!!")
- errors += 1
-else:
- picture_path = os.path.join(picturedir, "Vectors_VitesseX." + pictureext)
- process_prs_for_test(vectors, view, picture_path)
- print("OK")
-
-# Scalar Map On Deformed Shape creation
-print("Creating Scalar Map On Deformed Shape.......", end=' ')
-smapondefshape = DeformedShapeAndScalarMapOnField(med_reader, entity, 'VitesseX', 1)
-
-if smapondefshape is None:
- print("ERROR!!! ScalarMapOnDeformedShape creation failed!!!")
- errors += 1
-else:
- picture_path = os.path.join(picturedir, "ScalMapOnDefShape_VitesseX." + pictureext)
- process_prs_for_test(smapondefshape, view, picture_path)
- print("OK")
-
-if errors == 1:
- raise RuntimeError("There is an error was occured... For more info see ERROR message above..")
-elif errors > 1:
- raise RuntimeError("There are some errors were occured... For more info see ERRORs messages above..")
-print("BREAKPOINT_2")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs1/B1 case
-
-
-import sys
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-import pvsimple
-
-picturedir = get_picture_dir("bugs/B1")
-
-# 1. Import MED file
-med_file_path = datadir + "resultat.01.med"
-
-print('Importing "resultat.01.med"....', end=' ')
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- raise RuntimeError("resultat.01.med was not imported!!!")
-else:
- print("OK")
-
-# 2. Creation of presentation of each group
-extGrp = pvs.ExtractGroup()
-extGrp.UpdatePipelineInformation()
-groups = get_group_names(extGrp)
-
-errors = 0
-i = 0
-for group in groups:
- i += 1
- shor_name = group.split('/')[-1]
- print("group: ", shor_name)
- prs = MeshOnGroup(med_reader, extGrp, group)
-
- if prs is None :
- print("FAILED!!! Created presentation is None!!!")
- errors += 1
- else :
- print("Presentation was created!")
- pic_path = os.path.join(picturedir, shor_name.strip().split("_")[0]+str(i)+"."+pictureext)
- process_prs_for_test(prs, pvsimple.GetRenderView(), pic_path)
-
-
-# check errors
-if errors == 1:
- raise RuntimeError("There is an error was occured... For more info see ERROR message above..")
-elif errors > 1:
- raise RuntimeError("There are some errors were occured... For more info see ERRORs messages above..")
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs2/C3 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-# 1. Import MED file
-med_file_path = datadir + "MEDfileForStructuredMesh.med"
-
-print('Importing "MEDfileForStructuredMesh.med"....', end=' ')
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- raise RuntimeError("MEDfileForStructuredMesh.med was not imported!")
-else:
- print("OK")
-
-errors = 0
-
-# 2. Creation of the mesh presentations for the "AssemblyMesh" mesh
-mesh_name = "AssemblyMesh"
-
-for entity in [EntityType.NODE, EntityType.CELL]:
- if MeshOnEntity(med_reader, mesh_name, entity) is None:
- print("Entity:", str(entity))
- print("ERROR!!! Mesh presentation for \""+mesh_name+"\" wasn't created!!!")
- errors += 1
-
-# 3. Creation of the mesh presentations for the "CoreMesh" mesh
-mesh_name = "CoreMesh"
-
-for entity in [EntityType.NODE, EntityType.CELL]:
- if MeshOnEntity(med_reader, mesh_name, entity) is None:
- print("Entity:", str(entity))
- print("ERROR!!! Mesh presentation for \""+mesh_name+"\" wasn't created!!!")
- errors += 1
-
-if errors > 0:
- raise RuntimeError("Some errors were occured during execution... See ERRORs above for details!")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs2/C5 case
-
-import sys
-import os
-import time
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-medPath = datadir
-
-class DisplayManager:
- """
- Create 3D presentations on entities on a given med file and mesh
- """
- def __init__(self, medFile=None, meshName=None, myEntity=None):
- if ( medFile is not None and meshName is not None and myEntity is not None):
- self.loadData(medFile, meshName, myEntity)
- else:
- self.medFile = None
- self.meshName = None
- self.myData = None
- self.myMesh = None
- self.myEntity = None
-
- def loadData(self, medFile, meshName=None, myEntity=EntityType.NODE):
- self.medFile = medFile
- pvsimple.OpenDataFile(medFile)
- self.myData = pvsimple.GetActiveSource()
- self.myEntity = myEntity
- if meshName is not None:
- self.setMesh(meshName)
-
- def getData(self):
- return self.myData
-
- def checkData(self):
- if ( self.myData is None or self.myMesh is None ):
- return False
- return True
-
- def setMesh(self,meshName):
- self.meshName = meshName
- self.myMesh = MeshOnEntity(self.myData,
- self.meshName,
- self.myEntity)
- self.myMesh.Representation = 'Surface'
-
- def DisplayMap(self, aView, aMap, title, aDelay=0):
- if aMap is None:
- print("Null scalar map is created")
- display_only(aMap, aView)
- reset_view(aView)
- time.sleep(aDelay)
-
- def ScalarMap(self, aView, fieldName, iteration, title , delay=0):
- if not self.checkData(): return
- aMap = ScalarMapOnField(self.myData, self.myEntity, fieldName, iteration)
- self.DisplayMap(aView, aMap, title, delay)
-
- def DeformedShape(self, aView, fieldName, iteration, title , delay=0):
- if not self.checkData(): return
- aMap = DeformedShapeOnField(self.myData, self.myEntity, fieldName, iteration)
- if aMap is not None:
- aMap.ColorArrayName = ("CELLS", fieldName)
- self.DisplayMap(aView, aMap, title, delay)
-
- def Vectors(self, aView, fieldName, iteration, title , delay=0):
- if not self.checkData(): return
- aMap = VectorsOnField(self.myData, self.myEntity, fieldName, iteration)
- if aMap is not None:
- aMap.ColorArrayName = ("CELLS", fieldName)
- self.DisplayMap(aView, aMap, title, delay)
-
- def IsoSurfaces(self, aView, fieldName, iteration, title , delay=0):
- if not self.checkData(): return
- aMap = IsoSurfacesOnField(self.myData, self.myEntity, fieldName, iteration)
- self.DisplayMap(aView, aMap, title, delay)
-
- def Animation(self, aView, theObj, theDuration, NbOfLoops, title, aPath=""):
-
- path = None
- if aPath is not "":
- print("Define save path")
- path = aPath
-
- scene = pvsimple.AnimateReader(theObj, aView, path)
-
- print("Start Animation")
-
- scene.Duration = theDuration
- NbOfFrames = len(scene.TimeKeeper.TimestepValues)
- NbOfIter = NbOfFrames-1
-
- reset_view(view=aView)
-
- ind = 0
- while ind < NbOfLoops:
- scene.Play()
- ind = ind + 1
-
- print("Stop Animation")
- scene.Stop()
-
- return scene
-
- # def XYPlot(self, myView, txtFile, theTableName, theDelay, theColor):
- # table = TableReader(FileName=txtFile)
-
- # # >>> Create curve
- # myView = CreateXYPlotView()
- # myCurve = Show(table, view = myView)
-
-def createView():
- aView=pvsimple.GetRenderView()
- return aView
-
-
-theEntity = EntityType.CELL
-theMedFile = "TETRA_domaine_fluide.med"
-theMedFile = os.path.join(medPath,theMedFile)
-theMeshName = "Domaine_fluide"
-theFieldName = "TempC"
-theDuration = 20
-NbOfLoops = 4
-#thePath = os.getenv("TMP_DIR")
-thePrefix = "TestPngFromAnim"
-import tempfile
-thePath = os.path.join(tempfile.mkdtemp(), thePrefix)
-thePath += ".png"
-
-displayMng = DisplayManager()
-displayMng.loadData(theMedFile,theMeshName,theEntity)
-ScalarMapOnField(displayMng.getData(), theEntity, theFieldName, 1)
-
-myView = createView()
-displayMng.Animation(myView, displayMng.getData(), theDuration, NbOfLoops, "", thePath)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs2/C6 case
-
-import sys
-import os
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-import pvsimple
-
-picturedir = get_picture_dir("bugs/C6")
-
-# 1. Import MED file
-med_file_path = datadir + "relachement_brutal_sans_dudg_gauss.med"
-
-print('Importing "relachement_brutal_sans_dudg_gauss.med"....', end=' ')
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- raise RuntimeError("File wasn't imported!!!")
-else:
- print("OK")
-
-# 2. Creation of GaussPoints presentations
-mesh_name = "Maillage"
-field_name = "Result__EQUI_ELGA_SIGM__________"
-timestamp_list = list(range(1, 5))
-
-for timestamp in timestamp_list:
- print("Creation of the GaussPoints presentation.. Field: ", field_name, "; Timestamp: ", timestamp)
- gauss_points = GaussPointsOnField1(med_reader, EntityType.CELL, field_name, timestamp)
- if gauss_points is None:
- raise RuntimeError("Created presentation is None!!!")
- pic_path = os.path.join(picturedir, "GaussPoints_" + mesh_name + "_" + field_name + "_" + str(timestamp) + "." + pictureext)
- process_prs_for_test(gauss_points, pvsimple.GetRenderView(), pic_path)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs2/C8 case
-
-from paravistest import tablesdir
-from presentations import *
-import pvsimple
-
-# 1. Import table from file
-file_path = tablesdir + "tables_test.xls"
-
-print('Import tables_test.xls ....', end=' ')
-file_path = tablesdir + "tables_test.xls"
-table_reader = pvsimple.TableReader(FileName=file_path)
-table_reader.UpdatePipeline()
-if table_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-# 2. Show curves
-cur_view = pvsimple.GetRenderView()
-if cur_view:
- delete_pv_object(cur_view)
-
-xy_view = pvsimple.CreateXYPlotView()
-xy_view.ChartTitle = "The viewer for Curves from the Table"
-
-
-print('Get available tables .....')
-available_tables = table_reader.GetPropertyValue("AvailableTables")
-if (available_tables is None) or (len(available_tables) == 0):
- print("FAILED")
-else:
- print(available_tables)
-
-for table in available_tables:
- table_reader.TableNumber = available_tables.GetData().index(table)
-
- xy_rep = pvsimple.Show()
- xy_rep.AttributeType = 'Row Data'
- xy_rep.UseIndexForXAxis = 0
- xy_rep.SeriesVisibility = ['0', '0']
-
- pvsimple.Render()
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs2/C9 case
-
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-import pvsimple
-
-# 1. Import MED file
-med_file_path = datadir + "TimeStamps.med"
-
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- raise RuntimeError("TimeStamps.med was not imported!!!")
-
-# 2. Creation of presentations
-mesh_on_cells = MeshOnEntity(med_reader, "dom", EntityType.CELL)
-if mesh_on_cells is None :
- raise RuntimeError("Mesh presentation is None!!!")
-
-view = pvsimple.GetRenderView()
-display_only(mesh_on_cells, view)
-reset_view(view)
-
-mesh_on_cells.Representation = 'Wireframe'
-
-scalar_map = ScalarMapOnField(med_reader, EntityType.NODE, "vitesse", 1)
-if scalar_map is None :
- raise RuntimeError("ScalarMap presentation is None!!!")
-
-scalar_map.Visibility = 1
-pvsimple.Render()
-
-delete_pv_object(scalar_map)
-pvsimple.Render()
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME BUGS_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/bugs)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" BUGS BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" BUGS EXTRA)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs3/D1 case
-
-import sys
-import os
-from paravistest import datadir, pictureext, get_picture_dir, get_png_picture_resolution
-from presentations import *
-import pvsimple
-
-picturedir = get_picture_dir("bugs/D1")
-
-# 1. Import of the "Bug829_resu_mode.med" file at first time
-med_file_path = datadir + "Bug829_resu_mode.med"
-pvsimple.OpenDataFile(med_file_path)
-med_reader1 = pvsimple.GetActiveSource()
-if med_reader1 is None:
- raise RuntimeError("Bug829_resu_mode.med was not imported!!!")
-
-# 2. Creation of a set of "DeformedShape and ScalarMap" presentations, based on time stamps of "MODES_DEPL" field
-errors=0
-sizew=[]
-sizeh=[]
-
-for i in range(1,11):
- presentation = DeformedShapeAndScalarMapOnField(med_reader1, EntityType.NODE, "MODES___DEPL____________________", i)
- if presentation is None :
- raise RuntimeError("Presentation is None!!!")
-
- pic_path = os.path.join(picturedir, "npal19999_1_time_stamp_" + str(i) + "." + pictureext)
- process_prs_for_test(presentation, pvsimple.GetRenderView(), pic_path)
-
- (h,w) = get_png_picture_resolution(pic_path)
- sizew.append(w)
- sizeh.append(h)
-
-if abs(max(sizeh)-min(sizeh)) > 0.01*max(sizeh):
- print("WARNING!!! Pictures have different height !!!")
- errors += 1
- for i in range(1,11):
- picture_name = "npal19999_2_time_stamp_" + str(i) + "." + pictureext
- print("Picture: " + picture_name + "; height : " + str(sizeh[i-1]))
- raise RuntimeError
-
-if abs(max(sizew)-min(sizew)) > 0.01*max(sizew):
- print("WARNING!!! Pictures have different width !!!")
- errors += 1
- for i in range(1,11):
- picture_name = "npal19999_2_time_stamp_" + str(i) + "." + pictureext
- print("Picture: " + picture_name + "; width : " + str(sizew[i-1]))
- raise RuntimeError
-
-# 3. Import of the "Bug829_resu_mode.med" file at second time
-pvsimple.OpenDataFile(med_file_path)
-med_reader2 = pvsimple.GetActiveSource()
-if med_reader2 is None:
- raise RuntimeError("Bug829_resu_mode.med was not imported second time!!!")
-
-# 4. Creation of a set of "DeformedShape and ScalarMap" presentations, based on time stamps of "MODES_DEPL" field
-errors = 0
-sizew=[]
-sizeh=[]
-
-for i in range(1,11):
- presentation = DeformedShapeAndScalarMapOnField(med_reader2, EntityType.NODE, "MODES___DEPL____________________", 11-i)
- if presentation is None :
- raise RuntimeError("Presentation is None!!!")
-
- pic_path = os.path.join(picturedir, "npal19999_2_time_stamp_" + str(i) + "." + pictureext)
- process_prs_for_test(presentation, pvsimple.GetRenderView(), pic_path)
- (h,w) = get_png_picture_resolution(pic_path)
- sizew.append(w)
- sizeh.append(h)
-
-if abs(max(sizeh)-min(sizeh)) > 0.01*max(sizeh):
- print("WARNING!!! Pictures have different height !!!")
- errors += 1
- for i in range(1,11):
- picture_name = "npal19999_2_time_stamp_" + str(i) + "." + pictureext
- print("Picture: " + picture_name + "; height : " + str(sizeh[i-1]))
- raise RuntimeError
-
-if abs(max(sizew)-min(sizew)) > 0.01*max(sizew):
- print("WARNING!!! Pictures have different width !!!")
- errors += 1
- for i in range(1,11):
- picture_name = "npal19999_2_time_stamp_" + str(i) + "." + pictureext
- print("Picture: " + picture_name + "; width : " + str(sizew[i-1]))
- raise RuntimeError
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs3/D3 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-# 1. Import of the "LinearStaticsSTA9.resu.med" file
-med_file_path = datadir + "LinearStaticsSTA9.resu.med"
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("LinearStaticsSTA9.resu.med was not imported!!!")
-
-view = pvsimple.GetRenderView()
-
-# Creation of colored "DeformedShape" presentations, based on time stamps of "RESU_DEPL" field
-presentation = DeformedShapeOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1, is_colored=True)
-if presentation is None :
- raise RuntimeError("DeformedShapeOnField Presentation is None!!!")
-
-display_only(presentation, view)
-reset_view(view)
-
-# Creation of colored "Vectors" presentations, based on time stamps of "RESU_DEPL" field
-presentation = VectorsOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1, is_colored=True)
-if presentation is None :
- raise RuntimeError("Vectors Presentation is None!!!")
-
-display_only(presentation, view)
-reset_view(view)
-
-# Creation of colored "DeformedShapeAndScalarMap" presentations, based on time stamps of "RESU_DEPL" field
-presentation = DeformedShapeAndScalarMapOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1)
-if presentation is None :
- raise RuntimeError("DeformedShapeAndScalarMap Presentation is None!!!")
-
-display_only(presentation, view)
-reset_view(view)
-
-# Creation of colored "CutPlanes" presentations, based on time stamps of "RESU_DEPL" field
-presentation = CutPlanesOnField(med_reader, EntityType.NODE, 'RESU____DEPL____________________', 1)
-if presentation is None :
- raise RuntimeError("CutPlanes Presentation is None!!!")
-
-display_only(presentation, view)
-reset_view(view)
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-from paravistest import tablesdir
-from presentations import *
-import pvsimple
-
-# Import table from file
-print('Import file with tables....', end=' ')
-file_path = tablesdir + "tables_test.xls"
-table_reader = pvsimple.TableReader(FileName=file_path)
-
-if table_reader is None:
- print("FAILED")
-else:
- table_reader.UpdatePipeline()
- print("OK")
-
-# Display
-table_to_3d = pvsimple.TableTo3D(table_reader)
-prs = pvsimple.Show()
-#prs.ColorArrayName = 'Table'
-
-available_tables = table_reader.GetPropertyValue("AvailableTables")
-tables_count = len(available_tables)
-for table_nb in range(0, tables_count):
- table_reader.TableNumber = table_nb
-
- field_name = 'Table'
- vector_mode = 'Magnitude'
- nb_components = 1
-
- # Get lookup table
- lookup_table = get_lookup_table(field_name, nb_components, vector_mode)
- if hasattr(lookup_table,"LockDataRange"):
- lookup_table.LockDataRange = 0
- elif hasattr(lookup_table,"LockScalarRange"):
- lookup_table.LockScalarRange = 0
- else:
- raise RuntimeError("Object %s has no 'LockDataRange' or 'LockScalarRange' attribute!"%(lookup_table))
-
- # Set properties
- prs.ColorArrayName = (EntityType.get_pvtype(EntityType.NODE), field_name)
- prs.LookupTable = lookup_table
-
- # Add scalar bar
- bar = add_scalar_bar(available_tables[table_nb], nb_components, vector_mode,
- lookup_table, "")
-
- reset_view()
- delete_pv_object(bar)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs3/D6 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-# 1. Import MED file
-med_file_path = datadir + "fra.med"
-
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-# 2. Creation of CutSegment presentations, based on time stamps of "VITESSE" field
-point1 = [0.0, 0.0, 0.0]
-point2 = [0.4, 0.05, 1.0]
-cut_segment1 = CutSegmentOnField(med_reader, EntityType.NODE, "VITESSE", 1,
- point1, point2)
-if cut_segment1 == None:
- raise RuntimeError("ERROR!!! The first CutSegment presentation is not built!")
-
-# 3. Creation of CutSegment presentations, based on time stamps of "TAUX_DE_VIDE" field
-point1 = [0, 0, 1]
-point2 = [0.2055, 0.0685, 0.541]
-cut_segment2 = CutSegmentOnField(med_reader, EntityType.NODE, "TAUX_DE_VIDE", 1,
- point1, point2)
-if cut_segment2 == None:
- raise RuntimeError("ERROR!!! The second CutSegment presentation is not built!")
-
-# 4. Creation of Table based on CutSegment presentation
-
-# TODO: it's possible to display CutSegment (PlotOverLine in terms of ParaViS) presentation
-# as a table in GUI, but it seems that there is no possibility to create table view
-# (spreadsheet view in terms of ParaViS) from in Python script
-
-# 5. Creation of curve based on Table
-xy_view = pvs.CreateXYPlotView()
-
-curve1 = pvs.Show(cut_segment1.Input, xy_view)
-if curve1 == None:
- raise RuntimeError(" ERROR!!! Curve based on the first CutSegment is not built!")
-
-curve2 = pvs.Show(cut_segment2.Input, xy_view)
-if curve2 == None:
- raise RuntimeError(" ERROR!!! Curve based on the second CutSegment is not built!")
-
-curves = [curve1, curve2]
-for c in curves:
- c.AttributeType = 'Point Data'
- c.UseIndexForXAxis = 0
- c.XArrayName = 'arc_length'
-
-pvsimple.SetActiveSource(cut_segment1.Input)
-set_visible_lines(curve1, ['VITESSE (Magnitude)'])
-
-pvsimple.SetActiveSource(cut_segment2.Input)
-set_visible_lines(curve2, ['TAUX_DE_VIDE'])
-
-pvsimple.ResetCamera(xy_view)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs3/D7 case
-
-import sys
-import os
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-# 1. MED file import
-print('Importing "Fields_group3D.med"........', end=' ')
-
-med_file_path = datadir + "Fields_group3D.med"
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-print('Get view..............................', end=' ')
-view = pvsimple.GetRenderView()
-if view is None:
- print("FAILED")
-else:
- print("OK")
-
-# 2. Displaying scalar field
-print("Creating Scalar Map.......", end=' ')
-
-scalarmap = ScalarMapOnField(med_reader, EntityType.CELL, 'scalar field', 1)
-if scalarmap is None:
- print("FAILED")
-else:
- print("OK")
-
-extract_group = pvsimple.ExtractGroup(med_reader)
-extract_group.UpdatePipelineInformation()
-extract_group.AllGroups = ['GRP_box_1']
-
-display_only(scalarmap, view)
-reset_view(view)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/bugs4/E0 case
-
-import time
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-sleep_delay = 1
-
-# 1. MED file import
-print('Import "ResOK_0000.med"...............', end=' ')
-med_file_path = datadir + "ResOK_0000.med"
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("ResOK_0000.med was not imported!!!")
-else:
- print("OK")
-
-# TODO: in the original VISU script the timestamp id was equal to 2,
-# but in PARAVIS it's inly one timestamp accessible
-timestamp_id = 1
-
-# 2. Create Scalar Map
-field_name = 'vitesse'
-
-print("Creating Scalar Map.......")
-scmap1 = ScalarMapOnField(med_reader, EntityType.NODE, field_name, timestamp_id)
-if scmap1 is None :
- raise RuntimeError("ScalarMap presentation is None!!!")
-else:
- print("OK")
-
-display_only(scmap1)
-reset_view()
-
-print("WIREFRAME sur scmap1")
-scmap1.Representation = 'Wireframe'
-time.sleep(sleep_delay)
-
-print("POINT sur scmap1")
-scmap1.Representation = 'Points'
-time.sleep(sleep_delay)
-
-print("SURFACEFRAME sur scmap1")
-scmap1.Representation = 'Surface With Edges'
-time.sleep(sleep_delay)
-
-# 3. Create Deformed Shape And Scalar Map
-print("Creating DeformedShapeAndScalarMap.......")
-scmap2 = DeformedShapeAndScalarMapOnField(med_reader, EntityType.NODE, field_name, timestamp_id)
-if scmap2 is None :
- raise RuntimeError("DeformedShapeAndScalarMapOnField presentation is None!!!")
-else:
- print("OK")
-
-scmap2.Input.ScaleFactor = 1.0
-
-display_only(scmap2)
-reset_view()
-
-print("WIREFRAME sur scmap2")
-scmap2.Representation = 'Wireframe'
-time.sleep(sleep_delay)
-
-print("POINT sur scmap2")
-scmap2.Representation = 'Points'
-time.sleep(sleep_delay)
-
-print("SURFACEFRAME sur scmap2")
-scmap2.Representation = 'Surface With Edges'
-time.sleep(sleep_delay)
-
-# 4.Create Deformed Shape
-print("Creating DeformedShape........")
-scmap3 = DeformedShapeOnField(med_reader, EntityType.NODE, field_name, timestamp_id)
-if scmap3 is None :
- raise RuntimeError("DeformedShapeOnField presentation is None!!!")
-else:
- print("OK")
-
-print("WIREFRAME sur scmap3")
-scmap3.Representation = 'Wireframe'
-time.sleep(sleep_delay)
-
-print("POINT sur scmap3")
-scmap3.Representation = 'Points'
-time.sleep(sleep_delay)
-
-print("SURFACEFRAME sur scmap3")
-scmap3.Representation = 'Surface With Edges'
-time.sleep(sleep_delay)
-
-scmap2.Input.ScaleFactor = 1.0
-
-# show colored:
-scmap3.ColorArrayName = (EntityType.get_pvtype(EntityType.NODE), field_name)
-
-display_only(scmap3)
-reset_view()
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A0 B1 C3 E0)
-
-SET(EXTRA_TESTS A1 A2 A3 A4 A5 A6 A7 A9 C5 C6 C9
- D1 D3 D6 D7)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/A0 case
-
-from paravistest import datadir, delete_with_inputs
-from presentations import *
-from pvsimple import *
-from paravistest import save_trace
-from paraview import smtrace
-
-GetActiveViewOrCreate('RenderView')
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal'}
-
-# 1. TimeStamps.med import
-file_path = datadir + "TimeStamps.med"
-OpenDataFile(file_path)
-med_reader = GetActiveSource()
-if med_reader is None :
- raise RuntimeError("TimeStamps.med wasn't imported...")
-
-# 2. ScalarMap creation
-med_field = "vitesse"
-
-scalarmap = ScalarMapOnField(med_reader, EntityType.NODE, med_field, 1)
-scalarmap.Visibility = 1
-scalarmap.SetScalarBarVisibility(GetActiveView(),1)
-
-# apply settings
-scalarmap.Position = settings["Offset"]
-scalarmap.LookupTable.VectorMode = settings["ScalarMode"][0]
-scalarmap.LookupTable.VectorComponent = settings["ScalarMode"][1]
-scalarmap.LookupTable.Discretize = settings["Discretize"]
-scalarmap.LookupTable.NumberOfTableValues = settings["NbColors"]
-scalarmap.LookupTable.UseLogScale = settings["UseLogScale"]
-
-bar = get_bar()
-bar.Position = settings["Position"]
-#bar.Position2 = settings["Size"]
-#bar.NumberOfLabels = settings["NbLabels"]
-bar.Title = settings["Title"]
-bar.Orientation = settings["Orientation"]
-
-
-# 3. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "ScalarMap.py")
-save_trace( path_to_save, text )
-
-# 4. Delete the created objects, recreate the view
-delete_with_inputs(scalarmap)
-delete_pv_object(GetActiveView())
-view = CreateRenderView()
-
-# 5. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 6. Checking of the settings done before dump
-recreated_bar = view.Representations[1]
-recreated_scalarmap = view.Representations[0]
-
-errors = 0
-tolerance = 1e-05
-
-# Offset
-offset = recreated_scalarmap.Position
-for i in range(len(settings["Offset"])):
- if abs(offset[i] - settings["Offset"][i]) > tolerance:
- print("ERROR!!! Offset value with ", i, " index is incorrect: ", offset[i], " instead of ", settings["Offset"][i])
- errors += 1
-
-# Scalar mode
-vector_mode = recreated_scalarmap.LookupTable.VectorMode
-vector_component = recreated_scalarmap.LookupTable.VectorComponent
-
-if vector_mode != settings["ScalarMode"][0]:
- print("ERROR!!! Vector mode value is incorrect: ", vector_mode, " instead of ", settings["ScalarMode"][0])
- errors += 1
-if vector_component != settings["ScalarMode"][1]:
- print("ERROR!!! Vector component value is incorrect: ", vector_component, " instead of ", settings["ScalarMode"][1])
- errors += 1
-
-# Position of scalar bar
-pos_x = recreated_bar.Position[0]
-pos_y = recreated_bar.Position[1]
-
-if abs(pos_x - settings["Position"][0]) > tolerance:
- print("ERROR!!! X coordinate of position of scalar bar is incorrect: ", pos_x, " instead of ", settings["Position"][0])
- errors += 1
-if abs(pos_y - settings["Position"][1]) > tolerance:
- print("ERROR!!! Y coordinate of position of scalar bar is incorrect: ", pos_y, " instead of ", settings["Position"][1])
- errors += 1
-
-# Size of scalar bar
-#width = recreated_bar.Position2[0]
-#height = recreated_bar.Position2[1]
-
-#if abs(width - settings["Size"][0]) > tolerance:
-# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0])
-# errors += 1
-#if abs(height - settings["Size"][1]) > tolerance:
-# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1])
-# errors += 1
-
-# Discretize
-discretize = recreated_scalarmap.LookupTable.Discretize
-if discretize != settings["Discretize"]:
- print("ERROR!!! Discretize property is incorrect: ", discretize, " instead of ", settings["Discretize"])
- errors += 1
-
-# Number of colors
-nb_colors = recreated_scalarmap.LookupTable.NumberOfTableValues
-if nb_colors != settings["NbColors"]:
- print("ERROR!!! Number of colors of scalar bar is incorrect: ", nb_colors, " instead of ", settings["NbColors"])
- errors += 1
-
-# Number of labels
-#nb_labels = recreated_bar.NumberOfLabels
-#if nb_labels != settings["NbLabels"]:
-# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"])
-# errors += 1
-
-# Title
-title = recreated_bar.Title
-if title != settings["Title"]:
- print("ERROR!!! Title of presentation is incorrect: ", title, " instead of ", settings["Title"])
- errors += 1
-
-# Scaling
-use_log_scale = recreated_scalarmap.LookupTable.UseLogScale
-if use_log_scale != settings["UseLogScale"]:
- print("ERROR!!! Scaling of presentation is incorrect: ", use_log_scale, " instead of ", settings["UseLogScale"])
- errors += 1
-
-# Bar Orientation
-orientation = recreated_bar.Orientation
-if orientation != settings["Orientation"]:
- print("ERROR!!! Orientation of scalar bar is incorrect: ", orientation, " instead of ", settings["Orientation"])
- errors += 1
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
-
-
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/A1 case
-
-from paravistest import datadir, delete_with_inputs
-from presentations import *
-from pvsimple import *
-
-from paravistest import save_trace
-from paraview import smtrace
-GetActiveViewOrCreate('RenderView')
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-
-settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal', "NbSurfaces": 444}
-
-# 1. TimeStamps.med import
-file_path = datadir + "TimeStamps.med"
-OpenDataFile(file_path)
-med_reader = GetActiveSource()
-if med_reader is None :
- raise RuntimeError("TimeStamps.med wasn't imported...")
-
-# 2. IsoSurfaces creation
-med_field = "vitesse"
-
-isosurfaces = IsoSurfacesOnField(med_reader, EntityType.NODE, med_field, 1)
-isosurfaces.Visibility = 1
-isosurfaces.SetScalarBarVisibility(GetActiveView(),1)
-
-# apply settings
-isosurfaces.Position = settings["Offset"]
-isosurfaces.LookupTable.VectorMode = settings["ScalarMode"][0]
-isosurfaces.LookupTable.VectorComponent = settings["ScalarMode"][1]
-isosurfaces.LookupTable.Discretize = settings["Discretize"]
-isosurfaces.LookupTable.NumberOfTableValues = settings["NbColors"]
-isosurfaces.LookupTable.UseLogScale = settings["UseLogScale"]
-
-contour_filter = isosurfaces.Input
-rgb_points = isosurfaces.LookupTable.RGBPoints
-scalar_range = [rgb_points[0], rgb_points[4]]
-surfaces = get_contours(scalar_range, settings["NbSurfaces"])
-contour_filter.Isosurfaces = surfaces
-
-bar = get_bar()
-bar.Position = settings["Position"]
-#bar.Position2 = settings["Size"]
-#bar.NumberOfLabels = settings["NbLabels"]
-bar.Title = settings["Title"]
-bar.Orientation = settings["Orientation"]
-
-# 3. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "IsoSurfaces.py")
-save_trace( path_to_save, text )
-
-# 4. Delete the created objects, recreate the view
-delete_with_inputs(isosurfaces)
-delete_pv_object(GetActiveView())
-view = CreateRenderView()
-
-# 5. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 6. Checking of the settings done before dump
-recreated_bar = view.Representations[1]
-recreated_isosurfaces = view.Representations[0]
-
-errors = 0
-tolerance = 1e-05
-
-# Offset
-offset = recreated_isosurfaces.Position
-for i in range(len(settings["Offset"])):
- if abs(offset[i] - settings["Offset"][i]) > tolerance:
- print("ERROR!!! Offset value with ", i, " index is incorrect: ", offset[i], " instead of ", settings["Offset"][i])
- errors += 1
-
-# Scalar mode
-vector_mode = recreated_isosurfaces.LookupTable.VectorMode
-vector_component = recreated_isosurfaces.LookupTable.VectorComponent
-
-if vector_mode != settings["ScalarMode"][0]:
- print("ERROR!!! Vector mode value is incorrect: ", vector_mode, " instead of ", settings["ScalarMode"][0])
- errors += 1
-if vector_component != settings["ScalarMode"][1]:
- print("ERROR!!! Vector component value is incorrect: ", vector_component, " instead of ", settings["ScalarMode"][1])
- errors += 1
-
-# Position of scalar bar
-pos_x = recreated_bar.Position[0]
-pos_y = recreated_bar.Position[1]
-
-if abs(pos_x - settings["Position"][0]) > tolerance:
- print("ERROR!!! X coordinate of position of scalar bar is incorrect: ", pos_x, " instead of ", settings["Position"][0])
- errors += 1
-if abs(pos_y - settings["Position"][1]) > tolerance:
- print("ERROR!!! Y coordinate of position of scalar bar is incorrect: ", pos_y, " instead of ", settings["Position"][1])
- errors += 1
-
-# Size of scalar bar
-#width = recreated_bar.Position2[0]
-#height = recreated_bar.Position2[1]
-
-#if abs(width - settings["Size"][0]) > tolerance:
-# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0])
-# errors += 1
-#if abs(height - settings["Size"][1]) > tolerance:
-# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1])
-# errors += 1
-
-# Discretize
-discretize = recreated_isosurfaces.LookupTable.Discretize
-if discretize != settings["Discretize"]:
- print("ERROR!!! Discretize property is incorrect: ", discretize, " instead of ", settings["Discretize"])
- errors += 1
-
-# Number of colors
-nb_colors = recreated_isosurfaces.LookupTable.NumberOfTableValues
-if nb_colors != settings["NbColors"]:
- print("ERROR!!! Number of colors of scalar bar is incorrect: ", nb_colors, " instead of ", settings["NbColors"])
- errors += 1
-
-# Number of labels
-#nb_labels = recreated_bar.NumberOfLabels
-#if nb_labels != settings["NbLabels"]:
-# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"])
-# errors += 1
-
-# Title
-title = recreated_bar.Title
-if title != settings["Title"]:
- print("ERROR!!! Title of presentation is incorrect: ", title, " instead of ", settings["Title"])
- errors += 1
-
-# Scaling
-use_log_scale = recreated_isosurfaces.LookupTable.UseLogScale
-if use_log_scale != settings["UseLogScale"]:
- print("ERROR!!! Scaling of presentation is incorrect: ", use_log_scale, " instead of ", settings["UseLogScale"])
- errors += 1
-
-# Bar Orientation
-orientation = recreated_bar.Orientation
-if orientation != settings["Orientation"]:
- print("ERROR!!! Orientation of scalar bar is incorrect: ", orientation, " instead of ", settings["Orientation"])
- errors += 1
-
-# NbSurfaces
-nb_surfaces = len(recreated_isosurfaces.Input.Isosurfaces)
-if nb_surfaces != settings["NbSurfaces"]:
- print("ERROR!!! Number of surfaces of presentation is incorrect: ", nb_surfaces, " instead of ", settings["NbSurfaces"])
- errors += 1
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/A2 case
-
-from paravistest import datadir, delete_with_inputs
-from presentations import *
-from pvsimple import *
-from paravistest import save_trace
-from paraview import smtrace
-
-GetActiveViewOrCreate('RenderView')
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal'}
-
-# 1. TimeStamps.med import
-file_path = datadir + "TimeStamps.med"
-OpenDataFile(file_path)
-med_reader = GetActiveSource()
-if med_reader is None :
- raise RuntimeError("TimeStamps.med wasn't imported...")
-
-# 2. CutPlanes creation
-med_field = "vitesse"
-
-cutplanes = CutPlanesOnField(med_reader, EntityType.NODE, med_field, 1)
-cutplanes.Visibility = 1
-cutplanes.SetScalarBarVisibility(GetActiveView(),1)
-
-# apply settings
-cutplanes.Position = settings["Offset"]
-cutplanes.LookupTable.VectorMode = settings["ScalarMode"][0]
-cutplanes.LookupTable.VectorComponent = settings["ScalarMode"][1]
-cutplanes.LookupTable.Discretize = settings["Discretize"]
-cutplanes.LookupTable.NumberOfTableValues = settings["NbColors"]
-cutplanes.LookupTable.UseLogScale = settings["UseLogScale"]
-
-normal = get_normal_by_orientation(Orientation.YZ, radians(33), radians(44))
-bounds = get_bounds(med_reader)
-pos = get_positions(2, normal, bounds, 0.1)
-pos[1] = 0.5
-cutplanes.Input.SliceType.Normal = normal
-cutplanes.Input.SliceOffsetValues = pos
-
-bar = get_bar()
-bar.Position = settings["Position"]
-#bar.Position2 = settings["Size"]
-#bar.NumberOfLabels = settings["NbLabels"]
-bar.Title = settings["Title"]
-bar.Orientation = settings["Orientation"]
-
-# 3. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "CutPlanes.py")
-save_trace( path_to_save, text )
-
-# 4. Delete the created objects, recreate the view
-delete_with_inputs(cutplanes)
-delete_pv_object(GetActiveView())
-view = CreateRenderView()
-
-# 5. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 6. Checking of the settings done before dump
-recreated_bar = view.Representations[1]
-recreated_cutplanes = view.Representations[0]
-
-errors = 0
-tolerance = 1e-05
-
-# Offset
-offset = recreated_cutplanes.Position
-for i in range(len(settings["Offset"])):
- if abs(offset[i] - settings["Offset"][i]) > tolerance:
- print("ERROR!!! Offset value with ", i, " index is incorrect: ", offset[i], " instead of ", settings["Offset"][i])
- errors += 1
-
-# Scalar mode
-vector_mode = recreated_cutplanes.LookupTable.VectorMode
-vector_component = recreated_cutplanes.LookupTable.VectorComponent
-
-if vector_mode != settings["ScalarMode"][0]:
- print("ERROR!!! Vector mode value is incorrect: ", vector_mode, " instead of ", settings["ScalarMode"][0])
- errors += 1
-if vector_component != settings["ScalarMode"][1]:
- print("ERROR!!! Vector component value is incorrect: ", vector_component, " instead of ", settings["ScalarMode"][1])
- errors += 1
-
-# Position of scalar bar
-pos_x = recreated_bar.Position[0]
-pos_y = recreated_bar.Position[1]
-
-if abs(pos_x - settings["Position"][0]) > tolerance:
- print("ERROR!!! X coordinate of position of scalar bar is incorrect: ", pos_x, " instead of ", settings["Position"][0])
- errors += 1
-if abs(pos_y - settings["Position"][1]) > tolerance:
- print("ERROR!!! Y coordinate of position of scalar bar is incorrect: ", pos_y, " instead of ", settings["Position"][1])
- errors += 1
-
-# Size of scalar bar
-#width = recreated_bar.Position2[0]
-#height = recreated_bar.Position2[1]
-
-#if abs(width - settings["Size"][0]) > tolerance:
-# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0])
-# errors += 1
-#if abs(height - settings["Size"][1]) > tolerance:
-# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1])
-# errors += 1
-
-# Discretize
-discretize = recreated_cutplanes.LookupTable.Discretize
-if discretize != settings["Discretize"]:
- print("ERROR!!! Discretize property is incorrect: ", discretize, " instead of ", settings["Discretize"])
- errors += 1
-
-# Number of colors
-nb_colors = recreated_cutplanes.LookupTable.NumberOfTableValues
-if nb_colors != settings["NbColors"]:
- print("ERROR!!! Number of colors of scalar bar is incorrect: ", nb_colors, " instead of ", settings["NbColors"])
- errors += 1
-
-# Number of labels
-#nb_labels = recreated_bar.NumberOfLabels
-#if nb_labels != settings["NbLabels"]:
-# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"])
-# errors += 1
-
-# Title
-title = recreated_bar.Title
-if title != settings["Title"]:
- print("ERROR!!! Title of presentation is incorrect: ", title, " instead of ", settings["Title"])
- errors += 1
-
-# Scaling
-use_log_scale = recreated_cutplanes.LookupTable.UseLogScale
-if use_log_scale != settings["UseLogScale"]:
- print("ERROR!!! Scaling of presentation is incorrect: ", use_log_scale, " instead of ", settings["UseLogScale"])
- errors += 1
-
-# Bar Orientation
-orientation = recreated_bar.Orientation
-if orientation != settings["Orientation"]:
- print("ERROR!!! Orientation of scalar bar is incorrect: ", orientation, " instead of ", settings["Orientation"])
- errors += 1
-
-# Normal
-cur_normal = list(recreated_cutplanes.Input.SliceType.Normal)
-if cur_normal != normal:
- print("ERROR!!! Normal of cut planes is incorrect: ", cur_normal, " instead of ", normal)
- errors += 1
-
-# Position
-cur_pos = list(recreated_cutplanes.Input.SliceOffsetValues)
-if cur_pos != pos:
- print("ERROR!!! Positions of cut planes is incorrect: ", cur_pos, " instead of ", pos)
- errors += 1
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/A3 case
-
-from paravistest import datadir, delete_with_inputs
-from presentations import *
-from pvsimple import *
-from paravistest import save_trace
-from paraview import smtrace
-
-GetActiveViewOrCreate('RenderView')
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal', "Scale": 0.333, "ColorArray": "", "ColorComponents": [0.111, 0.222, 0.333]}
-
-# 1. TimeStamps.med import
-file_path = datadir + "TimeStamps.med"
-OpenDataFile(file_path)
-med_reader = GetActiveSource()
-if med_reader is None :
- raise RuntimeError("TimeStamps.med wasn't imported...")
-
-# 2. DeformedShape creation
-med_field = "vitesse"
-
-deformedshape = DeformedShapeOnField(med_reader, EntityType.NODE, med_field, 1, None, True)
-deformedshape.Visibility = 1
-deformedshape.SetScalarBarVisibility(GetActiveView(),1)
-
-# apply settings
-deformedshape.Position = settings["Offset"]
-deformedshape.LookupTable.VectorMode = settings["ScalarMode"][0]
-deformedshape.LookupTable.VectorComponent = settings["ScalarMode"][1]
-deformedshape.LookupTable.Discretize = settings["Discretize"]
-deformedshape.LookupTable.NumberOfTableValues = settings["NbColors"]
-deformedshape.LookupTable.UseLogScale = settings["UseLogScale"]
-
-deformedshape.Input.ScaleFactor = settings["Scale"]
-deformedshape.ColorArrayName = (None, '')
-deformedshape.AmbientColor = settings["ColorComponents"]
-
-bar = get_bar()
-bar.Position = settings["Position"]
-#bar.Position2 = settings["Size"]
-#bar.NumberOfLabels = settings["NbLabels"]
-bar.Title = settings["Title"]
-bar.Orientation = settings["Orientation"]
-
-# 3. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "DeformedShape.py")
-save_trace( path_to_save, text )
-
-# 4. Delete the created objects, recreate the view
-delete_with_inputs(deformedshape)
-delete_pv_object(GetActiveView())
-view = CreateRenderView()
-
-# 5. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 6. Checking of the settings done before dump
-recreated_bar = view.Representations[1]
-recreated_deformedshape = view.Representations[0]
-
-errors = 0
-tolerance = 1e-05
-
-# Offset
-offset = recreated_deformedshape.Position
-for i in range(len(settings["Offset"])):
- if abs(offset[i] - settings["Offset"][i]) > tolerance:
- print("ERROR!!! Offset value with ", i, " index is incorrect: ", offset[i], " instead of ", settings["Offset"][i])
- errors += 1
-
-# Scalar mode
-vector_mode = recreated_deformedshape.LookupTable.VectorMode
-vector_component = recreated_deformedshape.LookupTable.VectorComponent
-
-if vector_mode != settings["ScalarMode"][0]:
- print("ERROR!!! Vector mode value is incorrect: ", vector_mode, " instead of ", settings["ScalarMode"][0])
- errors += 1
-if vector_component != settings["ScalarMode"][1]:
- print("ERROR!!! Vector component value is incorrect: ", vector_component, " instead of ", settings["ScalarMode"][1])
- errors += 1
-
-# Position of scalar bar
-pos_x = recreated_bar.Position[0]
-pos_y = recreated_bar.Position[1]
-
-if abs(pos_x - settings["Position"][0]) > tolerance:
- print("ERROR!!! X coordinate of position of scalar bar is incorrect: ", pos_x, " instead of ", settings["Position"][0])
- errors += 1
-if abs(pos_y - settings["Position"][1]) > tolerance:
- print("ERROR!!! Y coordinate of position of scalar bar is incorrect: ", pos_y, " instead of ", settings["Position"][1])
- errors += 1
-
-# Size of scalar bar
-#width = recreated_bar.Position2[0]
-#height = recreated_bar.Position2[1]
-
-#if abs(width - settings["Size"][0]) > tolerance:
-# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0])
-# errors += 1
-#if abs(height - settings["Size"][1]) > tolerance:
-# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1])
-# errors += 1
-
-# Discretize
-discretize = recreated_deformedshape.LookupTable.Discretize
-if discretize != settings["Discretize"]:
- print("ERROR!!! Discretize property is incorrect: ", discretize, " instead of ", settings["Discretize"])
- errors += 1
-
-# Number of colors
-nb_colors = recreated_deformedshape.LookupTable.NumberOfTableValues
-if nb_colors != settings["NbColors"]:
- print("ERROR!!! Number of colors of scalar bar is incorrect: ", nb_colors, " instead of ", settings["NbColors"])
- errors += 1
-
-# Number of labels
-#nb_labels = recreated_bar.NumberOfLabels
-#if nb_labels != settings["NbLabels"]:
-# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"])
-# errors += 1
-
-# Title
-title = recreated_bar.Title
-if title != settings["Title"]:
- print("ERROR!!! Title of presentation is incorrect: ", title, " instead of ", settings["Title"])
- errors += 1
-
-# Scaling
-use_log_scale = recreated_deformedshape.LookupTable.UseLogScale
-if use_log_scale != settings["UseLogScale"]:
- print("ERROR!!! Scaling of presentation is incorrect: ", use_log_scale, " instead of ", settings["UseLogScale"])
- errors += 1
-
-# Bar Orientation
-orientation = recreated_bar.Orientation
-if orientation != settings["Orientation"]:
- print("ERROR!!! Orientation of scalar bar is incorrect: ", orientation, " instead of ", settings["Orientation"])
- errors += 1
-
-# Scale factor
-scale = recreated_deformedshape.Input.ScaleFactor
-if abs(scale - settings["Scale"]) > tolerance:
- print("ERROR!!! Scale of presentation is incorrect: ", scale, " instead of ", settings["Scale"])
- errors += 1
-
-# Color array name
-array_name = recreated_deformedshape.ColorArrayName[1]
-if array_name != med_field:
- print("ERROR!!! Color array name of presentation is incorrect: ", array_name , " instead of ", med_field)
- errors += 1
-
-# Color
-color = list(recreated_deformedshape.AmbientColor)
-if color != settings["ColorComponents"]:
- print("ERROR!!! Color of presentation is incorrect: ", color, " instead of ", settings["ColorComponents"])
- errors += 1
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/A4 case
-
-from paravistest import datadir, delete_with_inputs
-from presentations import *
-from pvsimple import *
-from paravistest import save_trace
-from paraview import smtrace
-
-GetActiveViewOrCreate('RenderView')
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-
-settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 1), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation"}
-
-# 1. TimeStamps.med import
-file_path = datadir + "TimeStamps.med"
-OpenDataFile(file_path)
-med_reader = GetActiveSource()
-if med_reader is None :
- raise RuntimeError("TimeStamps.med wasn't imported...")
-
-# 2. GaussPoints creation
-med_field = "pression"
-
-gausspoints = GaussPointsOnField(med_reader, EntityType.CELL, med_field, 1)
-gausspoints.Visibility = 1
-gausspoints.SetScalarBarVisibility(GetActiveView(),1)
-
-# apply settings
-gausspoints.Position = settings["Offset"]
-gausspoints.LookupTable.VectorMode = settings["ScalarMode"][0]
-gausspoints.LookupTable.VectorComponent = settings["ScalarMode"][1]
-gausspoints.LookupTable.Discretize = settings["Discretize"]
-gausspoints.LookupTable.NumberOfTableValues = settings["NbColors"]
-
-bar = get_bar()
-bar.Position = settings["Position"]
-#bar.Position2 = settings["Size"]
-#bar.NumberOfLabels = settings["NbLabels"]
-bar.Title = settings["Title"]
-
-# 3. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "GaussPoints.py")
-save_trace( path_to_save, text )
-
-# 4. Delete the created objects, recreate the view
-delete_with_inputs(gausspoints)
-delete_pv_object(GetActiveView())
-view = CreateRenderView()
-
-# 5. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 6. Checking of the settings done before dump
-recreated_bar = view.Representations[1]
-recreated_gausspoints = view.Representations[0]
-
-errors = 0
-tolerance = 1e-05
-
-# Offset
-offset = recreated_gausspoints.Position
-for i in range(len(settings["Offset"])):
- if abs(offset[i] - settings["Offset"][i]) > tolerance:
- print("ERROR!!! Offset value with ", i, " index is incorrect: ", offset[i], " instead of ", settings["Offset"][i])
- errors += 1
-
-# Scalar mode
-vector_mode = recreated_gausspoints.LookupTable.VectorMode
-vector_component = recreated_gausspoints.LookupTable.VectorComponent
-
-if vector_mode != settings["ScalarMode"][0]:
- print("ERROR!!! Vector mode value is incorrect: ", vector_mode, " instead of ", settings["ScalarMode"][0])
- errors += 1
-if vector_component != settings["ScalarMode"][1]:
- print("ERROR!!! Vector component value is incorrect: ", vector_component, " instead of ", settings["ScalarMode"][1])
- errors += 1
-
-# Position of scalar bar
-pos_x = recreated_bar.Position[0]
-pos_y = recreated_bar.Position[1]
-
-if abs(pos_x - settings["Position"][0]) > tolerance:
- print("ERROR!!! X coordinate of position of scalar bar is incorrect: ", pos_x, " instead of ", settings["Position"][0])
- errors += 1
-if abs(pos_y - settings["Position"][1]) > tolerance:
- print("ERROR!!! Y coordinate of position of scalar bar is incorrect: ", pos_y, " instead of ", settings["Position"][1])
- errors += 1
-
-# Size of scalar bar
-#width = recreated_bar.Position2[0]
-#height = recreated_bar.Position2[1]
-
-#if abs(width - settings["Size"][0]) > tolerance:
-# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0])
-# errors += 1
-#if abs(height - settings["Size"][1]) > tolerance:
-# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1])
-# errors += 1
-
-# Discretize
-discretize = recreated_gausspoints.LookupTable.Discretize
-if discretize != settings["Discretize"]:
- print("ERROR!!! Discretize property is incorrect: ", discretize, " instead of ", settings["Discretize"])
- errors += 1
-
-# Number of colors
-nb_colors = recreated_gausspoints.LookupTable.NumberOfTableValues
-if nb_colors != settings["NbColors"]:
- print("ERROR!!! Number of colors of scalar bar is incorrect: ", nb_colors, " instead of ", settings["NbColors"])
- errors += 1
-
-# Number of labels
-#nb_labels = recreated_bar.NumberOfLabels
-#if nb_labels != settings["NbLabels"]:
-# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"])
-# errors += 1
-
-# Title
-title = recreated_bar.Title
-if title != settings["Title"]:
- print("ERROR!!! Title of presentation is incorrect: ", title, " instead of ", settings["Title"])
- errors += 1
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/A5 case
-
-from paravistest import datadir, delete_with_inputs
-from presentations import *
-from pvsimple import *
-from paravistest import save_trace
-from paraview import smtrace
-
-GetActiveViewOrCreate('RenderView')
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal', "ScaleFactor": 0.25, "NbContours": 4}
-
-# 1. TimeStamps.med import
-file_path = datadir + "fra.med"
-OpenDataFile(file_path)
-med_reader = GetActiveSource()
-if med_reader is None :
- raise RuntimeError("TimeStamps.med wasn't imported...")
-
-# 2. Plot3D creation
-med_field = "VITESSE"
-
-plot3d = Plot3DOnField(med_reader, EntityType.NODE, med_field, 1, is_contour=True)
-plot3d.Visibility = 1
-plot3d.SetScalarBarVisibility(GetActiveView(),1)
-
-# apply settings
-plot3d.Position = settings["Offset"]
-plot3d.LookupTable.VectorMode = settings["ScalarMode"][0]
-plot3d.LookupTable.VectorComponent = settings["ScalarMode"][1]
-plot3d.LookupTable.Discretize = settings["Discretize"]
-plot3d.LookupTable.NumberOfTableValues = settings["NbColors"]
-plot3d.LookupTable.UseLogScale = settings["UseLogScale"]
-
-slice_filter = plot3d.Input.Input.Input.Input
-normal = get_normal_by_orientation(Orientation.ZX, radians(22), radians(33))
-bounds = get_bounds(med_reader)
-pos = get_positions(1, normal, bounds, 0.11)
-slice_filter.SliceType.Normal = normal
-slice_filter.SliceOffsetValues = pos
-
-plot3d.Input.Input.ScaleFactor = settings["ScaleFactor"]
-
-contour_filter = plot3d.Input
-rgb_points = plot3d.LookupTable.RGBPoints
-scalar_range = [rgb_points[0], rgb_points[4]]
-surfaces = get_contours(scalar_range, settings["NbContours"])
-contour_filter.Isosurfaces = surfaces
-
-bar = get_bar()
-bar.Position = settings["Position"]
-#bar.Position2 = settings["Size"]
-#bar.NumberOfLabels = settings["NbLabels"]
-bar.Title = settings["Title"]
-bar.Orientation = settings["Orientation"]
-
-# 3. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "Plot3D.py")
-save_trace( path_to_save, text )
-
-# 4. Delete the created objects, recreate the view
-delete_with_inputs(plot3d)
-delete_pv_object(GetActiveView())
-view = CreateRenderView()
-
-# 5. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 6. Checking of the settings done before dump
-recreated_bar = view.Representations[1]
-recreated_plot3d = view.Representations[0]
-
-errors = 0
-tolerance = 1e-05
-
-# Offset
-offset = recreated_plot3d.Position
-for i in range(len(settings["Offset"])):
- if abs(offset[i] - settings["Offset"][i]) > tolerance:
- print("ERROR!!! Offset value with ", i, " index is incorrect: ", offset[i], " instead of ", settings["Offset"][i])
- errors += 1
-
-# Scalar mode
-vector_mode = recreated_plot3d.LookupTable.VectorMode
-vector_component = recreated_plot3d.LookupTable.VectorComponent
-
-if vector_mode != settings["ScalarMode"][0]:
- print("ERROR!!! Vector mode value is incorrect: ", vector_mode, " instead of ", settings["ScalarMode"][0])
- errors += 1
-if vector_component != settings["ScalarMode"][1]:
- print("ERROR!!! Vector component value is incorrect: ", vector_component, " instead of ", settings["ScalarMode"][1])
- errors += 1
-
-# Position of scalar bar
-pos_x = recreated_bar.Position[0]
-pos_y = recreated_bar.Position[1]
-
-if abs(pos_x - settings["Position"][0]) > tolerance:
- print("ERROR!!! X coordinate of position of scalar bar is incorrect: ", pos_x, " instead of ", settings["Position"][0])
- errors += 1
-if abs(pos_y - settings["Position"][1]) > tolerance:
- print("ERROR!!! Y coordinate of position of scalar bar is incorrect: ", pos_y, " instead of ", settings["Position"][1])
- errors += 1
-
-# Size of scalar bar
-#width = recreated_bar.Position2[0]
-#height = recreated_bar.Position2[1]
-
-#if abs(width - settings["Size"][0]) > tolerance:
-# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0])
-# errors += 1
-#if abs(height - settings["Size"][1]) > tolerance:
-# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1])
-# errors += 1
-
-# Discretize
-discretize = recreated_plot3d.LookupTable.Discretize
-if discretize != settings["Discretize"]:
- print("ERROR!!! Discretize property is incorrect: ", discretize, " instead of ", settings["Discretize"])
- errors += 1
-
-# Number of colors
-nb_colors = recreated_plot3d.LookupTable.NumberOfTableValues
-if nb_colors != settings["NbColors"]:
- print("ERROR!!! Number of colors of scalar bar is incorrect: ", nb_colors, " instead of ", settings["NbColors"])
- errors += 1
-
-# Number of labels
-#nb_labels = recreated_bar.NumberOfLabels
-#if nb_labels != settings["NbLabels"]:
-# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"])
-# errors += 1
-
-# Title
-title = recreated_bar.Title
-if title != settings["Title"]:
- print("ERROR!!! Title of presentation is incorrect: ", title, " instead of ", settings["Title"])
- errors += 1
-
-# Scaling
-use_log_scale = recreated_plot3d.LookupTable.UseLogScale
-if use_log_scale != settings["UseLogScale"]:
- print("ERROR!!! Scaling of presentation is incorrect: ", use_log_scale, " instead of ", settings["UseLogScale"])
- errors += 1
-
-# Bar Orientation
-orientation = recreated_bar.Orientation
-if orientation != settings["Orientation"]:
- print("ERROR!!! Orientation of scalar bar is incorrect: ", orientation, " instead of ", settings["Orientation"])
- errors += 1
-
-# Scale Factor
-scale_factor = recreated_plot3d.Input.Input.ScaleFactor
-if abs(scale_factor - settings["ScaleFactor"]) > tolerance:
- print("ERROR!!! Scale factor of presentation is incorrect: ", scale_factor, " instead of ", settings["ScaleFactor"])
- errors += 1
-
-# Cutting plane
-cur_slice_filter = recreated_plot3d.Input.Input.Input.Input
-
-cur_normal = list(cur_slice_filter.SliceType.Normal)
-if cur_normal != normal:
- print("ERROR!!! Normal of the cutting plane is incorrect: ", cur_normal, " instead of ", normal)
- errors += 1
-
-cur_pos = list(cur_slice_filter.SliceOffsetValues)
-if cur_pos != pos:
- print("ERROR!!! Position of the cuttting plane is incorrect: ", cur_pos, " instead of ", pos)
- errors += 1
-
-# Contours
-cur_surfaces = list(recreated_plot3d.Input.Isosurfaces)
-if cur_surfaces != surfaces:
- print("ERROR!!! Contours is incorrect: ", cur_surfaces, " instead of ", surfaces)
- errors += 1
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/A6 case
-
-from paravistest import datadir, delete_with_inputs
-from presentations import *
-from pvsimple import *
-from paravistest import save_trace
-from paraview import smtrace
-
-GetActiveViewOrCreate('RenderView')
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal', "Scale": 0.12929}
-
-# 1. TimeStamps.med import
-file_path = datadir + "TimeStamps.med"
-OpenDataFile(file_path)
-med_reader = GetActiveSource()
-if med_reader is None:
- raise RuntimeError("TimeStamps.med wasn't imported...")
-
-# 2. ScalarMapOnDeformedShape creation
-med_field = "vitesse"
-
-prs = DeformedShapeAndScalarMapOnField(med_reader, EntityType.NODE, med_field, 1)
-prs.Visibility = 1
-prs.SetScalarBarVisibility(GetActiveView(),1)
-
-# apply settings
-prs.Position = settings["Offset"]
-prs.LookupTable.VectorMode = settings["ScalarMode"][0]
-prs.LookupTable.VectorComponent = settings["ScalarMode"][1]
-prs.LookupTable.Discretize = settings["Discretize"]
-prs.LookupTable.NumberOfTableValues = settings["NbColors"]
-prs.LookupTable.UseLogScale = settings["UseLogScale"]
-
-prs.Input.ScaleFactor = settings["Scale"]
-range_min = prs.LookupTable.RGBPoints[0]
-range_max = prs.LookupTable.RGBPoints[4]
-
-bar = get_bar()
-bar.Position = settings["Position"]
-#bar.Position2 = settings["Size"]
-#bar.NumberOfLabels = settings["NbLabels"]
-bar.Title = settings["Title"]
-bar.Orientation = settings["Orientation"]
-
-# 3. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "ScalarMapOnDeformedShape.py")
-save_trace( path_to_save, text )
-
-# 4. Delete the created objects, recreate the view
-delete_with_inputs(prs)
-delete_pv_object(GetActiveView())
-view = CreateRenderView()
-
-# 5. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 6. Checking of the settings done before dump
-recreated_bar = view.Representations[1]
-recreated_prs = view.Representations[0]
-
-errors = 0
-tolerance = 1e-05
-
-# Offset
-offset = recreated_prs.Position
-for i in range(len(settings["Offset"])):
- if abs(offset[i] - settings["Offset"][i]) > tolerance:
- print("ERROR!!! Offset value with ", i, " index is incorrect: ", offset[i], " instead of ", settings["Offset"][i])
- errors += 1
-
-# Scalar mode
-vector_mode = recreated_prs.LookupTable.VectorMode
-vector_component = recreated_prs.LookupTable.VectorComponent
-
-if vector_mode != settings["ScalarMode"][0]:
- print("ERROR!!! Vector mode value is incorrect: ", vector_mode, " instead of ", settings["ScalarMode"][0])
- errors += 1
-if vector_component != settings["ScalarMode"][1]:
- print("ERROR!!! Vector component value is incorrect: ", vector_component, " instead of ", settings["ScalarMode"][1])
- errors += 1
-
-# Position of scalar bar
-pos_x = recreated_bar.Position[0]
-pos_y = recreated_bar.Position[1]
-
-if abs(pos_x - settings["Position"][0]) > tolerance:
- print("ERROR!!! X coordinate of position of scalar bar is incorrect: ", pos_x, " instead of ", settings["Position"][0])
- errors += 1
-if abs(pos_y - settings["Position"][1]) > tolerance:
- print("ERROR!!! Y coordinate of position of scalar bar is incorrect: ", pos_y, " instead of ", settings["Position"][1])
- errors += 1
-
-# Size of scalar bar
-#width = recreated_bar.Position2[0]
-#height = recreated_bar.Position2[1]
-
-#if abs(width - settings["Size"][0]) > tolerance:
-# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0])
-# errors += 1
-#if abs(height - settings["Size"][1]) > tolerance:
-# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1])
-# errors += 1
-
-# Discretize
-discretize = recreated_prs.LookupTable.Discretize
-if discretize != settings["Discretize"]:
- print("ERROR!!! Discretize property is incorrect: ", discretize, " instead of ", settings["Discretize"])
- errors += 1
-
-# Number of colors
-nb_colors = recreated_prs.LookupTable.NumberOfTableValues
-if nb_colors != settings["NbColors"]:
- print("ERROR!!! Number of colors of scalar bar is incorrect: ", nb_colors, " instead of ", settings["NbColors"])
- errors += 1
-
-# Number of labels
-#nb_labels = recreated_bar.NumberOfLabels
-#if nb_labels != settings["NbLabels"]:
-# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"])
-# errors += 1
-
-# Title
-title = recreated_bar.Title
-if title != settings["Title"]:
- print("ERROR!!! Title of presentation is incorrect: ", title, " instead of ", settings["Title"])
- errors += 1
-
-# Scaling
-use_log_scale = recreated_prs.LookupTable.UseLogScale
-if use_log_scale != settings["UseLogScale"]:
- print("ERROR!!! Scaling of presentation is incorrect: ", use_log_scale, " instead of ", settings["UseLogScale"])
- errors += 1
-
-# Bar Orientation
-orientation = recreated_bar.Orientation
-if orientation != settings["Orientation"]:
- print("ERROR!!! Orientation of scalar bar is incorrect: ", orientation, " instead of ", settings["Orientation"])
- errors += 1
-
-# Range
-cur_range_min = recreated_prs.LookupTable.RGBPoints[0]
-cur_range_max = recreated_prs.LookupTable.RGBPoints[4]
-
-if abs(cur_range_min - range_min) > tolerance:
- print("ERROR!!! Minimum value of range of presentation is incorrect: ", cur_range_min, " instead of ", range_min)
- errors += 1
-
-if abs(cur_range_max - range_max) > tolerance:
- print("ERROR!!! Maximum value of range of presentation is incorrect: ", cur_range_max, " instead of ", range_max)
- errors += 1
-
-# Scale factor
-scale = recreated_prs.Input.ScaleFactor
-if abs(scale - settings["Scale"]) > tolerance:
- print("ERROR!!! Scale of presentation is incorrect: ", scale, " instead of ", settings["Scale"])
- errors += 1
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/A7 case
-
-from paravistest import datadir, delete_with_inputs
-from presentations import *
-from pvsimple import *
-from paravistest import save_trace
-from paraview import smtrace
-
-GetActiveViewOrCreate('RenderView')
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-
-# StreamLines settings
-settings = {'name': 'myStreamLines',
- 'IntegrationDirection': 'FORWARD',
- 'InitialStepLength': 0.009,
- 'IntegrationStepUnit': 'Length',
- 'IntegratorType': 'Runge-Kutta 4-5',
- 'MaximumError': 1.45e-06,
- 'MinimumStepLength': 0.0079917,
- 'MaximumStepLength': 0.008,
- 'MaximumSteps': 475,
- 'MaximumStreamlineLength': 1.185,
- 'SeedType.Center': [0.1088, 0.03254, 0.431],
- 'SeedType.NumberOfPoints': 33,
- 'SeedType.Radius': 0.0035}
-
-# errors counter
-errors = 0
-
-# 1. TimeStamps.med import
-file_path = datadir + "TimeStamps.med"
-OpenDataFile(file_path)
-med_reader = GetActiveSource()
-if med_reader is None :
- raise RuntimeError("TimeStamps.med wasn't imported...")
-
-# 2. StreamLines creation
-field_name = "vitesse"
-
-source = MergeBlocks(med_reader)
-calc = get_add_component_calc(source, EntityType.NODE, field_name)
-vector_array = calc.ResultArrayName
-calc.UpdatePipeline()
-source = calc
-stream = pvs.StreamTracer(source)
-
-# 3. Apply settings
-RenameSource(settings['name'], stream)
-stream.IntegrationDirection = settings['IntegrationDirection']
-stream.InitialStepLength = settings['InitialStepLength']
-stream.IntegrationStepUnit = settings['IntegrationStepUnit']
-stream.IntegratorType = settings['IntegratorType']
-stream.MaximumError = settings['MaximumError']
-stream.MinimumStepLength = settings['MinimumStepLength']
-stream.MaximumStepLength = settings['MaximumStepLength']
-stream.MaximumSteps = settings['MaximumSteps']
-stream.MaximumStreamlineLength = settings['MaximumStreamlineLength']
-stream.SeedType.Center = settings['SeedType.Center']
-stream.SeedType.NumberOfPoints = settings['SeedType.NumberOfPoints']
-stream.SeedType.Radius = settings['SeedType.Radius']
-
-# 4. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "StreamLines.py")
-save_trace( path_to_save, text )
-
-# 4. Delete the created objects
-delete_with_inputs(stream)
-
-# 5. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 6. Find the recreated StreamTracer object
-recreated_stream = FindSource(settings['name'])
-if recreated_stream is None:
- raise RuntimeError("There is no StreamLines in the study (must be created by executed python script)!!!")
-
-print(settings['name'] + " was found!!!")
-
-# 7. Check settings
-
-# IntegrationDirection
-param = stream.IntegrationDirection
-if param != settings['IntegrationDirection']:
- print("ERROR!!! IntegrationDirection of presentation is incorrect: ", param, " instead of ", settings["IntegrationDirection"])
- errors += 1
-
-# InitialStepLength
-param = stream.InitialStepLength
-if param != settings['InitialStepLength']:
- print("ERROR!!! InitialStepLength of presentation is incorrect: ", param, " instead of ", settings["InitialStepLength"])
- errors += 1
-
-# IntegrationStepUnit
-param = stream.IntegrationStepUnit
-if param != settings['IntegrationStepUnit']:
- print("ERROR!!! IntegrationStepUnit of presentation is incorrect: ", param, " instead of ", settings["IntegrationStepUnit"])
- errors += 1
-
-# IntegratorType
-param = stream.IntegratorType
-if param != settings['IntegratorType']:
- print("ERROR!!! IntegratorType of presentation is incorrect: ", param, " instead of ", settings["IntegratorType"])
- errors += 1
-
-# MaximumError
-param = stream.MaximumError
-if param != settings['MaximumError']:
- print("ERROR!!! MaximumError of presentation is incorrect: ", param, " instead of ", settings["MaximumError"])
- errors += 1
-
-# MinimumStepLength
-param = stream.MinimumStepLength
-if param != settings['MinimumStepLength']:
- print("ERROR!!! MinimumStepLength of presentation is incorrect: ", param, " instead of ", settings["MinimumStepLength"])
- errors += 1
-
-# MaximumStepLength
-param = stream.MaximumStepLength
-if param != settings['MaximumStepLength']:
- print("ERROR!!! MaximumStepLength of presentation is incorrect: ", param, " instead of ", settings["MaximumStepLength"])
- errors += 1
-
-# MaximumSteps
-param = stream.MaximumSteps
-if param != settings['MaximumSteps']:
- print("ERROR!!! MaximumSteps of presentation is incorrect: ", param, " instead of ", settings["MaximumSteps"])
- errors += 1
-
-# MaximumStreamlineLength
-param = stream.MaximumStreamlineLength
-if param != settings['MaximumStreamlineLength']:
- print("ERROR!!! MaximumStreamlineLength of presentation is incorrect: ", param, " instead of ", settings["MaximumStreamlineLength"])
- errors += 1
-
-# SeedType.Center
-param = list(stream.SeedType.Center)
-if param != settings['SeedType.Center']:
- print("ERROR!!! SeedType.Center of presentation is incorrect: ", param, " instead of ", settings["SeedType.Center"])
- errors += 1
-
-# SeedType.NumberOfPoints
-param = stream.SeedType.NumberOfPoints
-if param != settings['SeedType.NumberOfPoints']:
- print("ERROR!!! SeedType.NumberOfPoints of presentation is incorrect: ", param, " instead of ", settings["SeedType.NumberOfPoints"])
- errors += 1
-
-# SeedType.Radius
-param = stream.SeedType.Radius
-if param != settings['SeedType.Radius']:
- print("ERROR!!! SeedType.Radius of presentation is incorrect: ", param, " instead of ", settings["SeedType.Radius"])
- errors += 1
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/A3 case
-
-from paravistest import datadir, delete_with_inputs
-from presentations import *
-from pvsimple import *
-from paravistest import save_trace
-from paraview import smtrace
-
-GetActiveViewOrCreate('RenderView')
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-
-settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal', "Scale": 0.333, "ColorComponents": [0.111, 0.222, 0.333], "LineWidth": 2, "GlyphType": 'Cone', "GlyphPos": [-0.5, 0.0, 0.0]}
-
-# 1. TimeStamps.med import
-file_path = datadir + "TimeStamps.med"
-OpenDataFile(file_path)
-med_reader = GetActiveSource()
-if med_reader is None :
- raise RuntimeError("TimeStamps.med wasn't imported...")
-
-# 2. Vectors creation
-med_field = "vitesse"
-
-vectors = VectorsOnField(med_reader, EntityType.NODE, med_field, 1,is_colored=True)
-vectors.Visibility = 1
-vectors.SetScalarBarVisibility(GetActiveView(),1)
-
-# apply settings
-vectors.Position = settings["Offset"]
-vectors.LookupTable.VectorMode = settings["ScalarMode"][0]
-vectors.LookupTable.VectorComponent = settings["ScalarMode"][1]
-vectors.LookupTable.Discretize = settings["Discretize"]
-vectors.LookupTable.NumberOfTableValues = settings["NbColors"]
-vectors.LookupTable.UseLogScale = settings["UseLogScale"]
-
-vectors.Input.ScaleFactor = settings["Scale"]
-vectors.AmbientColor = settings["ColorComponents"]
-
-vectors.LineWidth = settings["LineWidth"]
-vectors.Input.GlyphType = settings["GlyphType"]
-vectors.Input.GlyphType.Center = settings["GlyphPos"]
-
-bar = get_bar()
-bar.Position = settings["Position"]
-#bar.Position2 = settings["Size"]
-#bar.NumberOfLabels = settings["NbLabels"]
-bar.Title = settings["Title"]
-bar.Orientation = settings["Orientation"]
-
-cone_glyth_type = type(vectors.Input.GlyphType)
-
-# 3. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "Vectors.py")
-save_trace( path_to_save, text )
-
-# 4. Delete the created objects, recreate the view
-delete_with_inputs(vectors)
-delete_pv_object(GetActiveView())
-view = CreateRenderView()
-
-# 5. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 6. Checking of the settings done before dump
-recreated_bar = view.Representations[1]
-recreated_vectors = view.Representations[0]
-
-errors = 0
-tolerance = 1e-05
-
-# Offset
-offset = recreated_vectors.Position
-for i in range(len(settings["Offset"])):
- if abs(offset[i] - settings["Offset"][i]) > tolerance:
- print("ERROR!!! Offset value with ", i, " index is incorrect: ", offset[i], " instead of ", settings["Offset"][i])
- errors += 1
-
-# Scalar mode
-vector_mode = recreated_vectors.LookupTable.VectorMode
-vector_component = recreated_vectors.LookupTable.VectorComponent
-
-if vector_mode != settings["ScalarMode"][0]:
- print("ERROR!!! Vector mode value is incorrect: ", vector_mode, " instead of ", settings["ScalarMode"][0])
- errors += 1
-if vector_component != settings["ScalarMode"][1]:
- print("ERROR!!! Vector component value is incorrect: ", vector_component, " instead of ", settings["ScalarMode"][1])
- errors += 1
-
-# Position of scalar bar
-pos_x = recreated_bar.Position[0]
-pos_y = recreated_bar.Position[1]
-
-if abs(pos_x - settings["Position"][0]) > tolerance:
- print("ERROR!!! X coordinate of position of scalar bar is incorrect: ", pos_x, " instead of ", settings["Position"][0])
- errors += 1
-if abs(pos_y - settings["Position"][1]) > tolerance:
- print("ERROR!!! Y coordinate of position of scalar bar is incorrect: ", pos_y, " instead of ", settings["Position"][1])
- errors += 1
-
-# Size of scalar bar
-#width = recreated_bar.Position2[0]
-#height = recreated_bar.Position2[1]
-
-#if abs(width - settings["Size"][0]) > tolerance:
-# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0])
-# errors += 1
-#if abs(height - settings["Size"][1]) > tolerance:
-# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1])
-# errors += 1
-
-# Discretize
-discretize = recreated_vectors.LookupTable.Discretize
-if discretize != settings["Discretize"]:
- print("ERROR!!! Discretize property is incorrect: ", discretize, " instead of ", settings["Discretize"])
- errors += 1
-
-# Number of colors
-nb_colors = recreated_vectors.LookupTable.NumberOfTableValues
-if nb_colors != settings["NbColors"]:
- print("ERROR!!! Number of colors of scalar bar is incorrect: ", nb_colors, " instead of ", settings["NbColors"])
- errors += 1
-
-# Number of labels
-#nb_labels = recreated_bar.NumberOfLabels
-#if nb_labels != settings["NbLabels"]:
-# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"])
-# errors += 1
-
-# Title
-title = recreated_bar.Title
-if title != settings["Title"]:
- print("ERROR!!! Title of presentation is incorrect: ", title, " instead of ", settings["Title"])
- errors += 1
-
-# Scaling
-use_log_scale = recreated_vectors.LookupTable.UseLogScale
-if use_log_scale != settings["UseLogScale"]:
- print("ERROR!!! Scaling of presentation is incorrect: ", use_log_scale, " instead of ", settings["UseLogScale"])
- errors += 1
-
-# Bar Orientation
-orientation = recreated_bar.Orientation
-if orientation != settings["Orientation"]:
- print("ERROR!!! Orientation of scalar bar is incorrect: ", orientation, " instead of ", settings["Orientation"])
- errors += 1
-
-# Scale factor
-scale = recreated_vectors.Input.ScaleFactor
-if abs(scale - settings["Scale"]) > tolerance:
- print("ERROR!!! Scale of presentation is incorrect: ", scale, " instead of ", settings["Scale"])
- errors += 1
-
-# Color array name
-array_name = recreated_vectors.ColorArrayName[1]
-if array_name != med_field:
- print("ERROR!!! Color array name of presentation is incorrect: ", array_name, " instead of ", med_field)
- errors += 1
-
-# Color
-color = list(recreated_vectors.AmbientColor)
-if color != settings["ColorComponents"]:
- print("ERROR!!! Color of presentation is incorrect: ", color, " instead of ", settings["ColorComponents"])
- errors += 1
-
-# Line width
-line_width = recreated_vectors.LineWidth
-if abs(line_width - settings["LineWidth"]) > tolerance:
- print("ERROR!!! Line width of presentation is incorrect: ", line_width, " instead of ", settings["LineWidth"])
- errors += 1
-
-# Glyph type
-glyph_type = type(recreated_vectors.Input.GlyphType)
-if glyph_type != cone_glyth_type:
- print("ERROR!!! Glyph type is incorrect: ", glyph_type, " instead of ", cone_glyth_type)
- errors += 1
-
-# Glyph position
-glyph_position = list(recreated_vectors.Input.GlyphType.Center)
-if glyph_position != settings["GlyphPos"]:
- print("ERROR!!! Glyph position is incorrect: ", glyph_position, " instead of ", settings["GlyphPos"])
- errors += 1
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/A2 case
-
-from paravistest import datadir, delete_with_inputs
-from presentations import *
-from pvsimple import *
-from paravistest import save_trace
-from paraview import smtrace
-
-GetActiveViewOrCreate('RenderView')
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-settings = {"Offset": [0.0001, 0.0002, 0], "ScalarMode": ("Component", 2), "Position": [0.1, 0.2], "Size": [0.15, 0.25], "Discretize": 1, "NbColors": 44, "NbLabels": 22, "Title": "My presentation", "UseLogScale": 1, "Orientation": 'Horizontal', "Orientation_BasePlane": [Orientation.ZX, 22, 33], "Orientation_CuttingPlanes": [Orientation.YZ, 44, 55], "Displacement": 0.1, "Displacement2": 0.2, "BasePlane_Position": 0.1, "NbLines": 3}
-
-# 1. TimeStamps.med import
-file_path = datadir + "TimeStamps.med"
-OpenDataFile(file_path)
-med_reader = GetActiveSource()
-if med_reader is None :
- raise RuntimeError("TimeStamps.med wasn't imported...")
-
-# 2. CutLines creation
-med_field = "vitesse"
-
-nb_lines = settings["NbLines"]
-orient1 = settings["Orientation_BasePlane"][0]
-base_ang1 = settings["Orientation_BasePlane"][1]
-base_ang2 = settings["Orientation_BasePlane"][2]
-orient2 = settings["Orientation_CuttingPlanes"][0]
-cut_ang1 = settings["Orientation_CuttingPlanes"][1]
-cut_ang2 = settings["Orientation_CuttingPlanes"][2]
-d1 = settings["Displacement"]
-d2 = settings["Displacement2"]
-
-cutlines = CutLinesOnField(med_reader, EntityType.NODE, med_field, 1, nb_lines, orient1, base_ang1, base_ang2, orient2, cut_ang1, cut_ang2, d1, d2)
-cutlines.Visibility = 1
-cutlines.SetScalarBarVisibility(GetActiveView(),1)
-
-
-# apply settings
-cutlines.Position = settings["Offset"]
-cutlines.LookupTable.VectorMode = settings["ScalarMode"][0]
-cutlines.LookupTable.VectorComponent = settings["ScalarMode"][1]
-cutlines.LookupTable.Discretize = settings["Discretize"]
-cutlines.LookupTable.NumberOfTableValues = settings["NbColors"]
-cutlines.LookupTable.UseLogScale = settings["UseLogScale"]
-
-cutlines.Input.Input.SliceOffsetValues[0] = settings["BasePlane_Position"]
-
-normal1 = list(cutlines.Input.Input.SliceType.Normal)
-pos1 = list(cutlines.Input.Input.SliceOffsetValues)
-normal2 = list(cutlines.Input.SliceType.Normal)
-pos2 = list(cutlines.Input.SliceOffsetValues)
-
-bar = get_bar()
-bar.Position = settings["Position"]
-#bar.Position2 = settings["Size"]
-#bar.NumberOfLabels = settings["NbLabels"]
-bar.Title = settings["Title"]
-bar.Orientation = settings["Orientation"]
-
-# 3. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "CutLines.py")
-save_trace( path_to_save, text )
-
-# 4. Delete the created objects, recreate the view
-delete_with_inputs(cutlines)
-delete_pv_object(GetActiveView())
-view = CreateRenderView()
-
-# 5. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 6. Checking of the settings done before dump
-recreated_bar = view.Representations[0]
-recreated_cutlines = view.Representations[1]
-
-errors = 0
-tolerance = 1e-05
-
-# Offset
-offset = recreated_cutlines.Position
-for i in range(len(settings["Offset"])):
- if abs(offset[i] - settings["Offset"][i]) > tolerance:
- print("ERROR!!! Offset value with ", i, " index is incorrect: ", offset[i], " instead of ", settings["Offset"][i])
- errors += 1
-
-# Scalar mode
-vector_mode = recreated_cutlines.LookupTable.VectorMode
-vector_component = recreated_cutlines.LookupTable.VectorComponent
-
-if vector_mode != settings["ScalarMode"][0]:
- print("ERROR!!! Vector mode value is incorrect: ", vector_mode, " instead of ", settings["ScalarMode"][0])
- errors += 1
-if vector_component != settings["ScalarMode"][1]:
- print("ERROR!!! Vector component value is incorrect: ", vector_component, " instead of ", settings["ScalarMode"][1])
- errors += 1
-
-# Position of scalar bar
-pos_x = recreated_bar.Position[0]
-pos_y = recreated_bar.Position[1]
-
-if abs(pos_x - settings["Position"][0]) > tolerance:
- print("ERROR!!! X coordinate of position of scalar bar is incorrect: ", pos_x, " instead of ", settings["Position"][0])
- errors += 1
-if abs(pos_y - settings["Position"][1]) > tolerance:
- print("ERROR!!! Y coordinate of position of scalar bar is incorrect: ", pos_y, " instead of ", settings["Position"][1])
- errors += 1
-
-# Size of scalar bar
-#width = recreated_bar.Position2[0]
-#height = recreated_bar.Position2[1]
-
-#if abs(width - settings["Size"][0]) > tolerance:
-# print("ERROR!!! Width of scalar bar is incorrect: ", width, " instead of ", settings["Size"][0])
-# errors += 1
-#if abs(height - settings["Size"][1]) > tolerance:
-# print("ERROR!!! Height of scalar bar is incorrect: ", height, " instead of ", settings["Size"][1])
-# errors += 1
-
-# Discretize
-discretize = recreated_cutlines.LookupTable.Discretize
-if discretize != settings["Discretize"]:
- print("ERROR!!! Discretize property is incorrect: ", discretize, " instead of ", settings["Discretize"])
- errors += 1
-
-# Number of colors
-nb_colors = recreated_cutlines.LookupTable.NumberOfTableValues
-if nb_colors != settings["NbColors"]:
- print("ERROR!!! Number of colors of scalar bar is incorrect: ", nb_colors, " instead of ", settings["NbColors"])
- errors += 1
-
-# Number of labels
-#nb_labels = recreated_bar.NumberOfLabels
-#if nb_labels != settings["NbLabels"]:
-# print("ERROR!!! Number of labels of scalar bar is incorrect: ", nb_labels, " instead of ", settings["NbLabels"])
-# errors += 1
-
-# Title
-title = recreated_bar.Title
-if title != settings["Title"]:
- print("ERROR!!! Title of presentation is incorrect: ", title, " instead of ", settings["Title"])
- errors += 1
-
-# Scaling
-use_log_scale = recreated_cutlines.LookupTable.UseLogScale
-if use_log_scale != settings["UseLogScale"]:
- print("ERROR!!! Scaling of presentation is incorrect: ", use_log_scale, " instead of ", settings["UseLogScale"])
- errors += 1
-
-# Bar Orientation
-orientation = recreated_bar.Orientation
-if orientation != settings["Orientation"]:
- print("ERROR!!! Orientation of scalar bar is incorrect: ", orientation, " instead of ", settings["Orientation"])
- errors += 1
-
-# Base Plane Normal
-cur_normal = list(recreated_cutlines.Input.Input.SliceType.Normal)
-if cur_normal != normal1:
- print("ERROR!!! Normal of base plane is incorrect: ", cur_normal, " instead of ", normal1)
- errors += 1
-
-# Base Plane Position
-cur_pos = list(recreated_cutlines.Input.Input.SliceOffsetValues)
-if cur_pos != pos1:
- print("ERROR!!! Position of base plane is incorrect: ", cur_pos, " instead of ", pos1)
- errors += 1
-
-# Base Plane Normal
-cur_normal = list(recreated_cutlines.Input.SliceType.Normal)
-if cur_normal != normal2:
- print("ERROR!!! Normal of cutting planes is incorrect: ", cur_normal, " instead of ", normal2)
- errors += 1
-
-# Cutting Planes Position
-cur_pos = list(recreated_cutlines.Input.SliceOffsetValues)
-if cur_pos != pos2:
- print("ERROR!!! Positions of cutting planes are incorrect: ", cur_pos, " instead of ", pos2)
- errors += 1
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/B0 case
-
-from paravistest import datadir
-from presentations import *
-from pvsimple import *
-from paravistest import save_trace
-from paraview import smtrace
-
-GetActiveViewOrCreate('RenderView')
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-# 1. TimeStamps.med import
-file_path = datadir + "TimeStamps.med"
-OpenDataFile(file_path)
-med_reader = GetActiveSource()
-if med_reader is None :
- raise RuntimeError("TimeStamps.med wasn't imported...")
-
-# 2. Presentations creation
-errors = 0
-prs_names = ["ScalarMap", "IsoSurfaces", "CutPlanes", "CutLines", "DeformedShape", "Vectors", "StreamLines", "Plot3D", "DeformedShapeAndScalarMap", "GaussPoints"]
-prs_list = []
-
-med_field = "vitesse"
-
-for name in prs_names:
- print("Creation of ", name, " presentation...")
- if name == "GaussPoints":
- prs = GaussPointsOnField(med_reader, EntityType.CELL, "pression", 1)
- pass
- else:
- prs = eval(name + "OnField(med_reader, EntityType.NODE, med_field, 1)")
- if prs is None:
- print("ERROR!!! ", name," presentation wasn't created...")
- # StreamLines presentation is empty for "vitesse" field defined in the loaded MED file.
- # TODO: check why stream lines prs is empty
- if name == "StreamLines":
- print("WARNING: Stream lines presentation is empty!")
- else:
- errors += 1
- else:
- RenameSource(name, prs.Input)
- prs_list.append(prs)
-
-# 3. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "AllPresentations.py")
-save_trace( path_to_save, text )
-
-# 4. Delete the created objects, recreate the view
-source_list = list(GetSources().values())
-for source in source_list:
- delete_pv_object(source)
-
-delete_pv_object(GetActiveView())
-view = CreateRenderView()
-
-# 5. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 6. Check the restored objects
-for name in prs_names:
- source = FindSource(name)
- if source is None:
- print("There is no ", name, " in the study (must be created by executed python script)!!!")
- errors += 1
- else:
- print(name + " was found...")
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/B1 case
-
-from paravistest import tablesdir
-from presentations import *
-from pvsimple import *
-
-# Import table from file
-xls_file = tablesdir + "tables_test.xls"
-table_reader = TableReader(FileName=xls_file)
-if table_reader is None:
- raise RuntimeError("Table was not imported...")
-
-table_reader.UpdatePipeline()
-RenameSource("tables_test.xls", table_reader)
-
-# 2. Dump Study
-path_to_save = os.path.join(os.getenv("HOME"), "table.py")
-SaveTrace(path_to_save)
-
-# 3. Delete the created objects
-delete_pv_object(table_reader)
-
-# 4. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 5. Check the restored table
-restored_obj = FindSource("tables_test.xls")
-if restored_obj is None:
- raise RuntimeError("There is no tables_test.xls table in the study (must be created by executed python script)!!!")
-
-available_tables = restored_obj.GetPropertyValue("AvailableTables")
-
-tables = ["Table:0", "Table toto 1", "sinus"]
-errors = 0
-count_not=0
-
-for name in tables:
- if name not in available_tables:
- count_not += 1
- print("ERROR!!! Table with ", name, " name was not found")
- errors += 1
- else:
- print("\"" + name + "\" table was found...")
-
-if count_not > 0:
- print("ERROR!!! "+str(count_not)+" table(s) was(were) not found!!!")
- errors += 1
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
-
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/B3 case
-
-import paravistest
-from presentations import *
-from pvsimple import *
-from paravistest import save_trace
-from paraview import smtrace
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-# 1. Table creation
-title = "My Table"
-errors = 0
-
-table_title = "My Table"
-
-# define script for table creation
-table_script = """
-import math
-
-
-# Get table output
-table = self.GetTableOutput()
-
-# Create first column
-col1 = vtk.vtkDoubleArray()
-col1.SetName('First Column')
-col1.InsertNextValue(1.11)
-col1.InsertNextValue(4.44)
-table.AddColumn(col1)
-
-# Create second column
-col2 = vtk.vtkDoubleArray()
-col2.SetName('Second Column')
-col2.InsertNextValue(2.22)
-col2.InsertNextValue(5.55)
-table.AddColumn(col2)
-
-# Create third column
-col3 = vtk.vtkDoubleArray()
-col3.SetName('Third Column')
-col3.InsertNextValue(3.33)
-col3.InsertNextValue(6.66)
-table.AddColumn(col3)
-"""
-
-# creating programmable source for the table
-table = ProgrammableSource()
-table.OutputDataSetType = 'vtkTable'
-table.Script = table_script
-RenameSource(title, table)
-table.UpdatePipeline()
-
-orig_script = table.Script
-
-# 2. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "table.py")
-save_trace( path_to_save, text )
-
-# 3. Delete the table
-delete_pv_object(table)
-
-# 4. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 5. Check the restored table
-table = FindSource(title)
-if table is None:
- raise RuntimeError("There is no table in the study (must be created by executed python script)!!!")
-
-if table.Script != orig_script:
- print("ERROR!!! The script value is incorrect:")
- print(table.Script)
- errors += 1
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/B4 case
-
-import paravistest
-from presentations import *
-from pvsimple import *
-from paravistest import save_trace
-from paraview import smtrace
-
-config = smtrace.start_trace()
-config.SetFullyTraceSupplementalProxies(True)
-config.SetPropertiesToTraceOnCreate(config.RECORD_ALL_PROPERTIES)
-
-
-# 1. Table creation
-title = "My Table"
-errors = 0
-
-table_title = "My Table"
-
-# define script for table creation
-table_script = """
-import math
-
-
-# Get table output
-table = self.GetTableOutput()
-
-# Create first column
-col1 = vtk.vtkIntArray()
-col1.SetName('First Column')
-col1.InsertNextValue(1)
-col1.InsertNextValue(4)
-table.AddColumn(col1)
-
-# Create second column
-col2 = vtk.vtkDoubleArray()
-col2.SetName('Second Column')
-col2.InsertNextValue(2)
-col2.InsertNextValue(5)
-table.AddColumn(col2)
-
-# Create third column
-col3 = vtk.vtkDoubleArray()
-col3.SetName('Third Column')
-col3.InsertNextValue(3)
-col3.InsertNextValue(6)
-table.AddColumn(col3)
-"""
-
-# creating programmable source for the table
-table = ProgrammableSource()
-table.OutputDataSetType = 'vtkTable'
-table.Script = table_script
-RenameSource(title, table)
-table.UpdatePipeline()
-
-orig_script = table.Script
-
-# 2. Dump Study
-text = smtrace.stop_trace()
-path_to_save = os.path.join(os.getenv("HOME"), "table.py")
-save_trace( path_to_save, text )
-
-# 3. Delete the table
-delete_pv_object(table)
-
-# 4. Execution of the created script
-exec(compile(open(path_to_save).read(), path_to_save, 'exec'))
-
-# 5. Check the restored table
-table = FindSource(title)
-if table is None:
- raise RuntimeError("There is no table in the study (must be created by executed python script)!!!")
-
-if table.Script != orig_script:
- print("ERROR!!! The script value is incorrect:")
- print(table.Script)
- errors += 1
-
-if errors > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/dump_study/B5 case
-
-import os
-import sys
-import salome
-
-# class SalomeSession(object):
-# def __init__(self):
-# import runSalome
-# import sys
-# sys.argv += ["--show-desktop=1"]
-# sys.argv += ["--splash=0"]
-# sys.argv += ["--modules=MED,VISU,PARAVIS"]
-# clt, d = runSalome.main()
-# port = d['port']
-# self.port = port
-# return
-# pass
-
-
-# 1. Opening saved study
-
-# run Salome
-#salome_session = SalomeSession()
-salome.salome_init()
-
-file_name = os.path.join(os.path.dirname(sys.argv[0]), "test1.hdf")
-salome.myStudy.Open(file_name)
-
-# 3. Find IsoSurfaces
-from pvsimple import *
-import presentations
-obj = FindSource('IsoSurfaces')
-if obj is None:
- print("FAILED: can't find IsoSurfaces!!!")
-
-# 4. Remove med reader object and all other sources
-for obj in list(GetSources().values()):
- presentations.delete_pv_object(obj)
-
-# 5. Check results
-obj = FindSource('ScalarMap')
-if obj is not None:
- print("FAILED: ScalarMap was not deleted!!!")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME DUMPSTUDY_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/dump_study)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" DUMPSTUDY BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" DUMPSTUDY EXTRA)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A0 B0)
-
-SET(EXTRA_TESTS A1 A2 A3 A4 A5 A6 A7 A8 A9 B3 B4 B5)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/imps/A1 case
-
-import sys
-import os
-from paravistest import datadir, pictureext, get_picture_dir
-from presentations import *
-import pvsimple
-
-picturedir = get_picture_dir("imps/A1")
-
-def set_prs_colored(prs, proxy, entity, field_name, vector_mode, timestamp_nb):
- # Get time value
- time_value = get_time(proxy, timestamp_nb)
-
- # Check vector mode
- nb_components = get_nb_components(proxy, entity, field_name)
- check_vector_mode(vector_mode, nb_components)
-
- # Get lookup table
- lookup_table = get_lookup_table(field_name, nb_components, vector_mode)
-
- # Set field range
- data_range = get_data_range(proxy, entity,
- field_name, vector_mode)
- if hasattr(lookup_table,"LockDataRange"):
- lookup_table.LockDataRange = 1
- elif hasattr(lookup_table,"LockScalarRange"):
- lookup_table.LockScalarRange = 1
- else:
- raise RuntimeError("Object %s has no 'LockDataRange' or 'LockScalarRange' attribute!"%(lookup_table))
- lookup_table.RGBPoints = [data_range[0], 0, 0, 1, data_range[1], 1, 0, 0]
-
- # Set properties
- prs.ColorArrayName = (EntityType.get_pvtype(entity), field_name)
- prs.LookupTable = lookup_table
-
- # Add scalar bar
- add_scalar_bar(field_name, nb_components,
- vector_mode, lookup_table, time_value)
-
-
-# 1. Import of the "Penta6.med" file
-print('Import "Penta6.med" file........', end=' ')
-file_path = datadir + "Penta6.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-if med_reader is None:
- raise RuntimeError("Penta6.med was not imported!!!")
-else:
- print("OK")
-
-view = pvsimple.GetRenderView()
-
-# 2. Creation of "CutPlanes" presentation, based on time stamp of "scalar field" field
-print('Creation of "CutPlanes" presentation, based on time stamp of "scalar field" field....')
-cutplanes = CutPlanesOnField(med_reader, EntityType.CELL, "scalar field", 1)
-if cutplanes is None :
- raise RuntimeError("Presentation is None!!!")
-else:
- print("OK")
-
-select_cells_with_data(med_reader, on_cells=["scalar field", "vectoriel field"])
-
-print("Setting of deformation:")
-warp_vector = pvsimple.WarpByVector(cutplanes.Input)
-warp_vector.Vectors = ["scalar field"]
-warp_vector.ScaleFactor = 5.0
-
-print("Got scale : ", warp_vector.ScaleFactor)
-print("Got field name: ", warp_vector.Vectors)
-
-presentation = pvsimple.GetRepresentation(warp_vector)
-set_prs_colored(presentation, med_reader, EntityType.CELL, "scalar field", 'Magnitude', 1)
-
-pic_path = os.path.join(picturedir, "deformed_cut_planes_scalar" + "." + pictureext)
-process_prs_for_test(presentation, view, pic_path)
-
-# 3. Creation of "CutPlanes" presentation, based on time stamp of "vectoriel field" field
-print('Creation of "CutPlanes" presentation, based on time stamp of "vectoriel field" field....')
-cutplanes = CutPlanesOnField(med_reader, EntityType.CELL, "vectoriel field", 1)
-
-if cutplanes is None :
- raise RuntimeError("Presentation is None!!!")
-else:
- print("OK")
-
-print("Setting of deformation:")
-warp_vector = pvsimple.WarpByVector(cutplanes.Input)
-warp_vector.Vectors = ["vectoriel field"]
-warp_vector.ScaleFactor = 5.0
-
-print("Got scale : ", warp_vector.ScaleFactor)
-print("Got field name: ", warp_vector.Vectors)
-
-presentation = pvsimple.GetRepresentation(warp_vector)
-set_prs_colored(presentation, med_reader, EntityType.CELL, "vectoriel field", 'Magnitude', 1)
-
-pic_path = os.path.join(picturedir, "deformed_cut_planes_vectorial" + "." + pictureext)
-process_prs_for_test(presentation, view, pic_path)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/imps/A2 case
-
-import time
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-sleep_delay = 2
-
-med_file = "pointe.med"
-entity = EntityType.NODE
-field_name = "fieldnodedouble";
-timestamp = 1
-
-# 1. Import MED file
-print('Import "pointe.med"....................', end=' ')
-med_file_path = datadir + med_file
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-# 2. Create Scalar Map
-print("Build Scalar Map presentation")
-scalar_map = ScalarMapOnField(med_reader, entity, field_name, timestamp)
-
-display_only(scalar_map)
-reset_view()
-time.sleep(sleep_delay)
-
-# 3. Set representation type to Point
-print("Set representation type to Point")
-scalar_map.Representation = 'Points'
-pvsimple.Render()
-time.sleep(sleep_delay)
-
-# 4. Set representation type to Point Sprite
-print("Set Point Sprite representation")
-scalar_map.Representation = 'Point Sprite'
-
-data_range = get_data_range(med_reader, entity,
- field_name, 'Magnitude')
-mult = abs(0.1 / data_range[1])
-scalar_map.RadiusScalarRange = data_range
-scalar_map.RadiusTransferFunctionEnabled = 1
-scalar_map.RadiusMode = 'Scalar'
-scalar_map.RadiusArray = ['POINTS', field_name]
-scalar_map.RadiusTransferFunctionMode = 'Table'
-scalar_map.RadiusScalarRange = data_range
-scalar_map.RadiusUseScalarRange = 1
-scalar_map.RadiusIsProportional = 1
-scalar_map.RadiusProportionalFactor = mult
-
-pvsimple.Render()
-time.sleep(sleep_delay)
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/imps/A3 case
-
-from paravistest import datadir, compare_lists
-from presentations import *
-import pvsimple
-
-error = 0
-
-# Import MED file
-file_path = datadir + "fra.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("Error!!! med file is not imported")
- error = error+1
-
-# Create Scalar Map
-scalarmap = ScalarMapOnField(med_reader, EntityType.NODE, 'TAUX_DE_VIDE', 1);
-if scalarmap is None:
- print("Error!!! ScalarMap is not created")
- error = error+1
-display_only(scalarmap)
-
-# Check Scalar bar default properties
-bar = get_bar()
-if bar.Orientation != 'Vertical':
- print("Error!!! Default Scalar Bar Orientation is wrong - not vertical but ", scalarmap.Orientation)
- error = error+1
-
-error = error + compare_lists(bar.Position, [0.85, 0.05])
-#error = error + compare_lists(bar.Position2, [0.12, 0.43])
-
-if error > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/imps/A4 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-error = 0
-
-# Import MED file
-med_file_path = datadir + "fra.med"
-pvsimple.OpenDataFile(med_file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("Error!!! med file is not imported")
- error = error+1
-
-# Create Mesh
-mesh_name = 'LE VOLUME'
-cell_entity = EntityType.CELL
-mesh = MeshOnEntity(med_reader, mesh_name, cell_entity)
-if mesh is None:
- print("Error!!! Mesh is not created")
- error = error+1
-
-mesh.Visibility = 1
-reset_view()
-
-# Use shrink filter
-mesh_shrinked = pvsimple.Shrink(med_reader)
-mesh_shrinked.ShrinkFactor = 0.75
-mesh_shrinked = pvsimple.GetRepresentation(mesh_shrinked)
-
-if mesh_shrinked is None:
- print("Error!!! Mesh is not shrinked")
- error = error+1
-
-# Create Scalar Map
-scalarmap = ScalarMapOnField(med_reader, EntityType.NODE, 'TAUX_DE_VIDE', 1);
-if scalarmap is None:
- print("Error!!! ScalarMap is not created")
- error = error+1
-display_only(scalarmap)
-
-if error > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/imps/A6 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-error =0
-
-# Import MED file
-file_path = datadir + "Bug891_Box.resu.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("Error!!! med file is not imported")
- error = error+1
-
-# Create Scalar Map
-scalarmap = ScalarMapOnField(med_reader, EntityType.NODE, 'RESUMECAEQUI_ELGA_SIGM__________', 1)
-if scalarmap is None:
- print("Error!!! ScalarMap is not created")
- error = error+1
-
-scalarmap.Visibility = 1
-reset_view()
-
-if error > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/imps/A9 case
-
-from time import sleep
-
-from paravistest import tablesdir
-from presentations import *
-import pvsimple
-
-# Import CSV table
-file_path = tablesdir + "testCsvTable.csv"
-table = pvsimple.CSVReader(FileName=file_path)
-
-# Show
-view = pvsimple.CreateXYPlotView()
-
-xy_rep = pvsimple.Show(table)
-xy_rep.AttributeType = 'Row Data'
-xy_rep.UseIndexForXAxis = 0
-xy_rep.XArrayName = 'x'
-xy_rep.SeriesVisibility = ['x', '0']
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/imps/B1 case
-
-from paravistest import datadir, texturesdir
-from presentations import *
-import pvsimple
-
-# Import MED file
-file_path = datadir + "fra.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-entity = EntityType.NODE
-field_name = "VITESSE"
-timestamp_id = 1
-
-# Create Scalar Map
-scalarmap = ScalarMapOnField(med_reader, entity, field_name, timestamp_id)
-
-scalarmap.Visibility = 1
-reset_view()
-
-# Set representation type to Point Sprite
-scalarmap.Representation = 'Point Sprite'
-
-# Set texture
-scalarmap.RenderMode = 'Texture'
-# COMMENTED OUT! Currently this does not work as Point Sprite ParaView plugin is not correctly wrapped to Python.
-# As soon as problem is fixed, below code probably need to be modified, but it should be something similar.
-#import vtk
-#texture = vtk.vtkTexture()
-#pngReader = vtk.vtkPNGReader()
-#pngReader.SetFileName(os.path.join(texturesdir, "texture1.png"))
-#texture.SetInputConnection(pngReader.GetOutputPort())
-#texture.InterpolateOn()
-#scalarmap.Texture = texture
-
-pvsimple.Render()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/imps/B2 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-# 1. Import MED file
-print('Import "ResOK_0000.med"...............', end=' ')
-
-file_path = datadir + "ResOK_0000.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- raise RuntimeError("import failed")
-else:
- print("OK")
-
-
-def _extract_all_arrays_of_type(array_type, source):
- import re
- #sep = source.GetProperty("Separator").GetData() # "@@][@@"
- arrays = source.AllArrays
- result = []
- for arr in arrays:
- match = re.search("ComSup[^/]*/(.*)@@\]\[@@(.*)", arr)
- field_name = match.group(1)
- arr_typ = match.group(2)
- if arr_typ == array_type:
- result += [field_name]
- pass
- return result
-#
-
-def _extract_cell_arrays(source):
- return _extract_all_arrays_of_type("P0", source)
-#
-def _extract_point_arrays(source):
- return _extract_all_arrays_of_type("P1", source)
-#
-
-# 2. Get some information on the MED file
-#fields_on_nodes = med_reader.PointArrays
-fields_on_nodes = _extract_point_arrays(med_reader)
-print("Field names on NODE: ", fields_on_nodes)
-is_ok = len(fields_on_nodes) == 2 and ("temperature" in fields_on_nodes) and ("vitesse" in fields_on_nodes)
-if not is_ok:
- raise RuntimeError("=> Error in PointArrays property")
-
-#fields_on_cells = med_reader.CellArrays
-fields_on_cells = _extract_cell_arrays(med_reader)
-print("Field names on CELL: ", fields_on_cells)
-is_ok = len(fields_on_cells) == 1 and ("pression" in fields_on_cells)
-if not is_ok:
- raise RuntimeError("=> Error in CellArrays property")
-
-timestamps = med_reader.TimestepValues.GetData()[1:]
-print("timestamps: ", timestamps)
-if timestamps != [17.030882013694594]:
- raise RuntimeError("=> Wrong TimestepValues property value")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME IMPS_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/imps)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" IMPS BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" IMPS EXTRA)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A1 B1)
-
-SET(EXTRA_TESTS A2 A3 A4 A6 A9 B2)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/united/A1 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-# 1. Import MED file
-print("**** Step1: Import MED file")
-
-print('Import "ResOK_0000.med"...', end=' ')
-file_path = datadir + "ResOK_0000.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-print('Get view...................', end=' ')
-view = pvsimple.GetRenderView()
-if view is None:
- print("FAILED")
-else:
- reset_view(view)
- print("OK")
-
-cell_entity = EntityType.CELL
-node_entity = EntityType.NODE
-
-# 2. Displaying vector field
-print("**** Step2: Displaying vector field")
-
-print("Creating Scalar Map.......", end=' ')
-scalarmap = ScalarMapOnField(med_reader, node_entity, 'vitesse', 1)
-if scalarmap is None:
- print("FAILED")
-else:
- bar = get_bar()
- bar.Orientation = 'Horizontal'
- bar.Position = [0.1, 0.1]
-# bar.Position2 = [0.1, 0.25]
- bar.AspectRatio = 3
-
- display_only(scalarmap, view)
- print("OK")
-
-reset_view(view)
-
-print("Creating Stream Lines.....", end=' ')
-streamlines = StreamLinesOnField(med_reader, node_entity, 'vitesse', 1)
-if streamlines is None:
- print("FAILED")
-else:
- display_only(streamlines, view)
- print("OK")
-
-print("Creating Vectors..........", end=' ')
-vectors = VectorsOnField(med_reader, node_entity, 'vitesse', 1)
-if vectors is None:
- print("FAILED")
-else:
- display_only(vectors, view)
- print("OK")
-
-print("Creating Iso Surfaces.....", end=' ')
-isosurfaces = IsoSurfacesOnField(med_reader, node_entity, 'vitesse', 1)
-contour_filter = pvsimple.GetActiveSource()
-if isosurfaces is None:
- print("FAILED")
-else:
- display_only(isosurfaces, view)
- print("OK")
-
-print("Creating Cut Planes.......", end=' ')
-cutplanes = CutPlanesOnField(med_reader, node_entity, 'vitesse', 1,
- nb_planes=30, orientation=Orientation.YZ)
-if cutplanes is None:
- print("FAILED")
-else:
- display_only(cutplanes, view)
- print("OK")
-
-# 3. Another MED file import
-print("**** Step3: Import another MED file")
-
-print('Import "Fields_group3D.med"...............', end=' ')
-file_path = datadir + "Fields_group3D.med"
-pvsimple.OpenDataFile(file_path)
-med_reader1 = pvsimple.GetActiveSource()
-
-if med_reader1 is None:
- print("FAILED")
-else:
- print("OK")
-
-# 4. Displaying scalar field
-print("**** Step4: Displaying scalar field")
-
-print("Creating Scalar Map.......", end=' ')
-scalarmap1 = ScalarMapOnField(med_reader1, cell_entity, 'scalar field', 1)
-if scalarmap1 is None:
- print("FAILED")
-else:
- display_only(scalarmap1, view)
- print("OK")
-
-reset_view(view)
-
-print("Creating Iso Surfaces.....", end=' ')
-isosurfaces1 = IsoSurfacesOnField(med_reader1, cell_entity, 'scalar field', 1)
-if isosurfaces1 is None:
- print("FAILED")
-else:
- display_only(isosurfaces1, view)
- print("OK")
-
-print("Creating Cut Planes.......", end=' ')
-cutplanes1 = CutPlanesOnField(med_reader1, cell_entity, 'scalar field', 1,
- orientation=Orientation.YZ)
-if cutplanes1 is None:
- print("FAILED")
-else:
- slice_filter = pvsimple.GetActiveSource()
- slice_filter.SliceType.Normal = [1.0, 0.0, 0.0]
- display_only(cutplanes1, view)
- print("OK")
-
-# 5. Object browser popup
-
-print("**** Step5: Object browser popup")
-
-mesh_name = 'mailles_MED'
-
-print("Creating mesh.............", end=' ')
-mesh = MeshOnEntity(med_reader1, mesh_name, cell_entity)
-if mesh is None:
- print("FAILED")
-else:
- display_only(mesh, view)
- print("OK")
-
-print("Changing type of presentation of mesh:")
-mesh.Representation = 'Wireframe'
-pvsimple.Render()
-prs_type = mesh.Representation
-print("Presentation type..", prs_type)
-
-mesh.Representation = 'Points'
-pvsimple.Render()
-prs_type = mesh.Representation
-print("Presentation type..", prs_type)
-
-mesh.Representation = 'Surface'
-pvsimple.Render()
-prs_type = mesh.Representation
-print("Presentation type..", prs_type)
-
-shrink = pvsimple.Shrink(med_reader1)
-mesh_shrinked = pvsimple.GetRepresentation(shrink)
-display_only(mesh_shrinked, view)
-
-print("Changing color of mesh....", end=' ')
-color = [0, 0, 1]
-mesh.DiffuseColor = color
-display_only(mesh, view)
-print("OK")
-
-print("Changing first IsoSurfaces", end=' ')
-display_only(isosurfaces, view)
-reset_view(view)
-rgb_points = isosurfaces.LookupTable.RGBPoints
-scalar_range = [rgb_points[0], rgb_points[4]]
-surfaces = get_contours(scalar_range, 25)
-contour_filter.Isosurfaces = surfaces
-pvsimple.Render(view=view)
-print("OK")
-
-print("Hide IsoSurfaces..........", end=' ')
-isosurfaces.Visibility = 0
-pvsimple.Render(view=view)
-print("OK")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/united/A2 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-from math import radians
-
-cell_entity = EntityType.CELL
-node_entity = EntityType.NODE
-
-# 1. Import MED file
-print("**** Step1: Import MED file")
-
-print('Import "fra.med"....................', end=' ')
-file_path = datadir + "fra.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-view = pvsimple.GetRenderView()
-
-field_name = 'VITESSE'
-print("Creating Cut Planes.................", end=' ')
-orient = Orientation.YZ
-cutplanes = CutPlanesOnField(med_reader, node_entity, field_name, 1, orientation=orient)
-if cutplanes is None:
- print("FAILED")
-else:
- display_only(cutplanes, view)
- print("OK")
-
-slice_filter = pvsimple.GetActiveSource()
-
-# 2. Changing view
-print("**** Step2: Changing view")
-
-print("Fit All.............................", end=' ')
-reset_view(view)
-print("OK")
-
-print("Rotate..............................", end=' ')
-x_angle = 0
-y_angle = 0
-
-nb_planes = len(slice_filter.SliceOffsetValues)
-
-for i in range(1, 50):
- y_angle = y_angle + 0.05
- normal = get_normal_by_orientation(orient, x_angle, radians(y_angle))
- slice_filter.SliceType.Normal = normal
- pvsimple.Render()
-
-for i in range(1,50):
- y_angle = y_angle - 0.05
- normal = get_normal_by_orientation(orient, x_angle, radians(y_angle))
- slice_filter.SliceType.Normal = normal
- pvsimple.Render()
-
-print("OK")
-
-print("View Point (FRONT)..................", end=' ')
-view.CameraViewUp = [0.0, 0.0, 1.0]
-view.CameraPosition = [2.4453961849843453, 0.03425, 0.541]
-pvsimple.Render()
-print("OK")
-
-print("View Point (BACK)...................", end=' ')
-view.CameraPosition = [-2.0343961849843457, 0.03425, 0.541]
-pvsimple.Render()
-print("OK")
-
-print("View Point (TOP)....................", end=' ')
-view.CameraViewUp = [0.0, 1.0, 0.0]
-view.CameraPosition = [0.2055, 0.03425, 2.7808961849843454]
-pvsimple.Render()
-print("OK")
-
-print("View Point (BOTTOM).................", end=' ')
-view.CameraPosition = [0.2055, 0.03425, -1.6988961849843456]
-pvsimple.Render()
-print("OK")
-
-print("View Point (LEFT)...................", end=' ')
-view.CameraViewUp = [0.0, 0.0, 1.0]
-view.CameraPosition = [0.2055, -2.2056461849843454, 0.541]
-pvsimple.Render()
-print("OK")
-
-print("View Point (RIGHT) .................", end=' ')
-view.CameraPosition = [0.2055, 2.2741461849843456, 0.541]
-pvsimple.Render()
-print("OK")
-
-print("Restore View........................", end=' ')
-reset_view(view)
-print("OK")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/united/A4 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-cell_entity = EntityType.CELL
-node_entity = EntityType.NODE
-
-# 1. Import MED file
-print("**** Step1: Import MED file")
-
-print('Import "Hexa8.med"....................', end=' ')
-file_path = datadir + "Hexa8.med"
-pvsimple.OpenDataFile(file_path)
-med_reader1 = pvsimple.GetActiveSource()
-
-if med_reader1 is None:
- print("FAILED")
-else:
- print("OK")
-
-mesh_name1 = 'Maillage MED_HEXA8'
-scalar_field = 'scalar field'
-vectoriel_field = 'vectoriel field'
-view = pvsimple.GetRenderView()
-
-print("Creating Scalar Map...................", end=' ')
-scalarmap1 = ScalarMapOnField(med_reader1, cell_entity, scalar_field, 1)
-if scalarmap1 is None:
- print("FAILED")
-else:
- display_only(scalarmap1, view)
- reset_view(view)
- print("OK")
-
-print("Creating Vectors......................", end=' ')
-vectors1 = VectorsOnField(med_reader1, cell_entity, vectoriel_field, 1)
-if vectors1 is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating Deformed Shape...............", end=' ')
-defshape1 = DeformedShapeOnField(med_reader1, cell_entity, vectoriel_field, 1)
-if defshape1 is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating mesh.........................", end=' ')
-mesh1 = MeshOnEntity(med_reader1, mesh_name1, cell_entity)
-if mesh1 is None:
- print("FAILED")
-else:
- mesh1.Representation = 'Wireframe'
- display_only(mesh1, view)
- reset_view(view)
- print("OK")
-
-print("Displaying vectors....................", end=' ')
-display_only(vectors1, view)
-print("OK")
-
-print("Displaying Deformed Shape.............", end=' ')
-display_only(defshape1, view)
-print("OK")
-
-print("Set scale factor of Deformed Shape...", end=' ')
-warp_vector = defshape1.Input
-warp_vector.ScaleFactor = 10
-print("OK")
-
-print("Displaying changed Deformed Shape.....", end=' ')
-display_only(defshape1, view)
-print("OK")
-
-print("Editing Vectors.......................", end=' ')
-glyph = vectors1.Input
-glyph.ScaleFactor = 2
-vectors1.LineWidth = 2
-glyph.GlyphType.Center = [0.5, 0.0, 0.0] # TAIL position
-print("OK")
-
-print("Displaying changed Vectors............", end=' ')
-vectors1.Visibility = 1
-pvsimple.Render()
-print("OK")
-
-hide_all(view)
-
-# 2. Second MED file import
-
-print('Importing file "cube_hexa8_quad4.med".', end=' ')
-file_path = datadir + "cube_hexa8_quad4.med"
-mesh_name2 = 'CUBE_EN_HEXA8_QUAD4'
-pvsimple.OpenDataFile(file_path)
-med_reader2 = pvsimple.GetActiveSource()
-
-if med_reader2 is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating mesh.........................", end=' ')
-mesh2 = MeshOnEntity(med_reader2, mesh_name2, cell_entity)
-if mesh2 is None:
- print("FAILED")
-else:
- display_only(mesh2, view)
- print("OK")
-
-print("Setting wireframe repr. of mesh.......", end=' ')
-mesh2.Representation = 'Wireframe'
-print("OK")
-
-print("Creating Vectors......................", end=' ')
-vectors2 = VectorsOnField(med_reader2, cell_entity, "fieldcelldouble", 1)
-if vectors1 is None:
- print("FAILED")
-else:
- glyph2 = vectors2.Input
- glyph2.ScaleFactor = 0.2
- vectors2.LineWidth = 2
- glyph2.GlyphType.Center = [0.5, 0.0, 0.0] # TAIL position
- print("OK")
-
-
-
-print("Displaying Vectors (with mesh)........", end=' ')
-vectors2.Visibility = 1
-pvsimple.Render()
-print("OK")
-
-hide_all(view)
-
-# 3. Third MED file import
-
-print('Importing file "Penta6.med"...........', end=' ')
-file_path = datadir + "Penta6.med"
-pvsimple.OpenDataFile(file_path)
-med_reader3 = pvsimple.GetActiveSource()
-
-if med_reader3 is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating Cut Planes...................", end=' ')
-cutplanes1 = CutPlanesOnField(med_reader3, cell_entity, scalar_field, 1)
-if cutplanes1 is None:
- print("FAILED")
-else:
- display_only(cutplanes1, view)
- reset_view(view)
- print("OK")
-
-print("Creating Deformed Shape...............", end=' ')
-defshape2 = DeformedShapeOnField(med_reader3, cell_entity, vectoriel_field, 1)
-if defshape2 is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating Vectors......................", end=' ')
-vectors3 = VectorsOnField(med_reader3, cell_entity, vectoriel_field, 1)
-if vectors3 is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating Iso Surfaces.....", end=' ')
-isosurfaces1 = IsoSurfacesOnField(med_reader3, cell_entity, vectoriel_field, 1)
-if isosurfaces1 is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Displaying Vectors (l.w.=2, s.f.=1.5).", end=' ')
-glyph3 = vectors3.Input
-glyph3.ScaleFactor = 1.5
-vectors3.LineWidth = 2
-display_only(vectors3, view)
-print("OK")
-
-print("Displaying Deformed Shape.............", end=' ')
-defshape2.Visibility = 1
-pvsimple.Render()
-print("OK")
-
-print("Displaying Iso Surfaces...............", end=' ')
-isosurfaces1.Visibility = 1
-pvsimple.Render()
-print("OK")
-
-hide_all(view)
-
-# 4. Import Quad4,Tetra4 and Tria3 MED files
-
-print('Importing "Quad4.med".................', end=' ')
-file_path = datadir + "Quad4.med"
-pvsimple.OpenDataFile(file_path)
-med_reader4 = pvsimple.GetActiveSource()
-
-if med_reader4 is None:
- print("FAILED")
-else:
- print("OK")
-
-mesh_name4 = 'Maillage MED_QUAD4'
-
-print("Creating Iso Surfaces.................", end=' ')
-isosurfaces2 = IsoSurfacesOnField(med_reader4, cell_entity, scalar_field, 1)
-if isosurfaces2 is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating Cut Planes...................", end=' ')
-cutplanes2 = CutPlanesOnField(med_reader4, cell_entity, scalar_field, 1,
- orientation=Orientation.YZ)
-if cutplanes2 is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating Deformed Shape...............", end=' ')
-defshape3 = DeformedShapeOnField(med_reader4, cell_entity, vectoriel_field, 1, scale_factor=10)
-if defshape3 is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating Vectors......................", end=' ')
-vectors4 = VectorsOnField(med_reader4, cell_entity, vectoriel_field, 1)
-if vectors4 is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Displaying Iso Surfaces, Def. Shape and Vectors.", end=' ')
-display_only(isosurfaces2, view)
-defshape3.Visibility = 1
-vectors4.Visibility = 1
-pvsimple.Render()
-print("OK")
-
-print('Importing "Tetra4.med"................', end=' ')
-file_path = datadir + "Tetra4.med"
-pvsimple.OpenDataFile(file_path)
-med_reader5 = pvsimple.GetActiveSource()
-
-if med_reader5 is None:
- print("FAILED")
-else:
- print("OK")
-
-mesh_name5 = 'Maillage MED_TETRA4'
-
-print("Creating Scalar Map...................", end=' ')
-scalarmap2 = ScalarMapOnField(med_reader5, cell_entity, scalar_field, 1)
-if scalarmap2 is None:
- print("FAILED")
-else:
- print("OK")
-
-print("Creating Vectors......................", end=' ')
-vectors5 = VectorsOnField(med_reader5, cell_entity, vectoriel_field, 1)
-if vectors5 is None:
- print("FAILED")
-else:
- print("OK")
-
-vectors5.LineWidth = 3
-vectors5.Input.ScaleFactor = 2
-
-print("Displaying Scalar Map and Vectoes.....", end=' ')
-hide_all(view)
-display_only(scalarmap2, view)
-vectors5.Visibility = 1
-reset_view(view)
-print("OK")
-
-print('Importing "Tria3.med".................', end=' ')
-file_path = datadir + "Tria3.med"
-pvsimple.OpenDataFile(file_path)
-med_reader6 = pvsimple.GetActiveSource()
-
-if med_reader6 is None:
- print("FAILED")
-else:
- print("OK")
-
-mesh_name6 = 'Maillage MED_TRIA3'
-
-print("Creating Scalar Map...................", end=' ')
-scalarmap3 = ScalarMapOnField(med_reader6, cell_entity, scalar_field, 1)
-if scalarmap3 is None:
- print("FAILED")
-else:
- display_only(scalarmap3, view)
- print("OK")
-
-reset_view(view)
-
-print("Creating Iso Surfaces.................", end=' ')
-isosurfaces3 = IsoSurfacesOnField(med_reader6, cell_entity, scalar_field, 1)
-if isosurfaces3 is None:
- print("FAILED")
-else:
- display_only(isosurfaces3, view)
- print("OK")
-
-reset_view(view)
-
-print("Creating Deformed Shape...............", end=' ')
-defshape4 = DeformedShapeOnField(med_reader6, cell_entity, vectoriel_field, 1)
-if defshape4 is None:
- print("FAILED")
-else:
- display_only(defshape4, view)
- print("OK")
-
-reset_view(view)
-
-print("Creating Vectors......................", end=' ')
-vectors6 = VectorsOnField(med_reader6, cell_entity, vectoriel_field, 1)
-if vectors6 is None:
- print("FAILED")
-else:
- glyph = vectors6.Input
- glyph.GlyphType.Center = [0.5, 0.0, 0.0] # TAIL position
- vectors6.LineWidth = 2
- glyph.ScaleFactor = 1
- display_only(vectors6, view)
- print("OK")
-
-reset_view(view)
-
-print("Displaying only Def. Shape and Vectors", end=' ')
-display_only(defshape4, view)
-vectors6.Visibility = 1
-pvsimple.Render()
-print("OK")
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/united/A5 case
-
-from paravistest import datadir
-from presentations import *
-import pvsimple
-
-cell_entity = EntityType.CELL
-node_entity = EntityType.NODE
-
-# 1. Import MED file
-print("**** Step1: Import MED file")
-
-print('Import "ResOK_0000.med"...............', end=' ')
-file_path = datadir + "ResOK_0000.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-mesh_name = 'dom'
-
-# 2. Creating mesh
-print("**** Step2: Mesh creation")
-
-print("Creating mesh.............", end=' ')
-mesh = MeshOnEntity(med_reader, mesh_name, cell_entity)
-if mesh is None:
- print("FAILED")
-else:
- print("OK")
-
-# 3. Changing type of presentation of mesh
-print("**** Step3: Changing type of presentation of mesh")
-
-view = pvsimple.GetRenderView()
-display_only(mesh, view)
-reset_view(view)
-
-mesh.Representation = 'Wireframe'
-pvsimple.Render()
-prs_type = mesh.Representation
-print("Presentation type..", prs_type)
-
-mesh.Representation = 'Points'
-pvsimple.Render()
-prs_type = mesh.Representation
-print("Presentation type..", prs_type)
-
-# make shrink, in PARAVIS it's not a representation type: use shrink filter
-shrink = pvsimple.Shrink(med_reader)
-mesh_shrinked = pvsimple.GetRepresentation(shrink)
-display_only(mesh_shrinked, view)
-
-display_only(mesh, view)
-mesh.Representation = 'Surface With Edges'
-pvsimple.Render()
-prs_type = mesh.Representation
-print("Presentation type..", prs_type)
-
-# 4. Changing Cell color of mesh
-print("**** Step4: Changing Cell color of mesh")
-
-color = mesh.DiffuseColor
-print("Mesh Cell color in RGB....(", color[0], ",", color[1], ",", color[2], ")")
-
-color = [0, 0, 1]
-mesh.DiffuseColor = color
-color = mesh.DiffuseColor
-print("Mesh Cell color in RGB....(", color[0], ",", color[1], ",", color[2], ")")
-pvsimple.Render()
-
-# 5. Changing Node color of mesh
-print("**** Step4: Changing Node color of mesh")
-
-color = mesh.AmbientColor
-print("Mesh Node color in RGB....(", color[0], ",", color[1], ",", color[2], ")")
-
-color = [0, 1, 0]
-mesh.AmbientColor = color
-color = mesh.AmbientColor
-print("Mesh Node color in RGB....(", color[0], ",", color[1], ",", color[2], ")")
-pvsimple.Render()
-
-## Note: no special property for edge color in PARAVIS; skip link color changing ( SetLinkColor()/GetLinkColor() methods )
+++ /dev/null
-# Copyright (C) 2010-2016 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 case corresponds to: /visu/united1/B0 case
-
-from paravistest import datadir, compare_lists
-from presentations import *
-import pvsimple
-
-error=0
-
-# 1. Import MED file
-file_path = datadir + "TimeStamps.med"
-pvsimple.OpenDataFile(file_path)
-med_reader = pvsimple.GetActiveSource()
-
-if med_reader is None:
- print("FAILED")
-else:
- print("OK")
-
-# 2. Create scalar map on deformed shape
-smondefshape = DeformedShapeAndScalarMapOnField(med_reader, EntityType.NODE, 'vitesse', 1)
-if smondefshape is None:
- print("FAILED")
-else:
- print("OK")
-
-# 3. Make compare
-
-# Offset
-smondefshape.Position = [0, 0, 0]
-error = error + compare_lists(smondefshape.Position, [0,0,0])
-
-# Scalar mode
-smondefshape.LookupTable.VectorMode = 'Magnitude'
-if smondefshape.LookupTable.VectorMode != 'Magnitude':
- print("ScalarMode is wrong...")
- error=error+1
-
-# Scalar bar Position
-bar = get_bar()
-bar.Position = [0.01, 0.01]
-error = error + compare_lists(bar.Position, [0.01, 0.01])
-
-# Scalar bar size
-#bar.Position2 = [0.05, 0.5]
-#error = error + compare_lists(bar.Position2, [0.05, 0.5])
-
-# Number of colors and labels
-smondefshape.LookupTable.NumberOfTableValues = 4
-#bar.NumberOfLabels = 5
-
-nb_colors = smondefshape.LookupTable.NumberOfTableValues
-#nb_labels = bar.NumberOfLabels
-#error = error + compare_lists([nb_colors, nb_labels], [4, 5])
-error = error + compare_lists([nb_colors], [4])
-
-# Title
-bar.Title = 'Pression, Pa'
-bar.ComponentTitle = "Comp."
-
-if bar.Title != 'Pression, Pa':
- print("Title is wrong...")
- error=error+1
-
-if bar.ComponentTitle!= 'Comp.':
- print("Component title is wrong...")
- error=error+1
-
-# Scaling
-smondefshape.LookupTable.UseLogScale = 0
-if smondefshape.LookupTable.UseLogScale != 0:
- print("Error!!! Scaling is wrong")
- error=error+1
-
-# Bar orientation
-bar.Orientation = 'Horizontal'
-if bar.Orientation != 'Horizontal':
- print("ERROR!!! Scalar Bar orientation is wrong...")
- error=error+1
-
-# Scale factor
-smondefshape.Input.ScaleFactor = 0.15
-error = error + compare_lists([smondefshape.Input.ScaleFactor], [0.15])
-
-
-if error > 0:
- raise RuntimeError("There is(are) some error(s) was(were) found... For more info see ERRORs above...")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-INCLUDE(tests.set)
-
-# For make test
-FOREACH(tfile ${TEST_NAMES})
- SET(TEST_NAME UNITED_${tfile})
- ADD_TEST(${TEST_NAME} ${PYTHON_EXECUTABLE} ${SALOME_TEST_DRIVER} ${TIMEOUT}
- ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT ${TIMEOUT})
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
-
-# For salome test
-SET(APPLICATION_TESTS ${ALL_TESTS})
-SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/VisuPrs/united)
-
-FOREACH(tfile ${APPLICATION_TESTS})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
- DESTINATION ${TEST_INSTALL_DIRECTORY})
-ENDFOREACH()
-
-INSTALL(FILES CTestTestfileInstall.cmake
- DESTINATION ${TEST_INSTALL_DIRECTORY}
- RENAME CTestTestfile.cmake)
-INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY})
+++ /dev/null
-# Copyright (C) 2015-2016 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
-#
-
-INCLUDE(tests.set)
-
-DEFINE_PARAVIS_TEST("${BASE_TESTS}" UNITED BASE)
-DEFINE_PARAVIS_TEST("${EXTRA_TESTS}" UNITED EXTRA)
+++ /dev/null
-# Copyright (C) 2016 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 PARAVIS tests, used by two test
-# approaches: "make test" and "salome test". The former is used just after
-# PARAVIS build step, the latter is used from an installed SALOME application.
-#
-# We here initialize some cmake variables that are used, by file inclusion, in
-# CMakeLists.txt (for make test) and CTestTestfileInstall.cmake (for salome
-# test).
-# These variables are: BASE_TESTS, EXTRA_TESTS and ALL_TESTS. The latter is
-# the joint set of base and extra tests.
-# Additional variables might be defined if necessary.
-
-SET(BASE_TESTS A2 B0)
-
-SET(EXTRA_TESTS A1 A4 A5)
-
-SET(ALL_TESTS ${BASE_TESTS} ${EXTRA_TESTS})
-
-# Variable used in ADD_TEST directive
-IF(SALOME_PARAVIS_ALL_TEST)
- SET(TEST_NAMES ${ALL_TESTS})
-ELSE()
- SET(TEST_NAMES ${BASE_TESTS})
-ENDIF()
+++ /dev/null
-# Copyright (C) 2010-2016 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 module can be used to run a simple rendering benchmark test. This
-test renders a sphere with various rendering settings and reports the rendering
-rate achieved in triangles/sec. """
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import time, sys, os, inspect
-
-def render(ss, v, title, nframes):
- print('============================================================')
- print(title)
- res = []
- res.append(title)
- for phires in (500, 1000):
- ss.PhiResolution = phires
- c = v.GetActiveCamera()
- v.CameraPosition = [-3, 0, 0]
- v.CameraViewUp = [0, 0, 1]
- v.StillRender()
- c1 = time.time()
- for i in range(nframes):
- c.Elevation(0.5)
- v.StillRender()
- sys.stdout.write(".")
- sys.stdout.write("\n")
- tpr = (time.time() - c1)/nframes
- ncells = ss.GetDataInformation().GetNumberOfCells()
- print(tpr, " secs/frame")
- print(ncells, " polys")
- print(ncells/tpr, " polys/sec")
-
- res.append((ncells, ncells/tpr))
-
- return res
-
-def run(filesour, impth, nframes):
-
- """ Runs the benchmark. If a filename is specified, it will write the
- results to that file as csv. The number of frames controls how many times
- a particular configuration is rendered. Higher numbers lead to more accurate
- averages. """
-
- # Create a sphere source to use in the benchmarks
- ss = Sphere(Radius=0.5, ThetaResolution=32, PhiResolution=8)
-
- # The view and representation
- v = GetRenderView()
- if not v:
- v = CreateRenderView()
- rep = None
- rep = GetRepresentation(proxy=None, view=v)
- results = []
-
- # Start with these defaults
- #v.UseImmediateMode = 0
- #v.UseTriangleStrips = 0
-
- # Test different configurations
- title = 'display lists, no triangle strips, solid color'
- #v.UseImmediateMode = 0
- #v.UseTriangleStrips = 0
- results.append(render(ss, v, title, nframes))
- WriteImage(filename = (impth + "demo0_1.png"), view=v, Magnification=2)
-
- title = 'display lists, triangle strips, solid color'
- #v.UseTriangleStrips = 1
- results.append(render(ss, v, title, nframes))
- #WriteImage(filename = (impth + "demo0_2.png"), view=v, Magnification=2)
-
- title = 'no display lists, no triangle strips, solid color'
- #v.UseImmediateMode = 1
- #v.UseTriangleStrips = 0
- results.append(render(ss, v, title, nframes))
- #WriteImage(filename = (impth + "demo0_3.png"), view=v, Magnification=2)
-
- title = 'no display lists, triangle strips, solid color'
- #v.UseTriangleStrips = 1
- results.append(render(ss, v, title, nframes))
- #WriteImage(filename = (impth + "demo0_4.png"), view=v, Magnification=2)
-
- # Color by normals
- lt = MakeBlueToRedLT(-1, 1)
- rep.LookupTable = lt
- rep.ColorAttributeType = 0 # point data
- rep.ColorArrayName = "Normals"
- lt.RGBPoints = [-1, 0, 0, 1, 0.0288, 1, 0, 0]
- lt.ColorSpace = 1 # HSV
- lt.VectorComponent = 0
-
- title = 'display lists, no triangle strips, color by array'
- #v.UseImmediateMode = 0
- #v.UseTriangleStrips = 0
- results.append(render(ss, v, title, nframes))
- #WriteImage(filename = (impth + "demo0_5.png"), view=v, Magnification=2)
-
- title = 'display lists, triangle strips, color by array'
- #v.UseTriangleStrips = 1
- results.append(render(ss, v, title, nframes))
- #v.UseImmediateMode = 1
- #WriteImage(filename = (impth + "demo0_6.png"), view=v, Magnification=2)
-
- title = 'no display lists, no triangle strips, color by array'
- #v.UseOCImmediateMode = 1
- #v.UseTriangleStrips = 0
- results.append(render(ss, v, title, nframes))
- #WriteImage(filename = (impth + "demo0_7.png"), view=v, Magnification=2)
-
- title = 'no display lists, triangle strips, color by array'
- #v.UseTriangleStrips = 1
- results.append(render(ss, v, title, nframes))
- WriteImage(filename = (impth + "demo0_8.png"), view=v, Magnification=2)
-
- newr = []
- for r in v.Representations:
- if r != rep:
- newr.append(r)
- v.Representations = newr
-
- ss = None
- rep = None
-
- v.StillRender()
- v = None
-
- if filesour:
- f = open(filesour, "w")
- else:
- f = sys.stdout
- print('configuration, %d, %d' % (results[0][1][0], results[0][2][0]), file=f)
- for i in results:
- print('"%s", %g, %g' % (i[0], i[1][1], i[2][1]), file=f)
-
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-
-
-if __name__ == "__main__":
- run(filesour=testdir + "/Pic/Information.txt", impth=testdir + "/Pic/", nframes=10)
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def demo1(impth):
- """Simple demo that create the following pipeline
- sphere - shrink - \
- - append
- cone - /
- """
-
- # Create a sphere of radius = 0.5, theta res. = 32
- # This object becomes the active source.
- ss = Sphere(Radius=0.5, ThetaResolution=32, PhiResolution=8)
-
- # The view and representation
- v = GetRenderView()
- if not v:
- v = CreateRenderView()
- v.CameraPosition = [-3, -3, -3]
- v.CameraViewUp = [0, 0, 1]
- v.StillRender()
-
- # Apply the shrink filter. The Input property is optional. If Input
- # is not specified, the filter is applied to the active source.
- shr = Shrink(Input=ss)
-
- # Create a cone source.
- cs = Cone()
-
- # Append cone and shrink
- app = AppendDatasets()
- app.Input = [shr, cs]
-
- # Show the output of the append filter. The argument is optional
- # as the app filter is now the active object.
- Show(app)
- WriteImage(filename = (impth + "demo1_1.png"), view=v, Magnification=2)
-
- PointData = app.GetDataInformation().GetNumberOfPoints()
- CellData = app.GetDataInformation().GetNumberOfCells()
- print(PointData, " Points")
- print(CellData, " Cells")
-
- # Render the default view.
- Render()
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-
-
-if __name__ == "__main__":
- demo1(impth =testdir+"/Pic/")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def demo10(fname, impth):
- """This method demonstrates the Contour filter."""
-
- reader = ExodusIIReader(FileName=fname)
- v=GetActiveView()
- ##Show(reader, view=v)
- contourFilter = Contour(reader)
- contourFilter.ContourBy = 'Temp'
- contourFilter.Isosurfaces
- ##[]
-
- contourFilter.Isosurfaces = [400]
- camera = GetActiveCamera()
- camera.Position = [0., 60., -33]
- camera.Elevation(-70)
-
- dp2 = GetDisplayProperties(contourFilter)
- contourFilter.PointData[:]
- ##[Array: Temp, Array: V, Array: Pres, Array: AsH3, Array: GaMe3, Array: CH4, Array: H2]
-
- temp = contourFilter.PointData[0]
- temp.GetRange()
- ## (399.99999999999994, 400.00000000000006)
-
- dp2.LookupTable = MakeBlueToRedLT(399.999,400)
- dp2.ColorAttributeType = 'POINT_DATA'
- dp2.ColorArrayName = 'Temp'
- Render()
- WriteImage(filename = (impth + "contourFilter_1.png"), view=v, Magnification=2)
-
- pres = contourFilter.PointData[2]
- pres.GetRange()
- ##(0.0074376024368978605, 0.02845284189526591)
-
- dp2.LookupTable = MakeBlueToRedLT(0.007437602, 0.02845284)
- dp2.ColorArrayName = 'Pres'
- Render()
- WriteImage(filename = (impth + "contourFilter_2.png"), view=v, Magnification=2)
-
- dp1 = GetDisplayProperties(reader)
- dp1.Representation = 'Wireframe'
- dp1.LookupTable = dp2.LookupTable
- dp1.ColorAttributeType = 'POINT_DATA'
- dp1.ColorArrayName = 'Pres'
- Show(reader)
-
- camera.Dolly(0.5)
- Render()
- camera.Elevation(-150)
- Render()
- WriteImage(filename = (impth + "contourFilter_3.png"), view=v, Magnification=2)
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-pvdata = os.getenv("SAMPLES_SRC_DIR")
-
-if __name__ == "__main__":
- demo10(fname=pvdata+"/Data/disk_out_ref.ex2", impth=testdir+"/Pic/")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def demo11(fname, impth):
- """This method demonstrates the Contour filter."""
-
- reader = ExodusIIReader(FileName=fname)
- v=GetActiveView()
- clipFilter = Clip(reader)
- clipFilter.ClipType = 'Scalar'
-
- clipFilter.Scalars = 'Temp'
- clipFilter.Value = 400
- Show(clipFilter)
- camera = GetActiveCamera()
- camera.Elevation(-75)
- Render()
- WriteImage(filename = (impth + "clipFilter_1.png"), view=v, Magnification=2)
-
- clipFilter2 = Clip(clipFilter)
- Show(clipFilter2)
- Hide(clipFilter)
- camera.SetPosition(-39, 0, 1.46)
- camera.Roll(90)
- WriteImage(filename = (impth + "clipFilter_2.png"), view=v, Magnification=2)
-
- dp1 = GetDisplayProperties(reader)
- dp2 = GetDisplayProperties(clipFilter2)
- clipFilter2.PointData[:]
- ##[Array: Temp, Array: V, Array: Pres, Array: AsH3, Array: GaMe3, Array: CH4, Array: H2]
-
- temp = clipFilter2.PointData[0]
- temp.GetRange()
- ##(399.99999999999994, 913.1500244140625)
-
- dp2.LookupTable = MakeBlueToRedLT(400,913.15)
- dp2.ColorAttributeType = 'POINT_DATA'
- dp2.ColorArrayName = 'Temp'
- Hide(reader)
- Render()
- WriteImage(filename = (impth + "clipFilter_3.png"), view=v, Magnification=2)
-
- dp1.Representation = 'Volume'
- temp.GetRange()
- ##(399.99999999999994, 913.1500244140625)
- dp1.LookupTable = dp2.LookupTable
- dp1.ColorAttributeType = 'POINT_DATA'
- dp1.ColorArrayName = 'Temp'
- Show(reader)
- Render()
- WriteImage(filename = (impth + "clipFilter_4.png"), view=v, Magnification=2)
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-pvdata = os.getenv("SAMPLES_SRC_DIR")
-
-if __name__ == "__main__":
- demo11(fname=pvdata+"/Data/disk_out_ref.ex2", impth=testdir+"/Pic/")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def demo12(fname, impth):
- """This method demonstrates the Stream Tracer."""
-
- reader = ExodusIIReader(FileName=fname)
- v=GetActiveView()
- streamTracer = StreamTracer(reader)
- streamTracer.Vectors = 'V'
- streamTracer.SeedType.NumberOfPoints = 100
- streamTracer.SeedType.Radius = 1.15
- streamTracer.MaximumStreamlineLength = 25.
-
- Show(streamTracer)
- camera = GetActiveCamera()
- camera.Elevation(-45)
- camera.Dolly(0.4)
- dp1 = GetDisplayProperties(streamTracer)
- streamTracer.PointData[:]
- ##[Array: Temp, Array: V, Array: Pres, Array: AsH3, Array: GaMe3, Array: CH4, Array: H2, Array: IntegrationTime, Array: Vorticity, Array: Rotation, ##Array: AngularVelocity, Array: Normals]
-
- pres = streamTracer.PointData[2]
- dp1.LookupTable = MakeBlueToRedLT(pres.GetRange()[0],pres.GetRange()[1])
- dp1.ColorAttributeType = 'POINT_DATA'
- dp1.ColorArrayName = 'Pres'
- Render()
- WriteImage(filename = (impth + "streamTracer_1.png"), view=v, Magnification=2)
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-pvdata = os.getenv("SAMPLES_SRC_DIR")
-
-if __name__ == "__main__":
- demo12(fname=pvdata+"/Data/disk_out_ref.ex2", impth=testdir+"/Pic/")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def demo2(fname, impth):
- """This demo shows the use of readers, data information and display properties."""
-
- # The view
- v = GetRenderView()
- if not v:
- v = CreateRenderView()
- v.CameraPosition = [-20, -9, -45]
- v.CameraFocalPoint = [0.7, 0.3, 1.7]
- v.CameraViewUp = [-0.75, -0.6, 0.25]
- v.CameraViewAngle = [30]
- v.StillRender()
-
- # Create the exodus reader and specify a file name
- reader = ExodusIIReader(FileName=fname)
-
- # Get the list of point arrays.
- avail = reader.PointVariables.Available
- print(avail)
-
- # Select all arrays
- reader.PointVariables = avail
-
- # Turn on the visibility of the reader
- Show(reader)
-
- # Set representation to wireframe
- SetDisplayProperties(Representation = "Wireframe")
-
- # Black background
- SetViewProperties(Background = [0., 0., 0.])
- Render()
-
- # Change the elevation of the camera.
- GetActiveCamera().Elevation(45)
- Render()
-
- # Now that the reader executed, let's get some information about it's output.
- pdi = reader[0].PointData
-
- # This prints a list of all read point data arrays as well as their value ranges.
- print('Number of point arrays:', len(pdi))
- for i in range(len(pdi)):
- ai = pdi[i]
- print("----------------")
- print("Array:", i, " ", ai.Name, ":")
- numComps = ai.GetNumberOfComponents()
- print("Number of components:", numComps)
- for j in range(numComps):
- print("Range:", ai.GetRange(j))
-
- # White is boring. Let's color the geometry using a variable. First create a lookup table. This object controls how scalar values are mapped to colors.
- SetDisplayProperties(LookupTable = MakeBlueToRedLT(0.00678, 0.0288))
-
- # Color by point array called Pres
- SetDisplayProperties(ColorAttributeType = "POINT_DATA")
- SetDisplayProperties(ColorArrayName = "Pres")
-
- WriteImage(filename = (impth + "demo2_1.png"), view=v, Magnification=2)
-
- # Set representation to surface
- SetDisplayProperties(Representation = "Surface")
-
- # Scalar Bar
- lt = MakeBlueToRedLT(0.00678, 0.0288)
- ScalarBar = CreateScalarBar(LookupTable = lt, Title = "Sample")
- GetRenderView().Representations.append(ScalarBar)
- WriteImage(filename = (impth + "demo2_2.png"), view=v, Magnification=2)
- Render()
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-pvdata = os.getenv("SAMPLES_SRC_DIR")
-
-if __name__ == "__main__":
- demo2(fname=pvdata+"/Data/disk_out_ref.ex2", impth=testdir+"/Pic/")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def demo3(impth):
- """This method demonstrates an artificial data sources,
- probes it with a line, etc"""
-
- # The TWO views
- rv = GetRenderView()
-
- v = CreateRenderView()
- v.CameraPosition = [-30, -20, -65]
- v.CameraFocalPoint = [0.0, 0.0, 0.0]
- v.CameraViewUp = [-0.65, -0.55, 0.5]
- v.CameraViewAngle = [30]
- SetActiveView(rv)
-
- src = Wavelet()
- # Get some information about the data. First, for the source to execute
- UpdatePipeline()
-
- di = src.GetDataInformation()
- print("Data type:", di.GetPrettyDataTypeString())
- print("Extent:", di.GetExtent())
-
- ##src.Representation = 3 # outline
- Show(src, view=v)
- v.StillRender()
-
- # Apply a contour filter
- cf = Contour(Input = src)
- cf.ContourBy = ['POINTS', 'RTData']
- cf.Isosurfaces = [37.353099999999998, 63.961533333333335, 90.569966666666673, 117.1784, 143.78683333333333, 170.39526666666666,
- 197.00370000000001, 223.61213333333333, 250.22056666666668, 276.82900000000001]
- Show(cf, view=rv)
-
- #Set background
- SetViewProperties(Background = [.50, .20, .30])
- Render()
-
- # Reset the camera to include the whole thing
- rv.StillRender()
- rv.ResetCamera()
- rv.CameraPosition = [-2.50, 60, -40]
- rv.CameraFocalPoint = [1.25, 1.0, 1.35]
- rv.CameraViewUp = [-0.955, 0.1, 0.25]
- rv.CameraViewAngle = [30]
- rv.StillRender()
-
- # Now, let's probe the data
- probe = ResampleWithDataset(Input=src)
-
- # with a line
- line = Line(Resolution=60)
-
- # that spans the dataset
- bounds = di.GetBounds()
-
- print("Bounds: ", bounds)
- line.Point1 = bounds[0:6:2]
- line.Point2 = bounds[1:6:2]
-
- probe.Source = line
-
- # Render with the line
- Show(line, view=rv)
- rv.StillRender()
- WriteImage(filename = (impth + "demo3_1.png"), view=v, Magnification=2)
- WriteImage(filename = (impth + "demo3_2.png"), view=rv, Magnification=2)
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-
-
-if __name__ == "__main__":
- demo3(impth=testdir+"/Pic/")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def demo4(fname, animpth):
- """This method demonstrates the AnimateReader for creating animations."""
-
- reader = ExodusIIReader(FileName=fname)
- v = CreateRenderView()
- repr = Show(reader, view=v)
- v.StillRender()
- v.ResetCamera()
- ##v.CameraPosition = [0., -30, 0]
- ##v.CameraFocalPoint = [6.2, 9.5, -0.5]
- ##v.CameraViewUp = [-0.64, 0.2, -0.75]
- ##v.CameraViewAngle = [30]
- v.StillRender()
- c = v.GetActiveCamera()
- c.Elevation(95)
-
- r = AnimateReader(reader, view=v, filename=(animpth + "can.png"))
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-pvdata = os.getenv("SAMPLES_SRC_DIR")
-
-if __name__ == "__main__":
- demo4(fname=pvdata+"/Data/can.ex2", animpth=testdir+"/VisuPrs/Animation/")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def LoadMultipleFiles(FilePath, FilePrefix):
-
- dualSphereAnimation = XMLPolyDataReader( FileName=[FilePath + FilePrefix + '0' + '.vtp',
- FilePath + FilePrefix + '1' + '.vtp',
- FilePath + FilePrefix + '2' + '.vtp',
- FilePath + FilePrefix + '3' + '.vtp',
- FilePath + FilePrefix + '4' + '.vtp',
- FilePath + FilePrefix + '5' + '.vtp',
- FilePath + FilePrefix + '6' + '.vtp',
- FilePath + FilePrefix + '7' + '.vtp',
- FilePath + FilePrefix + '8' + '.vtp',
- FilePath + FilePrefix + '9' + '.vtp',
- FilePath + FilePrefix + '10' + '.vtp'])
-
- dualSphereAnimation.PointArrayStatus = ['Normals']
- dualSphereAnimation.CellArrayStatus = ['cellNormals']
-
- DataRepr = Show()
- DataRepr.EdgeColor = [0.0, 0.0, 0.50000762951094835]
- DataRepr.SelectionCellLabelColor = [0.0, 1.0, 0.0]
- DataRepr.SelectionPointLabelJustification = 'Center'
- DataRepr.SelectionCellLabelJustification = 'Center'
- DataRepr.SelectionLineWidth = 2.0
- DataRepr.SelectionCellLabelFontSize = 24
- DataRepr.SelectionColor = [1.0, 0.0, 1.0]
- DataRepr.SelectionRepresentation = 'Wireframe'
-
- RenderV = GetRenderView()
- RenderV.CameraViewUp = [0.3643594701432189, -0.53089863872031573, -0.76510705912432175]
- RenderV.CameraPosition = [-1.43673886826885, 0.58420580818614165, -1.2056476292046452]
- RenderV.CameraClippingRange = [1.1902279246461551, 3.3614292621569204]
- RenderV.CameraFocalPoint = [0.24373197555541973, 4.2615454220042359e-08, -1.2218938645261819e-16]
- RenderV.CameraParallelScale = 0.5562421018838376
- RenderV.CenterOfRotation = [0.24373197555541992, 4.2615454276528908e-08, 0.0]
- RenderV.CameraViewUp = [-0.022295256951954404, 0.99334037123472696, -0.11303905693476472]
- RenderV.CameraFocalPoint = [0.24373197555541956, 4.261545421741021e-08, 6.2953480785622502e-17]
- RenderV.CameraClippingRange = [0.8880289667943051, 3.8672572119597652]
- RenderV.CameraPosition = [0.73282076784458949, 0.24745673087950623, 2.078081369909921]
-
- Render()
-
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-pvdata = os.getenv("SAMPLES_SRC_DIR")
-
-if __name__ == "__main__":
- LoadMultipleFiles(FilePath=pvdata+"/Data/dualSphereAnimation/", FilePrefix="dualSphereAnimation_P00T000")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def demo6(fname, impth):
- """This method demonstrates the Clip filter."""
-
- reader = ExodusIIReader(FileName=fname)
- v = CreateRenderView()
- repr = Show(reader, view=v)
- Render()
- v.StillRender()
- v.ResetCamera()
- clipFilter = Clip(reader)
- Hide(reader)
- Show(clipFilter)
- Render()
-
- #get camera
- camera = GetActiveCamera()
- camera.GetPosition()
-
- #figure out where you are
- camera.SetPosition(4.156,4.0,-36.29)
- camera.Elevation(30)
- camera.SetPosition(4.15603, 30, -35)
- Render()
- clipFilter.UseValueAsOffset = 1
- clipFilter.Value = 5
- Render()
- WriteImage(filename = (impth + "clipFilter_1.png"), view=v, Magnification=2)
-
- clipFilter.ClipType.Normal
- clipFilter.ClipType.Origin
-
- #reset the offset value of the clip to 0
- clipFilter.Value = 0
- clipFilter.ClipType.Normal = [0, 0, 1]
- Render()
- WriteImage(filename = (impth + "clipFilter_2.png"), view=v, Magnification=2)
-
- clipFilter.Value = -3
- Render()
- WriteImage(filename = (impth + "clipFilter_3.png"), view=v, Magnification=2)
-
- clipFilter.InsideOut = 1
- Render()
- WriteImage(filename = (impth + "clipFilter_4.png"), view=v, Magnification=2)
-
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-pvdata = os.getenv("SAMPLES_SRC_DIR")
-
-if __name__ == "__main__":
- demo6(fname=pvdata+"/Data/can.ex2", impth=testdir+"/Pic/")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def demo7(fname, impth):
- """This method demonstrates the Slice filter."""
-
- v=GetActiveView()
- reader = ExodusIIReader(FileName=fname)
- sliceFilter = Slice(reader)
- Show(sliceFilter)
- Render()
-
- camera = GetActiveCamera()
- camera.Elevation(30)
- camera.SetPosition(17, 40, -25)
- Render()
- WriteImage(filename = (impth + "sliceFilter_1.png"), view=v, Magnification=2)
-
- sliceFilter.SliceType.Normal
-
- #The origin of the slice needs to be moved to see slices in the Y-plane
- sliceFilter.SliceType.Origin = [2.5,5,0]
- sliceFilter.SliceType.Normal = [0,1,0]
- Render()
- WriteImage(filename = (impth + "sliceFilter_2.png"), view=v, Magnification=2)
-
- sliceFilter.SliceType.Normal = [0,0,1]
- Render()
- WriteImage(filename = (impth + "sliceFilter_3.png"), view=v, Magnification=2)
-
- sliceFilter.SliceType.Normal = [0,1,0]
- sliceFilter.SliceOffsetValues
- sliceFilter.SliceOffsetValues = [-4,-3.11,-2.22,-1.33,-0.44,0.44,1.33,2.22,3.11,4]
-
- Render()
- WriteImage(filename = (impth + "sliceFilter_4.png"), view=v, Magnification=2)
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-pvdata = os.getenv("SAMPLES_SRC_DIR")
-
-if __name__ == "__main__":
- demo7(fname=pvdata+"/Data/can.ex2", impth=testdir+"/Pic/")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def demo8(fname, impth):
- """This method demonstrates the Glyph filter."""
-
- reader = ExodusIIReader(FileName=fname)
- v=GetActiveView()
- Show(reader, view=v)
- camera = GetActiveCamera()
- camera.SetPosition(0, 5, -45)
- camera.Elevation(30)
-
- #Change the can to be wireframe so we can see the glyphs
- dp1 = GetDisplayProperties(reader, view=v)
- dp1.Representation = 'Wireframe'
- glyphFilter = Glyph(reader)
-
- #We won't see much if we don't move forward in the animation a little bit
- tsteps = reader.TimestepValues
- v = GetActiveView()
- v.ViewTime = tsteps[20]
- glyphFilter.Vectors
- ## ['POINTS', 'DISPL']
-
- #Set the glyphs to use the acceleration vectors and adjust scale factor
- glyphFilter.Vectors = 'ACCL'
- ##glyphFilter.GetScaleFactor
- ##1.0
- glyphFilter.SetScaleFactor = 0.0000002
-
- Show()
- Render()
- WriteImage(filename = (impth + "glyphFilter_1.png"), view=v, Magnification=2)
-
- #Set the glyphs to use the velocity vectors and adjust scale factor
- glyphFilter.Vectors = 'VEL'
- glyphFilter.SetScaleFactor = 3e-4
-
- #Add some color
- dp2 = GetDisplayProperties(glyphFilter)
- glyphFilter.PointData[:]
- ##[Array: PedigreeNodeId, Array: DISPL, Array: VEL, Array: ACCL, Array: GlobalNodeId, Array: GlyphVector]
-
- #We'll color by velocity so use that array.
- vel = glyphFilter.PointData[2]
- vel.GetName()
- ##'VEL'
-
- vel.GetRange()
- ##(-2479.9521484375, 1312.5040283203125)
- dp2.LookupTable = MakeBlueToRedLT(-2479.9521,1312.5)
- dp2.ColorAttributeType = 'POINT_DATA'
- dp2.ColorArrayName = 'VEL'
- Render()
- WriteImage(filename = (impth + "glyphFilter_2.png"), view=v, Magnification=2)
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-pvdata = os.getenv("SAMPLES_SRC_DIR")
-
-if __name__ == "__main__":
- demo8(fname=pvdata+"/Data/can.ex2", impth=testdir+"/Pic/")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def demo9(fname, impth):
- """This method demonstrates the Threshold filter."""
-
- reader = ExodusIIReader(FileName=fname)
- v=GetActiveView()
- Show(reader, view=v)
- dp1 = GetDisplayProperties(reader)
- dp1.Representation = 'Wireframe'
- camera = GetActiveCamera()
- camera.Elevation(-60)
- thresholdFilter = Threshold(reader)
- thresholdFilter.Scalars
- ##['POINTS', 'GlobalNodeId']
-
- thresholdFilter.Scalars = 'Temp'
- Show(thresholdFilter)
- thresholdFilter.ThresholdRange
- ##[0.0, 0.0]
- thresholdFilter.ThresholdRange = [398.55,913.15]
- Render()
- WriteImage(filename = (impth + "thresholdFilter_1.png"), view=v, Magnification=2)
-
- dp2 = GetDisplayProperties(thresholdFilter)
- thresholdFilter.PointData[:]
- ##[Array: GlobalNodeId, Array: PedigreeNodeId, Array: Temp, Array: V, Array: Pres, Array: AsH3, Array: GaMe3, Array: CH4, Array: H2]
-
- temp = thresholdFilter.PointData[2]
- temp.GetRange()
- ##(400.46258544921875, 846.694091796875)
-
- dp2.LookupTable = MakeBlueToRedLT(400.4625,846.6909)
- dp2.ColorAttributeType = 'POINT_DATA'
- dp2.ColorArrayName = 'Temp'
- Render()
- WriteImage(filename = (impth + "thresholdFilter_2.png"), view=v, Magnification=2)
-
- #Set the lower threshold to 500
- thresholdFilter.ThresholdRange[0] = 500
- Render()
- WriteImage(filename = (impth + "thresholdFilter_3.png"), view=v, Magnification=2)
-
- dp1.LookupTable = MakeBlueToRedLT(400.462, 84609)
- dp1.ColorAttributeType = 'POINT_DATA'
- dp1.ColorArrayName = 'Temp'
- Render()
- WriteImage(filename = (impth + "thresholdFilter_4.png"), view=v, Magnification=2)
-
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-pvdata = os.getenv("SAMPLES_SRC_DIR")
-
-if __name__ == "__main__":
- demo9(fname=pvdata+"/Data/disk_out_ref.ex2", impth=testdir+"/Pic/")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-"""
-MEDReader test script.
-Before launching the script necessary MED files has to be placed into ./MedData directory
-"""
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import sys
-import os
-import time
-import inspect
-
-def medread (path, impth):
- print('============================================================')
-
- if os.path.exists(path):
- filelist = os.listdir(path)
- num = len (filelist)
-
- for i in range(num):
- fname = str(filelist[i])
- if fname.rfind(".med") > -1:
- v = GetRenderView()
- v.UseLight = 1
- v.CameraPosition = [0.0, 0.0, 6.7]
- v.LightSwitch = 0
- v.CameraClippingRange = [4.5, 9.5]
- v.LODThreshold = 5.0
- v.Background = [0., 0., 0.]
- v.CameraParallelScale = 1.8
-
- file_med = MEDReader( FileName=(path + fname))
-
- time.sleep(10)
- SetActiveSource(file_med)
- Show()
- ##Show (file_med, view=v)
- ##Render(view=v)
- Render()
- time.sleep(10)
- WriteImage(filename = (impth + "medFile_" + str(i+1) + ".png"), view=v, Magnification=2)
- print(str(i+1), "Shown file is: ", fname)
-
- Delete(v)
- v1 = CreateRenderView()
- SetActiveView(v1)
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-
-
-if __name__ == "__main__":
- medread(path=testdir+"/MedData/", impth=testdir+"/Pic/")
+++ /dev/null
-# Copyright (C) 2010-2016 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
-#
-
-
-# ATTENTION. This script is prepared for the future not for current moment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-if not ('servermanager' in dir()):
- from pvsimple import *
-
-import os, inspect
-
-def LoadMultipleFiles_med(FilePath, FilePrefix):
-
- TETRA_dom_fl = MEDReader( FileName = [FilePath + FilePrefix + '1' + '.med',
- FilePath + FilePrefix + '2' + '.med',
- FilePath + FilePrefix + '3' + '.med',
- FilePath + FilePrefix + '4' + '.med',
- FilePath + FilePrefix + '5' + '.med',
- FilePath + FilePrefix + '6' + '.med'])
-
- TETRA_dom_fl.CellArrays = ['Pression', 'Temp.C', 'VitesseX']
- TETRA_dom_fl.GlobalFamilyStatus = ['1 1 1', '1 2 1', '1 3 1', '1 4 1', '1 5 1']
- TETRA_dom_fl.GlobalEntityStatus = ['0 203', '0 304']
-
- rv = GetRenderView()
- a1_Temp_C_PVLookupTable = CreateLookupTable( RGBPoints=[-1.3, 0.23, 0.3, 0.75, 200., 0.70, 0.016, 0.15],
- VectorMode='Magnitude',
- ColorSpace='Diverging',
- ScalarRangeInitialized=1.0 )
-
- dr = Show()
- dr.EdgeColor = [0.0, 0.0, 0.50]
- dr.SelectionCellLabelColor = [0.0, 1.0, 0.0]
- dr.SelectionPointLabelJustification = 'Center'
- dr.SelectionCellLabelJustification = 'Center'
- dr.ScalarOpacityFunction = []
- dr.ColorArrayName = 'Temp.C'
- dr.SelectionLineWidth = 2.0
- dr.ScalarOpacityUnitDistance = 2.6738860338205099
- dr.SelectionCellLabelFontSize = 24
- dr.SelectionColor = [1.0, 0.0, 1.0]
- dr.SelectionRepresentation = 'Wireframe'
- dr.LookupTable = a1_Temp_C_PVLookupTable
-
- rv.CameraPosition = [50.0, -29.75, 267.55447959748415]
- rv.CameraFocalPoint = [50.0, -29.75, 0.0]
- rv.CameraClippingRange = [248.95893480150932, 291.60779679144639]
- rv.CenterOfRotation = [50.0, -29.75, 0.0]
- rv.CameraParallelScale = 69.24819492232271
-
- Render()
-
-
-
-scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
-testdir = os.path.dirname( os.path.abspath(scriptdir) )
-
-
-if __name__ == "__main__":
- LoadMultipleFiles_med(FilePath=testdir+"/TETRA_domaine_fluide/", FilePrefix="TETRA_domaine_fluide")