3 # [Scenario] Extrusion_006
4 # [Topic] 'Extrusion_cut by planes' 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_006.hdf'
19 open(DATA_PATH + "/for_extrusion_006.hdf")
21 # [step] Activate SHAPER
22 clickButton(waitForObject(":SALOME*.SHAPER_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"))
34 # [step] Features - ExtrusionCut
35 mouseClick(waitForObjectItem(":SALOME*_QMenuBar", "Features"))
36 mouseClick(waitForObjectItem(":_QMenu", "ExtrusionCut"))
38 # [step] Select the upper face for sketching
39 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 243, 171, 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] Draw closing contour, consisting from 4 lines
46 lines_create_in_view([(110, 150), (110, 320), (640, 320), (640, 150), (110, 155)])
48 # [check] Check that lines have been executed successfully [cp LINES]
53 clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
55 # [step] Select 'By planes and offsets' method
56 clickButton(waitForObject(":Extrusion_QToolButton_3"))
57 mouseClick(waitForObject(":To_QLineEdit_5"), 46, 15, 0, Qt.LeftButton)
59 # [step] Select Plane_1 as face 'To'
60 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 35, 220, 0, Qt.LeftButton)
62 # [check] Check that preview has been updated [cp PREVIEW]
67 clickButton(waitForObject(":ExtrusionCut.property_panel_ok_QToolButton"))
69 # [step] Click 'Reset view' toolbar button
70 clickButton(waitForObject(":SALOME*.Reset_QToolButton_2"))
71 mouseClick(waitForObject(":SALOME*_OCCViewer_ViewPort3d"), 10, 450, 0, Qt.LeftButton) # close tool bar extension bar
73 # [check] Check that extrusionCut operation has been executed successfully [vp EXTRUSION_FUSE]
74 test.vp("EXTRUSION_CUT")
76 # [step] Close application without saving