Salome HOME
Merge branch 'origin/abn/openfile_fix'
[modules/paravis.git] / test / VisuPrs / 3D_viewer / B1.py
1 # Copyright (C) 2010-2013  CEA/DEN, EDF R&D
2 #
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.
7 #
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.
12 #
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
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 # This case corresponds to: /visu/3D_viewer/B1 case
21
22 from paravistest import *
23 from presentations import *
24 from pvsimple import *
25 import paravis
26
27 import math
28
29 # 1. First viewer creation
30 view1 = GetRenderView()
31
32 # 2. Second viewer creation
33 view2 = CreateRenderView()
34
35 # 3. Change view size
36 size1 = view1.ViewSize
37 size2 = view2.ViewSize
38
39 w = size1[0] + size2[0]
40 w1 = math.trunc(w * 0.7)
41 w2 = w - w1
42
43 view1.ViewSize = [w1, size1[1]]
44 view2.ViewSize = [w2, size2[1]]
45
46 # 4. Change view position
47 h = view1.ViewSize[1]
48 view1.ViewSize = [h//2, w]
49 view2.ViewSize = [h//2, w]
50 view1.ViewPosition = [0, h//2]
51 view1.ViewPosition = [0, 0]
52
53 Render(view1)
54 Render(view2)