6 #[Topic] 'Distance' constraint
7 #[Tested functionality]
12 source(findFile("scripts", "common.py"))
14 #[section] Application start
16 startApplication("salome_run.sh")
20 #[step] Open 'for_sketch_004.hdf'
21 open(os.path.join(DATA_PATH, "for_sketch_004.hdf"))
23 #[step] Activate NewGeom
24 clickButton(waitForObject(":SALOME 7.6.0.NewGeom_QToolButton"))
26 #[step] Activate Part_1
27 waitForObjectItem(":Object browser_XGUI_DataTree_2", "Part\\_1")
28 clickItem(":Object browser_XGUI_DataTree_2", "Part\\_1", 51, 7, 0, Qt.LeftButton)
29 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree_2"), "Part\\_1", 51, 7, 0)
30 activateItem(waitForObjectItem(":_QMenu", "Activate"))
33 waitForObjectItem(":Object browser_XGUI_DataTree_2", "Part\\_1.Sketch\\_1")
34 clickItem(":Object browser_XGUI_DataTree_2", "Part\\_1.Sketch\\_1", 54, 11, 0, Qt.LeftButton)
35 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree_2"), "Part\\_1.Sketch\\_1", 54, 11, 0)
36 activateItem(waitForObjectItem(":_QMenu", "Edit..."))
38 #[step] Click '+OY' view button
39 clickButton(waitForObject(":SALOME*.+OY_QToolButton"))
41 #[step] Set constraint 'Distance' between circle and point
42 distance((44, 224), (601, 259), (561, 195))
43 #[check] Check that constraint has been set
45 #[step] Change distance to 500
46 change_distance((324, 176), 500)
47 #[check] Check that distance is 500
49 #[step] Delete constraint
50 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 302, 270, 0, Qt.LeftButton)
51 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 326, 181, 0, Qt.LeftButton)
52 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Del>")
53 #[check] Check that constraint has been removed
55 #[step] Close application