1 ## Copyright (C) 2014-2017 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
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
23 clickButton(waitForObject(":Basic.Line_AppElements_Button"))
24 mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 256, 202, 0, Qt.LeftButton)
25 mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 256, 462, 0, Qt.LeftButton)
26 mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 472, 466, 0, Qt.LeftButton)
27 mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 467, 205, 0, Qt.LeftButton)
28 mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 256, 202, 0, Qt.LeftButton)
30 perpendicular_create((354, 204),(469, 309))
31 perpendicular_create((470, 314),(357, 464))
32 perpendicular_create((354, 463),(255, 321))
34 horizontal_create((358, 203))
36 distance_create((256, 205), (473, 202), (446, 141), 330)
37 distance_create((258, 205), (256, 470), (208, 459), 400)
41 mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 365, 324, 0, Qt.LeftButton)
43 circle_create_in_view((265, 190), (278, 205))
44 circle_create_in_view((460, 194), (476, 209))
45 circle_create_in_view((264, 465), (272, 487))
46 circle_create_in_view((465, 467), (472, 482))
48 radius_create((282, 203), (299, 177), 15)
49 radius_create((456, 174), (402, 157), 15)
50 radius_create((284, 454), (304, 438), 15)
51 radius_create((467, 484), (472, 486), 15)
53 distance_create((269, 191), (463,198), (433, 101), 170)
54 distance_create((265, 463), (445, 404), (328, 545), 170)
55 distance_create((223, 193), (220, 483), (153, 457), 240)
56 distance_create((496, 196), (467, 394), (564, 375), 240)
58 distance_create((187, 645), (202, 532), (168, 560), 80)
59 distance_create((113, 598), (199, 517), (197, 424), 80)
60 distance_create((509, 64), (643, 63), (579, 160), 80)
61 distance_create((512, 62), (529, 3), (443, 119), 80)
65 mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 365, 324, 0, Qt.LeftButton)
67 line_create_in_view((112, 185), (643, 193))
68 line_create_in_view((643, 193), (641, 288))
69 line_create_in_view((641, 288), (111, 285))
70 line_create_in_view((111, 285), (112, 185))
72 horizontal_create((344, 187))
73 horizontal_create((349, 286))
77 source(findFile("scripts", "common.py"))
79 startApplication("linux_run.sh")
82 test.log("TODO: Make test more stable."); return
85 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1")
86 clickItem(":Object browser_XGUI_DataTree", "Part\\_1", 46, 8, 0, Qt.LeftButton)
88 sketch_create(help_points("XY_plane"), lambda: sketch())
91 clickTab(waitForObject(":General.qt_tabwidget_tabbar_QTabBar"), "Features")
92 clickButton(waitForObject(":Extrusion.Extrusion_AppElements_Button"))
93 mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 295, 253, 0, Qt.LeftButton)
94 mouseClick(waitForObject(":Extrusion.qt_spinbox_lineedit_QLineEdit"), 28, 8, 0, Qt.LeftButton)
95 type(waitForObject(":to_size_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
96 type(waitForObject(":to_size_ModuleBase_ParamSpinBox"), "50")
97 mouseClick(waitForObject(":Extrusion.qt_spinbox_lineedit_QLineEdit_2"), 29, 10, 0, Qt.LeftButton)
98 type(waitForObject(":Extrusion.from_size_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
99 type(waitForObject(":Extrusion.from_size_ModuleBase_ParamSpinBox"), "50")
100 clickButton(waitForObject(":Extrusion.property_panel_ok_QToolButton"))
102 #extrusion_feature((361, 391), 50, 50)
103 #sketch_create(help_points("XY_plane"), lambda: sketch_1())
105 extrusion_cut_by_sizes_feature((365, 324), lambda: sketch_1(), 100, 150)
106 extrusion_fuse_by_sizes_feature((185, 213), lambda: sketch_2(), 150, 0)
108 mouseDrag(waitForObject(":OpenParts*_AppElements_ViewPort"), 89, 518, 13, -86, 67108865, Qt.LeftButton)
109 mouseDrag(waitForObject(":OpenParts*_AppElements_ViewPort"), 181, 514, -21, -144, 67108866, Qt.RightButton)
110 mouseDrag(waitForObject(":OpenParts*_AppElements_ViewPort"), 662, 541, -368, -221, 67108866, Qt.RightButton)
111 mouseDrag(waitForObject(":OpenParts*_AppElements_ViewPort"), 609, 270, -48, 320, 67108866, Qt.RightButton)
112 mouseDrag(waitForObject(":OpenParts*_AppElements_ViewPort"), 483, 423, 123, 11, 67108866, Qt.RightButton)
114 clickButton(waitForObject(":OpenParts*.Fit all_QToolButton"))
115 test.vp("VP1")#Detail in axonometric view
117 mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), 391, 374, 0, Qt.LeftButton)
118 test.vp("VP2")#Detail is selected
120 sendEvent("QCloseEvent", waitForObject(":OpenParts*_AppElements_MainWindow"))