]> SALOME platform Git repositories - modules/shaper.git/blob - test.squish/suite_FEATURE_SKETCH/tst_sketch_005/test.py
Salome HOME
Merge branch 'master' into cgt/devCEA
[modules/shaper.git] / test.squish / suite_FEATURE_SKETCH / tst_sketch_005 / test.py
1 ## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 ##
3 ## This library is free software; you can redistribute it and/or
4 ## modify it under the terms of the GNU Lesser General Public
5 ## License as published by the Free Software Foundation; either
6 ## version 2.1 of the License, or (at your option) any later version.
7 ##
8 ## This library is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 ## Lesser General Public License for more details.
12 ##
13 ## You should have received a copy of the GNU Lesser General Public
14 ## License along with this library; if not, write to the Free Software
15 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 ##
17 ## See http:##www.salome-platform.org/ or
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 ##
20
21 def sketch():
22     #[step] Click 'Create sketch' toolbar button
23     #[step] Select XY plane for sketching
24     #[step] Sketch - Point
25     #[step] Create point via clicking inside viewer
26     point_create_in_view((340, 205))
27     #[step] Check 'Auxiliary' check-box
28     #[step] Create point via clicking inside viewer
29     point_create_in_view((489, 380), 1)
30     #[step] Finish creation of points via viewer
31     #[step] Create point via direct input of coordinates. Use coordinates (50, 60)
32     point_create((80, 160))
33     #[step] Check 'Auxiliary' check-box
34     #[step] Create point via direct input of coordinates. Use coordinates (150, 60)
35     point_create((250, 50), 1)
36     #[step] Fix positions of 2 points
37     point_fixe((340, 205))
38     point_fixe((504, 227))
39     #[check] Check that 2 points have 'anchor' icons near themselves
40     test.vp("VP1")
41     #[step] Define distance between fixed and free points
42     distance((340, 205), (490, 381), (201, 320))
43     # [step] Change distance set
44     change_distance((275, 407), 200)
45     # [step] Check that distance has been modified, free point moved
46     test.vp("VP3")
47
48 def main():
49
50     # [project] SHAPER
51     # [Scenario] Sketch_005
52     #[Topic] Fixed point
53     #[Tested functionality]
54     #[Summary description]
55     #[Expected results]
56
57     source(findFile("scripts", "common.py"))
58     #[section] Application start
59     #[step] Launch SALOME
60     startApplication("salome_run.sh")
61
62     set_defaults()
63
64     #[step] Activate SHAPER
65     #[step]Click 'New' button
66     activate_SHAPER()
67
68     #[section] Creation of sketch and objects inside it
69     #[step] Part - New part
70     part_create()
71
72     sketch_create(help_points("XY_plane"), lambda: sketch())
73
74     #[step] Close application without saving
75     close_application()