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>
22 circle_create_in_view((302, 221), (436, 287))
26 #[Scenario] Sketch_003
28 #[Tested functionality] Saving and opening studies
29 #[Summary description]
33 source(findFile("scripts", "common.py"))
35 #[section] Application start
37 startApplication("salome_run.sh")
40 #[section] Creation of 3D model
41 #[step] Activate SHAPER
42 #[step]Click 'New' button
45 #[step] Create new part
47 #[step] Create sketch, consisting from one circle
48 sketch_create(help_points("XZ_plane"), lambda: sketch())
50 #[step] Execute extrusion. Use parameters to size = 100 and from size = 50
51 extrusion((182, 140), 100, 50)
53 #[step] Rotate obtained model
54 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
55 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 425, 422, 20, -23, 67108865, Qt.LeftButton)
56 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
57 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 446, 411, -13, -137, 67108866, Qt.RightButton)
61 #[step] File - Save as
62 #[step] 'Save as' dialog appears
63 #[step] Type name of file
64 #[step] Click 'Save' button
65 save("RESULTS_PATH + sketch_003")
66 if object.exists(":Warning.Yes_QPushButton"):
67 clickButton(waitForObject(":Warning.Yes_QPushButton"))
69 #[step] Close document
70 clickButton(waitForObject(":SALOME*.Close_QToolButton"))
73 #[step} Open just saved file
74 open("RESULTS_PATH + sketch_003.hdf")
75 #[step] Activate SHAPER
76 clickButton(waitForObject(":SALOME*.Shaper_QToolButton"))
78 #[step] Activate Part_1
79 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)")
80 clickItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)", 50, 11, 0, Qt.LeftButton)
81 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1 (Not loaded)", 50, 11, 0)
82 activateItem(waitForObjectItem(":_QMenu", "Activate"))
84 #[check] Check that file was loaded correct
86 #[step] Close application