3 # [Scenario] Revolution_003
4 # [Topic] 'RevolutionCut by angles' functionality
5 # [Tested functionality]
6 # [Summary description]
10 source(findFile("scripts", "common.py"))
12 # [section] Application start
13 # [step] Launch SALOME
14 startApplication("salome_run.sh")
18 # [step] Open 'for_revolution_003.hdf'
19 open(DATA_PATH + "/for_revolution_003.hdf")
21 # [step] Activate NewGeom
22 clickButton(waitForObject(":SALOME*.NewGeom_QToolButton"))
24 # [step] Activate Part_1
25 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)")
26 clickItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)", 71, 10, 0, Qt.LeftButton)
27 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1 (Not loaded)", 70, 9, 0)
28 activateItem(waitForObjectItem(":_QMenu", "Activate"))
30 # [step] Fit all [vp INIT]
34 # TODO(spo): remove: workaround for the bug given RevolutionCut sketch created when select axis_object then apply is disabled
35 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Sketch\\_1")
36 clickItem(":Object browser_XGUI_DataTree", "Part\\_1.Sketch\\_1", 10, 10, 0, Qt.LeftButton)
37 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1.Sketch\\_1", 10, 10, 0)
38 activateItem(waitForObjectItem(":_QMenu", "Edit..."))
39 clickButton(waitForObject(":Boolean.property_panel_ok_QToolButton"))
41 # [step] Execute RevolutionCut operation
42 mouseClick(waitForObjectItem(":SALOME*_QMenuBar", "Features"))
43 mouseClick(waitForObjectItem(":_QMenu", "RevolutionCut"))
45 # [step] Select sketch face
46 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 287, 236, 0, Qt.LeftButton)
48 # [step] Click "Set plane view" in property panel [vp PLANE]
49 clickButton(waitForObject(":Sketcher plane.Set plane view_QPushButton"))
52 # [step] Create 2 circles on the plane [vp CIRCLES]
53 activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Sketch"))
54 activateItem(waitForObjectItem(":Sketch_QMenu", "Circle"))
55 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 650, 350, 0, Qt.LeftButton)
56 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 690, 350, 0, Qt.LeftButton)
57 clickButton(waitForObject(":Boolean.property_panel_ok_QToolButton"))
59 activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Sketch"))
60 activateItem(waitForObjectItem(":Sketch_QMenu", "Circle"))
61 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 650, 110, 0, Qt.LeftButton)
62 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 700, 110, 0, Qt.LeftButton)
63 clickButton(waitForObject(":Boolean.property_panel_ok_QToolButton"))
67 # [step] Approve sketching
68 clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
70 # [step] Select axis for revolution
71 mouseClick(waitForObject(":Revolution_QLineEdit_3"), 10, 10, 0, Qt.LeftButton)
72 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 750, 237, 0, Qt.LeftButton)
74 # [step] Define angle 'To'
75 mouseClick(waitForObject(":Revolution.qt_spinbox_lineedit_QLineEdit_5"), 10, 10, 0, Qt.LeftButton)
76 type(waitForObject(":Revolution.to_angle_ModuleBase_ParamSpinBox_3"), "<Ctrl+A>")
77 type(waitForObject(":Revolution.to_angle_ModuleBase_ParamSpinBox_3"), 90)
79 # [step] Define angle 'From'
80 mouseClick(waitForObject(":Revolution.qt_spinbox_lineedit_QLineEdit_6"), 10, 10, 0, Qt.LeftButton)
81 type(waitForObject(":Revolution.from_angle_ModuleBase_ParamSpinBox_3"), "<Ctrl+A>")
82 type(waitForObject(":Revolution.from_angle_ModuleBase_ParamSpinBox_3"), 90)
83 type(waitForObject(":Revolution.from_angle_ModuleBase_ParamSpinBox_3"), "<Return>")
85 # [step] Apply the feature
86 clickButton(waitForObject(":RevolutionCut.property_panel_ok_QToolButton"))
88 # [step] Click 'Reset view' toolbar button
89 clickButton(waitForObject(":SALOME*.Reset_QToolButton_2"))
90 mouseClick(waitForObject(":SALOME*_OCCViewer_ViewPort3d"), 10, 450, 0, Qt.LeftButton) # close tool bar extension bar
92 # [check] Check that operation has been executed successfully
93 test.vp("REVOLUTION_CUT")
95 # [step] Close application without saving