]> SALOME platform Git repositories - modules/shaper.git/blob - test.squish/suite_ISSUES_SALOME/tst_revolution_005/test.py
Salome HOME
Fix suite_ISSUES/tst_PARALLEL_2 for CentOS
[modules/shaper.git] / test.squish / suite_ISSUES_SALOME / tst_revolution_005 / test.py
1 def main():
2     #[project] NewGEOM
3     #[Scenario] Revolution_005
4     #[Topic] 'RevolutionFuse by planes and offsets' functionality
5     #[Tested functionality] 
6     #[Summary description]
7     #[Expected results]
8     #[General comments]
9     
10     source(findFile("scripts", "common.py"))
11     
12     #[section] Application start
13     #[step] Launch SALOME
14     startApplication("salome_run.sh")
15
16     set_defaults()
17     
18     #[step] Open 'for_revolution_005.hdf'
19     open(DATA_PATH + "/for_revolution_005.hdf")
20     
21     #[step] Activate NewGeom
22     clickButton(waitForObject(":SALOME*.NewGeom_QToolButton"))
23     
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"))
29     
30     #[step] Fit all
31     fit_all()
32     
33     #[step] Execute RevolutionFuse operation
34     mouseClick(waitForObjectItem(":SALOME*_QMenuBar", "Features"))
35     mouseClick(waitForObjectItem(":_QMenu", "RevolutionFuse"))
36     
37     #[step] Select sketch face
38     mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 287, 236, 0, Qt.LeftButton)
39     
40     # [step] Create 2 circles
41     circle_create_in_view((523, 154), (539, 168))
42     circle_create_in_view((528, 340), (537, 351))
43     
44     #[step] Approve sketching
45     clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
46     
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)
50     
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)
56     
57     #[step] Fit all
58     fit_all()
59
60     # [step] Select face 'To' 
61     mouseClick(waitForObject(":To_QLineEdit_3"), 30, 8, 0, Qt.LeftButton)
62     snooze(1)
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)
65
66     #[step] Fit all
67     fit_all()
68     
69     #[check] Check that preview is updated
70     test.vp("VP1")
71     
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)
76
77     #[step] Fit all
78     fit_all()
79     
80     #[check] Check that preview is updated
81     test.vp("VP2")
82     
83     #[step] Select face 'From'
84     mouseClick(waitForObject(":From_QLineEdit_3"), 28, 11, 0, Qt.LeftButton)
85
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)
90     
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)
94     
95     #[step] Fit all
96     fit_all()
97     
98     #[check] Check that preview is updated
99     test.vp("VP3")
100     
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)
105
106     #[check] Check that preview is updated
107     test.vp("VP4")
108     
109     #[step] Approve sketching    
110     clickButton(waitForObject(":RevolutionFuse.property_panel_ok_QToolButton"))
111     
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"))
118
119     #[step] Fit all
120     fit_all()
121
122     # [step] Close application without saving
123     close_application()