1 # Copyright (C) 2014-2019 CEA/DEN, EDF R&D
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 #[step] Click 'Create sketch' toolbar button
22 #[step] Select XY plane for sketching
23 #[step] Sketch - Point
24 #[step] Create point via clicking inside viewer
25 point_create_in_view((329, 255))
26 #[step] Check 'Auxiliary' check-box
27 #[step] Create point via clicking inside viewer
28 point_create_in_view((429, 300), 1)
29 #[step] Finish creation of points via viewer
30 #[step] Create point via direct input of coordinates. Use coordinates (50, 60)
31 point_create((50, 60))
32 #[step] Check 'Auxiliary' check-box
33 #[step] Create point via direct input of coordinates. Use coordinates (150, 60)
34 point_create((150, 60), 1)
35 #[step] Finish creation of points
37 #[step] Create line via direct input of coordinates. Use coordinates (0, 0) for start point and (100, 100) - for end point
38 line_create((0,0), (100, 100))
39 #[step] Check 'Auxiliary' check-box
40 #[step] Create line via direct input of coordinates. Use coordinates (100, 100) for start point and (100, 100) - for end point
41 line_create((100, 100), (200, 200), 1)
42 #[step] Create line via clicking inside viewer
43 line_create_in_view((400, 200), (600, 150))
44 #[step] Check 'Auxiliary' check-box
45 #[step] Create line via clicking inside viewer
46 line_create_in_view((600, 150), (500, 450), 1)
47 #[step] Finish creation of lines
48 #[step] Sketch - Circle
49 #[step] Create circle via direct input of coordinates. Use coordinates (0, 0) for center and 200 - for radius
50 circle_create((0, 0), 200)
51 #[step] Check 'Auxiliary' check-box
52 #[step] Create circle via direct input of coordinates. Use coordinates (0, 0) for center and 300 - for radius
53 circle_create((0, 0), 300, 1)
54 #[step] Create circle via clicking inside viewer
55 circle_create_in_view((400, 200), (260, 0))
56 #[step] Check 'Auxiliary' check-box
57 #[step] Create circle via clicking inside viewer
58 circle_create_in_view((400, 200), (300, 100), 1)
59 #[step] Finish creation of circles
61 #[step] Create arc via direct input of coordinates. Use coordinates (0, 0) for center, (100, 50) - for start point and (80, 90) - for end point
62 arc_create((0, 0), (100, 50), (80, 90))
63 #[step] Check 'Auxiliary' check-box
64 #[step] Create arc via direct input of coordinates. Use coordinates (0, 0) for center, (200, 50) - for start point and (80, 90) - for end point
65 arc_create((0, 0), (200, 50), (80, 90), 1)
66 #[step] Create arc via clicking inside viewer
67 arc_create_in_view((218, 183), (102, 135), (128, 271))
68 #[step] Check 'Auxiliary' check-box
69 #[step] Create arc via clicking inside viewer
70 arc_create_in_view((203, 185), (51, 134), (104, 282), 1)
71 #[step] CLick 'Fit all' button
72 clickButton(waitForObject(":SALOME*.Fit All_QToolButton"))
73 #[check] All objects have been created. Check that objects of both types are shown (main and auxiliary)
75 #[step] Finish sketching
79 source(findFile("scripts", "common.py"))
82 # [Scenario] Sketch_001
83 #[Topic] Creation of objects in sketch
84 #[Tested functionality] Creation of objects during sketching by 2 ways: direct input of coordinates and clicking in viewer. Creation of auxiliary objects
85 #[Summary description]
88 #[section] Application start
90 startApplication("salome_run.sh")
94 #[step] Activate SHAPER
95 #[step]Click 'New' button
98 #[section] Creation of sketch and objects inside it
99 #[step] Part - New part
101 # clickButton(waitForObject(":Arc.Auxiliary_QCheckBox"))
103 sketch_create(help_points("XY_plane"), lambda: sketch())
104 #[check] Check that only main objects are shown
106 #[step] Close application without saving
107 close_application_wo_saving()