5 #[Topic] 'Rotation' functionality
6 #[Tested functionality]
11 source(findFile("scripts", "common.py"))
13 #[section] Application start
15 startApplication("salome_run.sh")
19 #[step] Open 'for_sketch_016.hdf'
20 open(DATA_PATH + "/for_sketch_016.hdf")
22 #[step] Activate NewGeom
23 clickButton(waitForObject(":SALOME*.NewGeom_QToolButton"))
25 #[step] Edit 'Sketch_1'
26 waitForObjectItem(":Object browser_XGUI_DataTree", "Sketch\\_1")
27 clickItem(":Object browser_XGUI_DataTree", "Sketch\\_1", 43, 12, 0, Qt.LeftButton)
28 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Sketch\\_1", 43, 12, 0)
29 activateItem(waitForObjectItem(":_QMenu", "Edit..."))
31 #[step] Click '+OZ' button
32 clickButton(waitForObject(":SALOME*.+OZ_QToolButton"))
34 #[step] Sketch - Rotation
35 mouseClick(waitForObjectItem(":SALOME*_QMenuBar", "Sketch"))
36 mouseClick(waitForObjectItem(":Sketch_QMenu", "Rotation"))
38 #[step] Select all object for rotation
39 mouseClick(waitForObject(":Rotation.Segments:_QListWidget"), 59, 66, 0, Qt.LeftButton)
40 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Shift>")
41 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 135, 116, 33554432, Qt.LeftButton)
42 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 447, 187, 33554432, Qt.LeftButton)
43 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 573, 209, 33554432, Qt.LeftButton)
45 #[step] Click on the viewer to select center of rotation
46 mouseClick(waitForObject(":Center of rotation.qt_spinbox_lineedit_QLineEdit"), 107, 8, 0, Qt.LeftButton)
47 sendEvent("QWheelEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 387, 328, -120, 0, 2)
48 sendEvent("QWheelEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 387, 328, -120, 0, 2)
49 sendEvent("QWheelEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 387, 328, -120, 0, 2)
50 sendEvent("QWheelEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 387, 325, -120, 0, 2)
51 sendEvent("QWheelEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 387, 325, -120, 0, 2)
52 sendEvent("QWheelEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 387, 325, -120, 0, 2)
53 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 605, 257, 0, Qt.LeftButton)
55 #[step] Input angle of rotation
56 mouseClick(waitForObject(":Rotation.qt_spinbox_lineedit_QLineEdit"), 146, 5, 0, Qt.LeftButton)
57 type(waitForObject(":Rotation.MultiRotationAngle_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
58 type(waitForObject(":Rotation.MultiRotationAngle_ModuleBase_ParamSpinBox"), 45)
60 #[step] Input number of copies
61 mouseClick(waitForObject(":Rotation.qt_spinbox_lineedit_QLineEdit_2"), 13, 5, 0, Qt.LeftButton)
62 type(waitForObject(":Rotation.MultiRotationCopies_QSpinBox"), "<Ctrl+A>")
63 type(waitForObject(":Rotation.MultiRotationCopies_QSpinBox"), 7)
65 mouseClick(waitForObject(":Rotation.Segments:_QListWidget"), 59, 66, 0, Qt.LeftButton)
67 #[step] Click Fit all button
70 #[check] Check that preview is updated
74 clickButton(waitForObject(":Rotation.property_panel_ok_QToolButton"))
76 #[check] Check that rotation has been executed successfully
79 # [step] Close application without saving