3 # [Scenario] Revolution_005
4 # [Topic] 'RevolutionFuse by planes and offsets' 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_005.hdf'
19 open(DATA_PATH + "/for_revolution_005.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 # [step] Execute RevolutionFuse operation
35 mouseClick(waitForObjectItem(":SALOME*_QMenuBar", "Features"))
36 mouseClick(waitForObjectItem(":_QMenu", "RevolutionFuse"))
38 # [step] Select sketch face
39 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 287, 236, 0, Qt.LeftButton)
41 # [step] Click "Set plane view" in property panel [vp PLANE]
42 clickButton(waitForObject(":Sketcher plane.Set plane view_QPushButton"))
45 # [step] Create 2 circles on the plane [vp CIRCLES]
46 activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Sketch"))
47 activateItem(waitForObjectItem(":Sketch_QMenu", "Circle"))
48 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 400, 340, 0, Qt.LeftButton)
49 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 400, 370, 0, Qt.LeftButton)
50 clickButton(waitForObject(":Boolean.property_panel_ok_QToolButton"))
52 activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Sketch"))
53 activateItem(waitForObjectItem(":Sketch_QMenu", "Circle"))
54 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 400, 130, 0, Qt.LeftButton)
55 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 400, 150, 0, Qt.LeftButton)
56 clickButton(waitForObject(":Boolean.property_panel_ok_QToolButton"))
60 # [step] Approve sketching
61 clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
63 # [step] Select axis for revolution
64 mouseClick(waitForObject(":Revolution_QLineEdit_2"), 10, 10, 0, Qt.LeftButton)
65 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 651, 219, 0, Qt.LeftButton)
67 # [step] Click 'Reset view' toolbar button [vp RESET]
68 clickButton(waitForObject(":SALOME*.Reset_QToolButton_2"))
69 mouseClick(waitForObject(":SALOME*_OCCViewer_ViewPort3d"), 10, 450, 0, Qt.LeftButton) # close tool bar extension bar
74 # [step] Select revolution method 'By planes'
76 clickButton(waitForObject(":Revolution_QToolButton_3"))
78 # [step] Select face 'To' (biggest one)
79 mouseClick(waitForObject(":To_QLineEdit_3"), 10, 10, 0, Qt.LeftButton)
80 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 463, 171, 0, Qt.LeftButton)
84 # [check] Check that preview is updated [vp PLANE_TO]
88 # [step] Define offset for face 'To'
89 mouseClick(waitForObject(":Revolution.qt_spinbox_lineedit_QLineEdit_3"), 10, 10, 0, Qt.LeftButton)
90 type(waitForObject(":To.to_offset_ModuleBase_ParamSpinBox_3"), "<Ctrl+A>")
91 type(waitForObject(":To.to_offset_ModuleBase_ParamSpinBox_3"), 30)
92 type(waitForObject(":To.to_offset_ModuleBase_ParamSpinBox_3"), "<Return>")
94 # [check] Check that preview is updated [vp PLANE_TO]
96 test.vp("PLANE_TO_30")
98 # [step] Select face 'From' (smallest one)
99 mouseClick(waitForObject(":From_QLineEdit_3"), 10, 10, 0, Qt.LeftButton)
100 sendEvent("QMouseEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), QEvent.MouseButtonPress, 504, 252, Qt.LeftButton, 1, 0)
101 sendEvent("QMouseEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), QEvent.MouseButtonRelease, 504, 252, Qt.LeftButton, 0, 0)
103 # [check] Check that preview is updated [vp PLANE_FROM]
105 test.vp("PLANE_FROM")
107 # [step] Define offset for face 'From'
108 mouseClick(waitForObject(":Revolution.qt_spinbox_lineedit_QLineEdit_4"), 38, 4, 0, Qt.LeftButton)
109 type(waitForObject(":From.from_offset_ModuleBase_ParamSpinBox_3"), "<Ctrl+A>")
110 type(waitForObject(":From.from_offset_ModuleBase_ParamSpinBox_3"), 45)
111 type(waitForObject(":From.from_offset_ModuleBase_ParamSpinBox_3"), "<Return>")
113 # [check] Check that preview is updated [vp PLANE_FROM_45]
115 test.vp("PLANE_FROM_45")
117 # [step] Apply the feature
118 clickButton(waitForObject(":RevolutionFuse.property_panel_ok_QToolButton"))
122 test.vp("REVOLUTION_FUSE")
124 # [step] Close application without saving