3 # [Scenario] Extrusion_002
4 # [Topic] 'Extrusion by boarding 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_extrusion_001.hdf'
19 open(DATA_PATH + "/for_extrusion_002.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)", 48, 10, 0, Qt.LeftButton)
27 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1 (Not loaded)", 48, 10, 0)
28 activateItem(waitForObjectItem(":_QMenu", "Activate"))
34 # [step] Execute extrusion for sketch_1
35 mouseClick(waitForObjectItem(":SALOME*_QMenuBar", "Features"))
36 mouseClick(waitForObjectItem(":_QMenu", "Extrusion"))
38 # [step] Select sketch_1 as base
39 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 324, 222, 0, Qt.LeftButton)
41 # [step] Select 'By boarding planes and offsets' button
42 clickButton(waitForObject(":Extrusion_QToolButton"))
44 # [check] Check that no result is previewed [vp NO_PREVIEW]
48 # [step] Select upper face as face 'To'
49 mouseClick(waitForObject(":Extrusion.Select a sketch face_QListWidget"), 80, 47, 0, Qt.LeftButton)
50 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 350, 231, 0, Qt.LeftButton)
51 mouseClick(waitForObject(":To_QLineEdit"), 31, 11, 0, Qt.LeftButton)
52 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 369, 87, 0, Qt.LeftButton)
54 # [check] Check that preview is updated [vp PREVIEW_TO]
58 # [step] Select lower face as face 'From'
59 mouseClick(waitForObject(":From_QLineEdit"), 80, 11, 0, Qt.LeftButton)
60 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 350, 413, 0, Qt.LeftButton)
62 # [check] Check that preview is updated [vp PREVIEW_FROM]
63 test.vp("PREVIEW_FROM")
65 # [step] Define offset for face 'To'
66 type(waitForObject(":To.to_offset_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
67 type(waitForObject(":To.to_offset_ModuleBase_ParamSpinBox"), 200)
68 type(waitForObject(":To.to_offset_ModuleBase_ParamSpinBox"), "<Return>")
73 # [check] Check that preview is updated [vp PREVIEW_TO_OFFSET]
74 test.vp("PREVIEW_TO_OFFSET")
76 # [step] Define offset for face 'From'
77 type(waitForObject(":From.from_offset_ModuleBase_ParamSpinBox"), "<Ctrl+A>")
78 type(waitForObject(":From.from_offset_ModuleBase_ParamSpinBox"), 200)
79 type(waitForObject(":From.from_offset_ModuleBase_ParamSpinBox"), "<Return>")
84 # [check] Check that preview is updated [vp PREVIEW_FROM_OFFSET]
85 test.vp("PREVIEW_FROM_OFFSET")
88 clickButton(waitForObject(":Extrusion.property_panel_ok_QToolButton"))
93 # [check] Check that extrusion is built [vp EXTRUSION]
96 # [step] Close application without saving