Salome HOME
enable make test
[modules/paravis.git] / test / VisuPrs / 3D_viewer / B1.py
1 # Copyright (C) 2010-2015  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, or (at your option) any later version.
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
26 import math
27
28 # 1. First viewer creation
29 view1 = GetRenderView()
30
31 # 2. Second viewer creation
32 view2 = CreateRenderView()
33
34 # 3. Change view size
35 size1 = view1.ViewSize
36 size2 = view2.ViewSize
37
38 w = size1[0] + size2[0]
39 w1 = math.trunc(w * 0.7)
40 w2 = w - w1
41
42 view1.ViewSize = [w1, size1[1]]
43 view2.ViewSize = [w2, size2[1]]
44
45 # 4. Change view position
46 h = view1.ViewSize[1]
47 view1.ViewSize = [h//2, w]
48 view2.ViewSize = [h//2, w]
49 #view1.ViewPosition = [0, h//2]
50 #view1.ViewPosition = [0, 0]
51
52 Render(view1)
53 Render(view2)