1 ## Copyright (C) 2014-2017 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
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
22 circle_create((0, 0), 300)
25 clickButton(waitForObject(":SALOME*.Line_QToolButton"))
26 points = [(647, 441), (419, 214), (725, 140), (578, 243), (647, 441)]
28 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), point[0], point[1], 0, Qt.LeftButton)
31 source(findFile("scripts", "common.py"))
33 startApplication("salome_run.sh")
38 sketch_create(help_points("XY_plane"), lambda: sketch_circle())
39 sketch_create(help_points("XY_plane"), lambda: sketch_lines())
40 test.vp("VP_SKETCHES")
44 #[step] Create circle sketch
45 extrusion((299, 159), 10, 0)
46 #[step] Create V-shape sketch
47 extrusion((642, 176), 10, 0)
49 test.vp("VP_EXTRUSIONS")
51 #[step] Create plane: inner right for V-shape
52 activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Construction"))
53 activateItem(waitForObjectItem(":_QMenu", "Plane"))
54 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
55 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 305, 263, -2, -165, 67108866, Qt.RightButton)
56 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 651, 229, 0, Qt.LeftButton)
57 clickButton(waitForObject(":Plane.property_panel_ok_QToolButton"))
58 test.vp("VP_INNER_RIGHT_PLANE")
60 #[step] Create plane: outer right for V-shape
61 activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Construction"))
62 activateItem(waitForObjectItem(":_QMenu", "Plane"))
63 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
64 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 467, 171, -6, 319, 67108866, Qt.RightButton)
65 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 641, 209, 0, Qt.LeftButton)
66 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
67 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 515, 402, -7, -305, 67108866, Qt.RightButton)
68 clickButton(waitForObject(":Plane.property_panel_ok_QToolButton"))
69 test.vp("VP_OUTER_RIGHT_PLANE")
71 #[step] Activate Partition feature
72 activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Features"))
73 activateItem(waitForObjectItem(":_QMenu", "Partition"))
74 #[step] Select circle and V-shape
75 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 304, 293, 0, Qt.LeftButton)
76 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Shift>")
77 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 541, 265, 33554432, Qt.LeftButton)
78 #[step] Select inner right and outer right V-shape planes
79 mouseClick(waitForObject(":Partition.Tool object_QListWidget"), 201, 90, 0, Qt.LeftButton)
80 type(waitForObject(":Partition.Tool object_QListWidget"), "<Shift>")
81 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 667, 217, 33554432, Qt.LeftButton)
82 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
83 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 655, 270, 8, 353, 67108866, Qt.RightButton)
84 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Shift>")
85 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 639, 210, 33554432, Qt.LeftButton)
86 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
87 mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 567, 436, -11, -351, 67108866, Qt.RightButton)
89 #[step] Apply Partition
90 clickButton(waitForObject(":Partition.property_panel_ok_QToolButton"))
92 test.vp("VP_PARTITION")