Salome HOME
Issue #2998: Add help description for automatic creation of constraints
[modules/shaper.git] / src / ConstructionPlugin / doc / axisFeature.rst
1 .. |axis_button.icon|    image:: images/axis_button.png
2
3 Axis
4 ====
5
6 Axis feature creates a new constructive axis line.
7
8 Axis is a construction object and it can be created in a part or in a partset. To create an axis:
9
10 #. select in the Main Menu *Construction - > Axis* item  or
11 #. click |axis_button.icon| **Axis** button in the toolbar
12
13 There are 6 algorithms for creation of an Axis:
14
15 .. image:: images/axis_dxyz_32x32.png
16    :align: left
17 **By three dimensions** creates an axis by dimensions along X, Y, Z axes starting form existing origin.
18
19 .. image:: images/by_two_points_32x32.png
20    :align: left
21 **By two points** creates an axis using existing points.
22
23 .. image:: images/axis_by_line_32x32.png
24    :align: left
25 **By line** creates an axis using a line.
26
27 .. image:: images/axis_by_line_32x32.png
28    :align: left
29 **As an axis of cylindrical face** creates an axis using a cylindrical face.
30
31 .. image:: images/axis_by_line_32x32.png
32    :align: left
33 **By plane and point** creates an axis using a plane and point.
34
35 .. image:: images/axis_by_line_32x32.png
36    :align: left
37 **By two planes** creates an axis as the intersection of two planes.
38
39 By three dimensions
40 -------------------
41
42 .. image:: images/Axis1.png
43    :align: center
44         
45 .. centered::
46    **By dX, dY, dZ values**
47
48 An axis is defined by dX, dY and dZ values of a vector.
49
50 **TUI Commands**:
51
52 .. py:function:: model.addAxis(Part_doc, 10, 10, 10)
53
54     :param part: The current part object.
55     :param real: dX.
56     :param real: dY.
57     :param real: dZ.
58     :return: Result object.
59
60 Result
61 """"""
62
63 The Result of the operation will be an axis defined by vector from origin:
64
65 .. image:: images/CreatedAxis1.png
66            :align: center
67
68 .. centered::
69    **Axis by three dimensions**
70
71 **See Also** a sample TUI Script of :ref:`tui_create_axis_xyz` operation.
72
73
74 By two points
75 -------------
76
77 .. image:: images/Axis2.png
78    :align: center
79         
80 .. centered::
81    **By two points**
82
83 An axis is defined by two points or vertices.
84
85 **TUI Commands**:
86
87 .. py:function:: model.addAxis(Part_doc, model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Left&Box_1_1/Top"), model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Right&Box_1_1/Bottom"))
88
89     :param part: The current part object.
90     :param object: Vertex 1.
91     :param object: Vertex 2.
92     :return: Result object.
93
94 **See Also** a sample TUI Script of :ref:`tui_create_axis_points` operation.
95
96 Result
97 """"""
98
99 The Result of the operation will be an axis based on two points:
100
101 .. image:: images/CreatedAxis2.png
102            :align: center
103
104 .. centered::
105    **Axis by two points**
106
107 **See Also** a sample TUI Script of :ref:`tui_create_axis_points` operation.
108
109
110 By line
111 -------
112
113 .. image:: images/Axis3.png
114    :align: center
115         
116 .. centered::
117    **By a line**
118
119 An axis is defined by a linear edge.
120
121 **TUI Commands**:
122
123 .. py:function:: model.addAxis(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"))
124
125     :param part: The current part object.
126     :param object: Edge.
127     :return: Result object.
128
129 Result
130 """"""
131
132 The Result of the operation will be an axis based on the selected line:
133
134 .. image:: images/CreatedAxis3.png
135            :align: center
136
137 .. centered::
138    **Axis by line**
139
140 **See Also** a sample TUI Script of :ref:`tui_create_axis_line` operation.
141
142
143 As an axis of cylindrical face
144 ------------------------------
145
146 .. image:: images/Axis4.png
147    :align: center
148         
149 .. centered::
150    **By a cylinder**
151
152 An axis is defined by a cylindrical face. Axis of the cylinder will be an axis object.
153
154 **TUI Commands**:
155
156 .. py:function:: model.addAxis(Part_doc, model.selection("FACE", "Cylinder_1_1/Face_1"))
157
158     :param part: The current part object.
159     :param object: Cylindrical face.
160     :return: Result object.
161
162 Result
163 """"""
164
165 The Result of the operation will be an axis of the selected cylinder:
166
167 .. image:: images/CreatedAxis4.png
168            :align: center
169
170 .. centered::
171    **Axis cylindrical face**
172
173 **See Also** a sample TUI Script of :ref:`tui_create_axis_cylinder` operation.
174
175
176 By plane and point
177 ------------------
178
179 .. image:: images/Axis5.png
180    :align: center
181         
182 .. centered::
183    **By a plane and point**
184
185 An axis is defined by a point or vertex and plane (or planar face) as a normal from the point to the plane.
186
187 **TUI Commands**:
188
189 .. py:function:: model.addAxis(Part_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("VERTEX", "Box_1_1/Back&Box_1_1/Right&Box_1_1/Top"))
190
191     :param part: The current part object.
192     :param object: Plane.
193     :param object: Point.
194     :return: Result object.
195
196 Result
197 """"""
198
199 The Result of the operation will be an axis:
200
201 .. image:: images/CreatedAxis5.png
202            :align: center
203
204 .. centered::
205    **Axis by plane and point**
206
207 **See Also** a sample TUI Script of :ref:`tui_create_axis_plane` operation.
208
209
210 By two planes
211 -------------
212
213 .. image:: images/Axis6.png
214    :align: center
215         
216 .. centered::
217    **By two planes**
218
219 An axis is defined by two planes. The intersection of the planes defines an axis. It is possible to define offset for axis definition from both planes.
220
221 **TUI Commands**:
222
223 .. py:function:: model.addAxis(Part_doc, model.selection("FACE", "Box_1_1/Top"), 5, False, model.selection("FACE", "Box_1_1/Front"), 3, False)
224
225     :param part: The current part object.
226     :param object: Plane 1.
227     :param real: Offset value.
228     :param boolean: Is reversed.
229     :param object: Plane 2.
230     :param real: Offset value.
231     :param boolean: Is reversed.
232     :return: Result object.
233
234 Result
235 """"""
236
237 The Result of the operation will be an axis:
238
239 .. image:: images/CreatedAxis6.png
240            :align: center
241
242 .. centered::
243    **Axis by two planes**
244
245 **See Also** a sample TUI Script of :ref:`tui_create_axis_twoplanes` operation.