Salome HOME
Copyright update 2022
[modules/shaper.git] / src / SketchPlugin / doc / ellipseFeature.rst
1 .. |ellipse.icon|    image:: images/ellipse.png
2
3 Ellipse
4 =======
5
6 The feature Ellipse creates an ellipse in the current Sketch.
7
8 To add a new Ellipse to the Sketch:
9
10 #. select in the Main Menu *Sketch - > Ellipse* item  or
11 #. click |ellipse.icon| **Ellipse** button in Sketch toolbar:
12
13 There are 2 algorithms for creation of an Ellipse:
14
15 .. figure:: images/ellipse_cent_rad_32x32.png
16    :align: left
17    :height: 24px
18
19 **By center and major semi-axes and passing points** creates an ellipse with the given center passing through given points.
20
21 .. figure:: images/ellipse_axes_32x32.png
22    :align: left
23    :height: 24px
24
25 **By major axis and passing point** creates an ellipse passing through the given three points.
26
27 -------------------------------------------------------------------------------------------
28
29 By center and major semi-axes and passing points
30 """"""""""""""""""""""""""""""""""""""""""""""""
31
32 .. figure:: images/ellipse_panel_pt_rad.png
33    :align: center
34
35 Click in the view once to set the center point, then move the mouse and click to set a point of a first semi-axis, then again move the mouse to set a point of a second semi-axis.
36
37 **TUI Command**:
38
39 .. py:function:: Sketch_1.addEllipse(CenterX, CenterY, MajorAxisX, MajorAxisY, PassedX, PassedY, True)
40
41     :param real: Center X.
42     :param real: Center Y.
43     :param real: Major Axis X.
44     :param real: Major Axis Y.
45     :param real: Passed X.
46     :param real: Passed Y.
47     :param boolean: True mentions that the first coordinates define the center of the ellipse.
48     :return: Result object.
49
50 By major axis and passing point
51 """""""""""""""""""""""""""""""
52
53 .. figure:: images/ellipse_panel_3pt.png
54    :align: center
55
56 Click in the view once to set a first point of a first axis, then move the mouse and click to set a second point of the first axis, then again move the mouse to set a point of a second semi-axis.
57
58 **TUI Command**:
59
60 .. py:function:: Sketch_1.addEllipse(MajorAxisStartX, MajorAxisStartY, MajorAxisEndX, MajorAxisEndY, PassedX, PassedY, False)
61
62     :param real: Major Axis Start X.
63     :param real: Major Axis Start Y.
64     :param real: Major Axis End X.
65     :param real: Major Axis End Y.
66     :param real: Passed X.
67     :param real: Passed Y.
68     :param boolean: False mentions that the first coordinates define the start point of major axis of the ellipse.
69     :return: Result object.
70
71 Result
72 """"""
73
74 Created ellipse appears in the view.
75
76 .. figure:: images/ellipse_result.png
77    :align: center
78
79    Ellipse created
80
81
82 **See Also** a sample TUI Script of :ref:`tui_create_ellipse` operation.