3 #[Scenario] Revolution_005
4 #[Topic] 'RevolutionFuse by planes and offsets' functionality
5 #[Tested functionality]
10 source(findFile("scripts", "common.py"))
12 #[section] Application start
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"))
33 #[step] Execute RevolutionFuse operation
34 mouseClick(waitForObjectItem(":SALOME*_QMenuBar", "Features"))
35 mouseClick(waitForObjectItem(":_QMenu", "RevolutionFuse"))
37 #[step] Select sketch face
38 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 287, 236, 0, Qt.LeftButton)
40 # [step] Create 2 circles
41 circle_create_in_view((523, 154), (539, 168))
42 circle_create_in_view((528, 340), (537, 351))
44 #[step] Approve sketching
45 clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
47 #[step] Select axis for revolution
48 mouseClick(waitForObject(":Revolution_QLineEdit_2"), 128, 12, 0, Qt.LeftButton)
49 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 652, 257, 0, Qt.LeftButton)
51 #[step] Rotate the model
52 clickButton(waitForObject(":Revolution_QToolButton_3"))
53 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
54 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 456, 470, -61, -138, 67108866, Qt.RightButton)
55 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 497, 341, -56, -2, 67108868, Qt.MidButton)
60 # [step] Select face 'To'
61 mouseClick(waitForObject(":To_QLineEdit_3"), 30, 8, 0, Qt.LeftButton)
63 sendEvent("QMouseEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), QEvent.MouseButtonPress, 694, 187, Qt.LeftButton, 1, 0)
64 sendEvent("QMouseEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), QEvent.MouseButtonRelease, 694, 187, Qt.LeftButton, 0, 0)
69 #[check] Check that preview is updated
72 #[step] Define offset for face 'To'
73 mouseClick(waitForObject(":Revolution.qt_spinbox_lineedit_QLineEdit_3"), 34, 9, 0, Qt.LeftButton)
74 type(waitForObject(":To.to_offset_ModuleBase_ParamSpinBox_3"), "<Ctrl+A>")
75 type(waitForObject(":To.to_offset_ModuleBase_ParamSpinBox_3"), 30)
80 #[check] Check that preview is updated
83 #[step] Select face 'From'
84 mouseClick(waitForObject(":From_QLineEdit_3"), 28, 11, 0, Qt.LeftButton)
86 #[step] Click '-OX' button
87 clickButton(waitForObject(":SALOME*.-OX_QToolButton"))
88 sendEvent("QMouseEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), QEvent.MouseButtonPress, 441, 217, Qt.LeftButton, 1, 0)
89 sendEvent("QMouseEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), QEvent.MouseButtonRelease, 441, 217, Qt.LeftButton, 0, 0)
91 #[step] Rotate the model
92 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
93 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 576, 380, -99, -156, 67108866, Qt.RightButton)
98 #[check] Check that preview is updated
101 #[step] Define offset for face 'From'
102 mouseClick(waitForObject(":Revolution.qt_spinbox_lineedit_QLineEdit_4"), 38, 4, 0, Qt.LeftButton)
103 type(waitForObject(":From.from_offset_ModuleBase_ParamSpinBox_3"), "<Ctrl+A>")
104 type(waitForObject(":From.from_offset_ModuleBase_ParamSpinBox_3"), 45)
106 #[check] Check that preview is updated
109 #[step] Approve sketching
110 clickButton(waitForObject(":RevolutionFuse.property_panel_ok_QToolButton"))
112 #[step] Rotate the model
113 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
114 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 103, 388, 309, -313, 67108866, Qt.RightButton)
115 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 512, 266, -75, 52, 67108866, Qt.RightButton)
116 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 555, 60, 33, 113, 67108868, Qt.MidButton)
117 clickButton(waitForObject(":SALOME*.Fit All_QToolButton"))
122 # [step] Close application without saving