Salome HOME
Merge branch 'task_5_2_4' into CEA_2019
[modules/shaper.git] / src / SketchPlugin / doc / arcFeature.rst
1 .. |arc.icon|    image:: images/arc.png
2
3 Arc
4 ===
5
6 Arc feature creates an arc segment in the current Sketch.
7
8 To add a new Arc to the Sketch:
9
10 #. select in the Main Menu *Sketch - > Arc* item  or
11 #. click |arc.icon| **Arc** button in Sketch toolbar:
12
13 There are 4 algorithms for creation of an Arc:
14
15 .. image:: images/arc_base_32x32.png
16    :align: left
17 **By center and two points** creates an arc segment with the given center passing from the start point to the end point on the circle.
18
19 .. image:: images/arc_3pt_32x32.png
20    :align: left
21 **By three points** creates an arc segment passing from the start point to end point through another point on the circle.
22
23 .. image:: images/arc_tang_32x32.png
24    :align: left
25 **By tangent point and end point** creates an arc segment with the tangent point and the end point.
26
27 .. image:: images/arc_perp_32x32.png
28    :align: left
29 **By transversal point and end point** creates an arc segment perpendicular to a straight line with the start point, connected with boundary of this line, and the end point.
30
31 By center and two points
32 """"""""""""""""""""""""
33
34 .. image:: images/Arc_panel_base.png
35    :align: center
36
37 Click in the view once to set the center point, then move the mouse and click a second time to set the start point
38 and finally move the mouse and click a third time to set the last passed point.
39
40 - When entering a center or start point by selecting either a point or a segment, a Coincident constraint is created.
41 - When entering an end point by selecting a segment, a Coincident constraint is created.
42 - When entering an end point, only segments are selectable.
43
44 **TUI Command**:
45
46 .. py:function:: Sketch_1.addArc(CenterX, CenterY, StartX, StartY, EndX, EndY, Inversed)
47
48     :param real: Center X.
49     :param real: Center Y.
50     :param real: Start X.
51     :param real: Start Y.
52     :param real: End X.
53     :param real: End Y.
54     :param boolean: Is inversed.
55     :return: Result object.
56
57 By three points
58 """""""""""""""
59
60 .. image:: images/Arc_panel_3pt.png
61    :align: center
62
63 Click in the view once to set the start point, then move the mouse and click a second time to set the end point
64 and finally move the mouse and click a third time to set the passed point.
65
66 - When entering a start or end point by selecting either a point or a segment, a Coincident constraint is created.
67 - When entering a passing point by selecting a point, a Coincident constraint is created.
68 - When entering a passing point by selecting a segment, a Tangent constraint is created.
69
70 **TUI Command**:
71
72 .. py:function:: Sketch_1.addArc(StartX, StartY, EndX, EndY, PassedX, PassedY)
73
74     :param real: Start X.
75     :param real: Start Y.
76     :param real: End X.
77     :param real: End Y.
78     :param real: Passed X.
79     :param real: Passed Y.
80     :return: Result object.
81
82 By tangent point and point
83 """"""""""""""""""""""""""
84
85 .. image:: images/Arc_panel_tang.png
86    :align: center
87
88 Select a point on segment in the view to set the tangent point, then move the mouse and click to set the end point.
89 The tangent point by itself is a start point. The edge on which it lies will be tangent to the arc.
90
91 - When entering a tangent point by selecting a point on segment, a Tangent constraint is created.
92 - When entering an end point by selecting a segment, a Coincident constraint is created.
93 - When entering an end point, only segments are selectable.
94
95 **TUI Command**:
96
97 .. py:function:: Sketch_1.addArc(TangentPoint, EndX, EndY, Inversed)
98
99     :param object: Tangent Point.
100     :param real: End X.
101     :param real: End Y.
102     :param boolean: Is inversed.
103     :return: Result object.
104
105 By transveral point and point
106 """""""""""""""""""""""""""""
107
108 .. image:: images/Arc_panel_perp.png
109    :align: center
110
111 Select a point on a straight segment in the view to set the transversal point, then move the mouse and click to set the end point.
112 The transversal point by itself is a start point. The edge on which it lies will be perpendicular to the arc (the center of the arc is lying on the edge).
113
114 - When entering a transversal point by selecting a point on segment, a Perpendicular constraint is created.
115 - When entering an end point by selecting a segment, a Coincident constraint is created.
116 - When entering an end point, only segments are selectable.
117
118 **TUI Command**:
119
120 .. py:function:: Sketch_1.addArc(TransversalPoint, EndX, EndY, Inversed, True)
121
122     :param object: Transversal Point.
123     :param real: End X.
124     :param real: End Y.
125     :param boolean: Is inversed.
126     :param boolean: Arc is transversal (always True).
127     :return: Result object.
128
129 Result
130 """"""
131
132 Created arc appears in the view.
133
134 .. image:: images/Arc_res.png
135            :align: center
136
137 .. centered::
138    Circle created
139
140 **See Also** a sample TUI Script of :ref:`tui_create_arc` operation.