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