Salome HOME
Merge remote-tracking branch 'remotes/origin/Dev_ResultNames'
[modules/shaper.git] / test.squish / suite_STANDALONE / tst_532 / test.py
1 ## Copyright (C) 2014-2017  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
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 ##
20
21 def sketch():
22     clickButton(waitForObject(":Basic.Line_AppElements_Button"))
23     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 230, 140, 0, Qt.LeftButton)
24     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 128, 399, 0, Qt.LeftButton)
25     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 307, 317, 0, Qt.LeftButton)
26     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 473, 347, 0, Qt.LeftButton)
27     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 230, 140, 0, Qt.LeftButton)
28
29 def main():
30     source(findFile("scripts", "common.py"))
31
32     startApplication("linux_run.sh")
33     set_defaults()
34
35     sketch_create(help_points("XY_plane"), lambda: sketch())
36
37     part_create()
38
39     extrusion_feature([(266, 251)], 10) # on the sketch
40
41     clickTab(waitForObject(":General.qt_tabwidget_tabbar_QTabBar"), "Construction")
42     clickButton(waitForObject(":Basic.Plane_AppElements_Button"))
43     type(waitForObject(":OpenParts*_AppElements_ViewPort"), "<Control>")
44     mouseDrag(waitForObject(":OpenParts*_AppElements_ViewPort"), 353, 364, -37, -171, 67108866, Qt.RightButton)
45     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 274, 316, 0, Qt.LeftButton) # inner left face
46     clickButton(waitForObject(":Plane.property_panel_ok_QToolButton"))
47
48     test.vp("VP_EXTRUSION")
49
50     clickTab(waitForObject(":General.qt_tabwidget_tabbar_QTabBar"), "Features")
51     clickButton(waitForObject(":Boolean.Partition_AppElements_Button"))
52     mouseClick(waitForObject(":Partition.Main objects_QListWidget"), 10, 10, 0, Qt.LeftButton)
53     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 227, 263, 0, Qt.LeftButton) # extrusion object
54     mouseClick(waitForObject(":Partition.Tool object_QListWidget"), 10, 10, 0, Qt.LeftButton)
55     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 212, 344, 0, Qt.LeftButton) # construction plane
56     clickButton(waitForObject(":Partition.property_panel_ok_QToolButton"))
57
58     test.vp("VP_PARTITION")