From: ouv Date: Wed, 4 Nov 2009 13:24:30 +0000 (+0000) Subject: Additional fix for issue 0020085: EDF 874 VISU : Visualize evolution of a variable... X-Git-Tag: V5_1_main_20091105~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8646f73ded0ab6d210622cafe2adf5ebe42026d1;p=modules%2Fvisu.git Additional fix for issue 0020085: EDF 874 VISU : Visualize evolution of a variable at a given location --- diff --git a/src/VISU_SWIG/Makefile.am b/src/VISU_SWIG/Makefile.am index 754d19ae..3b4a7ca4 100644 --- a/src/VISU_SWIG/Makefile.am +++ b/src/VISU_SWIG/Makefile.am @@ -61,7 +61,7 @@ dist_salomescript_DATA = batchmode_visu.py batchmode_visu_table.py batchmode_vis visu_table.py visu_big_table.py visu_view.py visu_delete.py \ visu_split_views.py \ visu_succcessive_animation.py visu_apply_properties.py visu_apply_properties_successive.py \ - batchmode_visu_view.py visu_cache.py visu_pointmap3d.py visu_view3d_parameters.py \ + batchmode_visu_view.py visu_cache.py visu_pointmap3d.py visu_view3d_parameters.py visu_evolution.py \ VISU_Example_01.py VISU_Example_02.py VISU_Example_03.py VISU_Example_04.py \ VISU_Example_05.py VISU_Example_06.py VISU_Example_07.py diff --git a/src/VISU_SWIG/visu_evolution.py b/src/VISU_SWIG/visu_evolution.py new file mode 100755 index 00000000..cf17eeef --- /dev/null +++ b/src/VISU_SWIG/visu_evolution.py @@ -0,0 +1,56 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +# +# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +# VISU VISU_SWIG : binding of C++ implementation and Python +# File : visu_evolution.py +# Module : VISU +# +import os +import VISU +from visu_gui import * + +myViewManager = myVisu.GetViewManager(); + +myView = myViewManager.CreateXYPlot(); +myView.SetTitle("The viewer for Evolution") +print "myViewManager.CreateXYPlot()" + +medFile = "TimeStamps.med" +medFile = os.getenv('DATA_DIR') + '/MedFiles/' + medFile +myResult = myVisu.ImportFile(medFile) + +anEvolution = myVisu.CreateEvolution(myView); + +aSObj = myStudy.FindObjectIOR(myResult.GetID()) +aSObj = aSObj.FindSubObject(1)[1] # dom +aSObj = aSObj.FindSubObject(3)[1] # Fields +aSObj = aSObj.FindSubObject(2)[1] # vitesse +print "setField : ", anEvolution.setField(aSObj) + +anEvolution.setComponentId(1) # x component + +anEvolution.setPointId(500) + +print "Show Evolution" +anEvolution.showEvolution() + +myView.FitAll()