Back to index

salome-paravis  6.5.0
demo5.py
Go to the documentation of this file.
00001 # Copyright (C) 2010-2012  CEA/DEN, EDF R&D
00002 #
00003 # This library is free software; you can redistribute it and/or
00004 # modify it under the terms of the GNU Lesser General Public
00005 # License as published by the Free Software Foundation; either
00006 # version 2.1 of the License.
00007 #
00008 # This library is distributed in the hope that it will be useful,
00009 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 # Lesser General Public License for more details.
00012 #
00013 # You should have received a copy of the GNU Lesser General Public
00014 # License along with this library; if not, write to the Free Software
00015 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 #
00017 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 #
00019 
00020 
00021 if not ('servermanager' in dir()):
00022   from pvsimple import *
00023 
00024 import os
00025 
00026 def LoadMultipleFiles(FilePath, FilePrefix):
00027 
00028   dualSphereAnimation = XMLPolyDataReader( FileName=[FilePath + FilePrefix + '0' + '.vtp',
00029                                                                                                      FilePath + FilePrefix + '1' + '.vtp',
00030                                                                                                      FilePath + FilePrefix + '2' + '.vtp',
00031                                                                                                      FilePath + FilePrefix + '3' + '.vtp',
00032                                                                                                      FilePath + FilePrefix + '4' + '.vtp',
00033                                                                                                      FilePath + FilePrefix + '5' + '.vtp',
00034                                                                                                      FilePath + FilePrefix + '6' + '.vtp',
00035                                                                                                      FilePath + FilePrefix + '7' + '.vtp',
00036                                                                                                      FilePath + FilePrefix + '8' + '.vtp',
00037                                                                                                      FilePath + FilePrefix + '9' + '.vtp',
00038                                                                                                      FilePath + FilePrefix + '10' + '.vtp'])
00039 
00040   dualSphereAnimation.PointArrayStatus = ['Normals']
00041   dualSphereAnimation.CellArrayStatus = ['cellNormals']
00042 
00043   DataRepr = Show()
00044   DataRepr.EdgeColor = [0.0, 0.0, 0.50000762951094835]
00045   DataRepr.SelectionCellLabelColor = [0.0, 1.0, 0.0]
00046   DataRepr.SelectionPointLabelJustification = 'Center'
00047   DataRepr.SelectionCellLabelJustification = 'Center'
00048   DataRepr.SelectionLineWidth = 2.0
00049   DataRepr.SelectionCellLabelFontSize = 24
00050   DataRepr.SelectionColor = [1.0, 0.0, 1.0]
00051   DataRepr.SelectionRepresentation = 'Wireframe'
00052 
00053   RenderV = GetRenderView()
00054   RenderV.CameraViewUp = [0.3643594701432189, -0.53089863872031573, -0.76510705912432175]
00055   RenderV.CameraPosition = [-1.43673886826885, 0.58420580818614165, -1.2056476292046452]
00056   RenderV.CameraClippingRange = [1.1902279246461551, 3.3614292621569204]
00057   RenderV.CameraFocalPoint = [0.24373197555541973, 4.2615454220042359e-08, -1.2218938645261819e-16]
00058   RenderV.CameraParallelScale = 0.5562421018838376
00059   RenderV.CenterOfRotation = [0.24373197555541992, 4.2615454276528908e-08, 0.0]
00060   RenderV.CameraViewUp = [-0.022295256951954404, 0.99334037123472696, -0.11303905693476472]
00061   RenderV.CameraFocalPoint = [0.24373197555541956, 4.261545421741021e-08, 6.2953480785622502e-17]
00062   RenderV.CameraClippingRange = [0.8880289667943051, 3.8672572119597652]
00063   RenderV.CameraPosition = [0.73282076784458949, 0.24745673087950623, 2.078081369909921]
00064 
00065   Render()
00066 
00067 
00068 testdir = os.getenv("TESTDIR")
00069 pvdata = os.getenv("PVDATA")
00070 
00071 if __name__ == "__main__":
00072   LoadMultipleFiles(FilePath=pvdata+"/Data/dualSphereAnimation/", FilePrefix="dualSphereAnimation_P00T000")