2 circle_create_in_view((302, 221), (436, 287))
8 #[Tested functionality] Saving and opening studies
13 source(findFile("scripts", "common.py"))
15 #[section] Application start
17 startApplication("salome_run.sh")
20 #[section] Creation of 3D model
21 #[step] Activate NewGeom
22 #[step]Click 'New' button
25 #[step] Create new part
27 #[step] Create sketch, consisting from one circle
28 sketch_create(help_points("XZ_plane"), lambda: sketch())
30 #[step] Execute extrusion. Use parameters to size = 100 and from size = 50
31 extrusion((182, 140), 100, 50)
33 #[step] Rotate obtained model
34 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
35 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 425, 422, 20, -23, 67108865, Qt.LeftButton)
36 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
37 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 446, 411, -13, -137, 67108866, Qt.RightButton)
41 #[step] File - Save as
42 #[step] 'Save as' dialog appears
43 #[step] Type name of file
44 #[step] Click 'Save' button
45 save("RESULTS_PATH + sketch_003")
46 if object.exists(":Warning.Yes_QPushButton"):
47 clickButton(waitForObject(":Warning.Yes_QPushButton"))
49 #[step] Close document
50 clickButton(waitForObject(":SALOME*.Close_QToolButton"))
53 #[step} Open just saved file
54 open("RESULTS_PATH + sketch_003.hdf")
55 #[step] Activate NewGeom
56 clickButton(waitForObject(":SALOME*.NewGeom_QToolButton"))
58 #[step] Activate Part_1
59 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)")
60 clickItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)", 50, 11, 0, Qt.LeftButton)
61 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1 (Not loaded)", 50, 11, 0)
62 activateItem(waitForObjectItem(":_QMenu", "Activate"))
64 #[check] Check that file was loaded correct
66 #[step] Close application