Salome HOME
Correct documentation bugs, adapt for 'Read The Docs' theme (bos #18858)
[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    :height: 24px
18
19 **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.
20
21 .. image:: images/arc_3pt_32x32.png
22    :align: left
23    :height: 24px
24
25 **By three points** creates an arc segment passing from the start point to end point through another point on the circle.
26
27 .. image:: images/arc_tang_32x32.png
28    :align: left
29    :height: 24px
30
31 **By tangent point and end point** creates an arc segment with the tangent point and the end point.
32
33 .. image:: images/arc_perp_32x32.png
34    :align: left
35    :height: 24px
36
37 **By point on perpendicular line 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.
38
39 -------------------------------------------------------------------------------------------
40
41 By center and two points
42 """"""""""""""""""""""""
43
44 .. image:: images/Arc_panel_base.png
45    :align: center
46
47 Click in the view once to set the center point, then move the mouse and click a second time to set the start point
48 and finally move the mouse and click a third time to set the last passed point.
49
50 - When entering a center or start point by selecting either a point or a segment, a Coincident constraint is created.
51 - When entering an end point by selecting a segment, a Coincident constraint is created.
52 - When entering an end point, only segments are selectable.
53
54 **TUI Command**:
55
56 .. py:function:: Sketch_1.addArc(CenterX, CenterY, StartX, StartY, EndX, EndY, Inversed)
57
58     :param real: Center X.
59     :param real: Center Y.
60     :param real: Start X.
61     :param real: Start Y.
62     :param real: End X.
63     :param real: End Y.
64     :param boolean: Is inversed.
65     :return: Result object.
66
67 By three points
68 """""""""""""""
69
70 .. image:: images/Arc_panel_3pt.png
71    :align: center
72
73 Click in the view once to set the start point, then move the mouse and click a second time to set the end point
74 and finally move the mouse and click a third time to set the passed point.
75
76 - When entering a start or end point by selecting either a point or a segment, a Coincident constraint is created.
77 - When entering a passing point by selecting a point, a Coincident constraint is created.
78 - When entering a passing point by selecting a segment, a Tangent constraint is created.
79
80 **TUI Command**:
81
82 .. py:function:: Sketch_1.addArc(StartX, StartY, EndX, EndY, PassedX, PassedY)
83
84     :param real: Start X.
85     :param real: Start Y.
86     :param real: End X.
87     :param real: End Y.
88     :param real: Passed X.
89     :param real: Passed Y.
90     :return: Result object.
91
92 By tangent point and end point
93 """"""""""""""""""""""""""""""
94
95 .. image:: images/Arc_panel_tang.png
96    :align: center
97
98 Select a point on segment in the view to set the tangent point, then move the mouse and click to set the end point.
99 The tangent point by itself is a start point. The edge on which it lies will be tangent to the arc.
100
101 - When entering a tangent point by selecting a point on segment, a Tangent constraint is created.
102 - When entering an end point by selecting a segment, a Coincident constraint is created.
103 - When entering an end point, only segments are selectable.
104
105 **TUI Command**:
106
107 .. py:function:: Sketch_1.addArc(TangentPoint, EndX, EndY, Inversed)
108
109     :param object: Tangent Point.
110     :param real: End X.
111     :param real: End Y.
112     :param boolean: Is inversed.
113     :return: Result object.
114
115 By point on perpendicular line and end point
116 """"""""""""""""""""""""""""""""""""""""""""
117
118 .. image:: images/Arc_panel_perp.png
119    :align: center
120
121 Select a point on a straight segment in the view to set the start point, then move the mouse and click to set the end point.
122 The edge on which the start point lies will be perpendicular to the arc (the center of the arc is lying on the edge).
123
124 - When entering a start point by selecting a point on segment, a Perpendicular constraint is created.
125 - When entering an end point by selecting a segment, a Coincident constraint is created.
126 - When entering an end point, only segments are selectable.
127
128 **TUI Command**:
129
130 .. py:function:: Sketch_1.addArc(StartPoint, EndX, EndY, Inversed, True)
131
132     :param object: Start Point.
133     :param real: End X.
134     :param real: End Y.
135     :param boolean: Is inversed.
136     :param boolean: Arc is perpendicular (always True).
137     :return: Result object.
138
139 Result
140 """"""
141
142 Created arc appears in the view.
143
144 .. image:: images/Arc_res.png
145            :align: center
146
147 .. centered::
148    Arc created
149
150 **See Also** a sample TUI Script of :ref:`tui_create_arc` operation.