5 #[Topic] Perpendicular lines
6 #[Tested functionality] 'Perpendicular' constraint
11 source(findFile("scripts", "common.py"))
13 #[section] Application start
15 startApplication("salome_run.sh")
19 #[step] Open 'for_sketch_006.hdf'
20 open(DATA_PATH + "/for_sketch_007.hdf")
22 #[step] Activate NewGeom
23 clickButton(waitForObject(":SALOME*.NewGeom_QToolButton"))
25 #[step] Activate Part_1
26 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)")
27 clickItem(":Object browser_XGUI_DataTree", "Part\\_1 (Not loaded)", 51, 7, 0, Qt.LeftButton)
28 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1 (Not loaded)", 51, 7, 0)
29 activateItem(waitForObjectItem(":_QMenu", "Activate"))
32 waitForObjectItem(":Object browser_XGUI_DataTree", "Part\\_1.Sketch\\_1")
33 clickItem(":Object browser_XGUI_DataTree", "Part\\_1.Sketch\\_1", 54, 11, 0, Qt.LeftButton)
34 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Part\\_1.Sketch\\_1", 54, 11, 0)
35 activateItem(waitForObjectItem(":_QMenu", "Edit..."))
37 #[step] Click '+OZ' view button
38 clickButton(waitForObject(":SALOME*.+OZ_QToolButton"))
39 #[step] Make lines perpendicular
40 perpendicular((331, 155), (386, 169))
43 clickButton(waitForObject(":SALOME*.Fit All_QToolButton"))
45 #[check] that lines are perpendicular
48 #[step] Select the 'perpendicular' icon near the line
49 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 372, 263, 0, Qt.LeftButton)
51 #[check] Check that Input panel 'Perpendicular' appears, there are the names of lines in text boxes
52 waitFor("object.exists(':Perpendicular.First line_QLineEdit')", 20000)
53 test.compare(str(findObject(":Perpendicular.First line_QLineEdit").text), "SketchLine_1")
54 waitFor("object.exists(':Perpendicular.Second line_QLineEdit')", 20000)
55 test.compare(str(findObject(":Perpendicular.Second line_QLineEdit").text), "SketchLine_2")
57 # [check] Check that lines are selected and highlighted in viewer
60 #[step] Confirm 'Perpendicular' operation
61 clickButton(waitForObject(":Perpendicular.property_panel_ok_QToolButton"))
63 #[step] Confirm edition of the sketch
64 clickButton(waitForObject(":Sketch.property_panel_ok_QToolButton"))
66 #[step] Close application