1 # Copyright (C) 2010-2014 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 if not ('servermanager' in dir()):
22 from pvsimple import *
26 def LoadMultipleFiles(FilePath, FilePrefix):
28 dualSphereAnimation = XMLPolyDataReader( FileName=[FilePath + FilePrefix + '0' + '.vtp',
29 FilePath + FilePrefix + '1' + '.vtp',
30 FilePath + FilePrefix + '2' + '.vtp',
31 FilePath + FilePrefix + '3' + '.vtp',
32 FilePath + FilePrefix + '4' + '.vtp',
33 FilePath + FilePrefix + '5' + '.vtp',
34 FilePath + FilePrefix + '6' + '.vtp',
35 FilePath + FilePrefix + '7' + '.vtp',
36 FilePath + FilePrefix + '8' + '.vtp',
37 FilePath + FilePrefix + '9' + '.vtp',
38 FilePath + FilePrefix + '10' + '.vtp'])
40 dualSphereAnimation.PointArrayStatus = ['Normals']
41 dualSphereAnimation.CellArrayStatus = ['cellNormals']
44 DataRepr.EdgeColor = [0.0, 0.0, 0.50000762951094835]
45 DataRepr.SelectionCellLabelColor = [0.0, 1.0, 0.0]
46 DataRepr.SelectionPointLabelJustification = 'Center'
47 DataRepr.SelectionCellLabelJustification = 'Center'
48 DataRepr.SelectionLineWidth = 2.0
49 DataRepr.SelectionCellLabelFontSize = 24
50 DataRepr.SelectionColor = [1.0, 0.0, 1.0]
51 DataRepr.SelectionRepresentation = 'Wireframe'
53 RenderV = GetRenderView()
54 RenderV.CameraViewUp = [0.3643594701432189, -0.53089863872031573, -0.76510705912432175]
55 RenderV.CameraPosition = [-1.43673886826885, 0.58420580818614165, -1.2056476292046452]
56 RenderV.CameraClippingRange = [1.1902279246461551, 3.3614292621569204]
57 RenderV.CameraFocalPoint = [0.24373197555541973, 4.2615454220042359e-08, -1.2218938645261819e-16]
58 RenderV.CameraParallelScale = 0.5562421018838376
59 RenderV.CenterOfRotation = [0.24373197555541992, 4.2615454276528908e-08, 0.0]
60 RenderV.CameraViewUp = [-0.022295256951954404, 0.99334037123472696, -0.11303905693476472]
61 RenderV.CameraFocalPoint = [0.24373197555541956, 4.261545421741021e-08, 6.2953480785622502e-17]
62 RenderV.CameraClippingRange = [0.8880289667943051, 3.8672572119597652]
63 RenderV.CameraPosition = [0.73282076784458949, 0.24745673087950623, 2.078081369909921]
69 scriptdir = inspect.getframeinfo(inspect.currentframe())[0]
70 testdir = os.path.dirname( os.path.abspath(scriptdir) )
71 pvdata = os.getenv("SAMPLES_SRC_DIR")
73 if __name__ == "__main__":
74 LoadMultipleFiles(FilePath=pvdata+"/Data/dualSphereAnimation/", FilePrefix="dualSphereAnimation_P00T000")