+# Copyright (C) 2014-2024 CEA, EDF
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
def sketch_circle():
circle_create((0, 0), 300)
def main():
source(findFile("scripts", "common.py"))
-
+
startApplication("salome_run.sh")
set_defaults()
-
- activate_newgeom()
-
+
+ activate_SHAPER()
+
sketch_create(help_points("XY_plane"), lambda: sketch_circle())
sketch_create(help_points("XY_plane"), lambda: sketch_lines())
-
+ test.vp("VP_SKETCHES")
+
part_create()
#[step] Create circle sketch
extrusion((299, 159), 10, 0)
#[step] Create V-shape sketch
extrusion((642, 176), 10, 0)
+
+ test.vp("VP_EXTRUSIONS")
+
#[step] Create plane: inner right for V-shape
activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Construction"))
activateItem(waitForObjectItem(":_QMenu", "Plane"))
mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 305, 263, -2, -165, 67108866, Qt.RightButton)
mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 651, 229, 0, Qt.LeftButton)
clickButton(waitForObject(":Plane.property_panel_ok_QToolButton"))
+ test.vp("VP_INNER_RIGHT_PLANE")
+
#[step] Create plane: outer right for V-shape
activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Construction"))
activateItem(waitForObjectItem(":_QMenu", "Plane"))
type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 515, 402, -7, -305, 67108866, Qt.RightButton)
clickButton(waitForObject(":Plane.property_panel_ok_QToolButton"))
-
+ test.vp("VP_OUTER_RIGHT_PLANE")
+
#[step] Activate Partition feature
activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Features"))
activateItem(waitForObjectItem(":_QMenu", "Partition"))
mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 639, 210, 33554432, Qt.LeftButton)
type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Control>")
mouseDrag(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 567, 436, -11, -351, 67108866, Qt.RightButton)
+
#[step] Apply Partition
clickButton(waitForObject(":Partition.property_panel_ok_QToolButton"))
-
+
test.vp("VP_PARTITION")
close_application()