Salome HOME
Merge branch 'python_parametric_api' of https://git.salome-platform.org/git/modules...
[modules/shaper.git] / test.squish / suite_FEATURE_SKETCH / tst_sketch_005 / test.py
1 def sketch():
2     #[step] Click 'Create sketch' toolbar button
3     #[step] Select XY plane for sketching
4     #[step] Sketch - Point
5     #[step] Create point via clicking inside viewer 
6     point_create_in_view((340, 205))
7     #[step] Check 'Auxiliary' check-box
8     #[step] Create point via clicking inside viewer
9     point_create_in_view((489, 380), 1) 
10     #[step] Finish creation of points via viewer
11     #[step] Create point via direct input of coordinates. Use coordinates (50, 60)
12     point_create((80, 160))
13     #[step] Check 'Auxiliary' check-box
14     #[step] Create point via direct input of coordinates. Use coordinates (150, 60)
15     point_create((250, 50), 1)
16     #[step] Fix positions of 2 points
17     point_fixe((340, 205))
18     point_fixe((504, 227))
19     #[check] Check that 2 points have 'anchor' icons near themselves
20     test.vp("VP1")
21     #[step] Define distance between fixed and free points
22     distance((340, 205), (490, 381), (201, 320))
23     # [step] Change distance set
24     change_distance((275, 407), 200)
25     # [step] Check that distance has been modified, free point moved
26     test.vp("VP3")
27
28 def main():
29     
30     # [project] NewGEOM
31     # [Scenario] Sketch_005
32     #[Topic] Fixed point
33     #[Tested functionality] 
34     #[Summary description]
35     #[Expected results] 
36     
37     source(findFile("scripts", "common.py"))
38     #[section] Application start
39     #[step] Launch SALOME
40     startApplication("salome_run.sh")
41
42     set_defaults()
43     
44     #[step] Activate NewGeom
45     #[step]Click 'New' button
46     activate_newgeom()
47     
48     #[section] Creation of sketch and objects inside it
49     #[step] Part - New part
50     part_create()
51
52     sketch_create(help_points("XY_plane"), lambda: sketch())
53
54     #[step] Close application without saving
55     close_application()