Salome HOME
Correct documentation bugs, adapt for 'Read The Docs' theme (bos #18858)
[modules/shaper.git] / src / ConstructionPlugin / doc / pointFeature.rst
1 .. _constructionPoint:
2 .. |point_button.icon|    image:: images/point_button.png
3
4 Point
5 =====
6
7 Point feature creates a new construction point.
8
9 Point is a construction object and it can be created in a part or in a partset. To create a point:
10
11 #. select in the Main Menu *Construction - > Point* item  or
12 #. click |point_button.icon| **Point** button in the toolbar
13
14 There are 5 algorithms for creation of a Point:
15
16 .. image:: images/point_by_xyz_32x32.png
17    :align: left
18    :height: 24px
19
20 **By X,Y,Z** creates a point by three coordinates.
21
22 .. image:: images/point_by_distance_on_edge_32x32.png
23    :align: left
24    :height: 24px
25
26 **By distance on edge** creates a point on an edge.
27
28 .. image:: images/point_by_projection_32x32.png
29    :align: left
30    :height: 24px
31
32 **By projection on edge or plane** creates a point by projecting an existing point on an edge or plane.
33
34 .. image:: images/point_by_intersection_32x32.png
35    :align: left
36    :height: 24px
37
38 **By intersection of objects** creates a point by intersection of planes or/ and edges.
39
40 .. image:: images/point_by_geometrical_property_32x32.png
41    :align: left
42    :height: 24px
43
44 **By geometrical property of object** creates a point in COG or center of arc or circle.
45
46 --------------------------------------------------------------------------------
47
48 By X,Y,Z
49 --------
50
51 .. image:: images/Point1.png
52    :align: center
53         
54 .. centered::
55    **By X,Y,Z coordinates**
56
57 A point is created by X, Y, and Z coordinates.
58
59 **TUI Commands**:
60
61 .. py:function:: model.addPoint(Part_doc, 50, 50, 50)
62
63     :param part: The current part object.
64     :param real: X value.
65     :param real: Y value.
66     :param real: Z value.
67     :return: Result object.
68
69 Result
70 """"""
71
72 The Result of the operation will be a construction point:
73
74 .. image:: images/CreatePoint1.png
75            :align: center
76
77 .. centered::
78    **Point by coordinates**
79
80 **See Also** a sample TUI Script of :ref:`tui_create_point_xyz` operation.
81
82 By distance on edge
83 -------------------
84
85 .. image:: images/Point2.png
86    :align: center
87         
88 .. centered::
89    **Along an edge**
90
91 To create a point, select an edge in a viewer and define a distance along the edge, where point will be defined. This distance can be defined by an absolute value or by a relative one as a ratio to the edge length. The direction of the edge can be reversed by the corresponding check-box.
92
93 **TUI Commands**:
94
95 .. py:function:: model.addPoint(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), 0.5, True, False)
96
97     :param part: The current part object.
98     :param object: An edge.
99     :param real: A value.
100     :param boolean: Is by ratio.
101     :param boolean: Is reversed.
102     :return: Result object.
103
104 Result
105 """"""
106
107 The Result of the operation will be a construction point created on edge:
108
109 .. image:: images/CreatePoint2.png
110            :align: center
111
112 .. centered::
113    **Point created on edge**
114
115 **See Also** a sample TUI Script of :ref:`tui_create_point_edge` operation.
116
117 By projection on edge or plane
118 ------------------------------
119
120 To create a point by projection it is necessary to select an existing point or wertex which will be projected and an edge or a plane (planar face) on which it will be projected:
121
122 **On an edge:**
123
124 .. image:: images/Point3.png
125    :align: center
126         
127 .. centered::
128    **By projection on an edge**
129
130 **On a plane:**
131
132 .. image:: images/Point3-1.png
133    :align: center
134         
135 .. centered::
136    **By projection on a plane**
137
138
139 The new point will be created by projection of the selected point on the selected object.
140
141 **TUI Commands**:
142
143 .. py:function:: model.addPoint(Part_doc, model.selection("VERTEX", "Box_1_1/Front&Box_1_1/Left&Box_1_1/Top"), model.selection("EDGE", "Box_1_1/Right&Box_1_1/Top"))
144
145     :param part: The current part object.
146     :param object: A vertex.
147     :param object: An edge or plane.
148     :return: Result object.
149
150 Result
151 """"""
152
153 The Result of the operation will be a construction point created by projection on a plane or an edge:
154
155 .. image:: images/CreatePoint3.png
156            :align: center
157
158 .. centered::
159    **Point created by projection on a plane**
160
161 **See Also** a sample TUI Script of :ref:`tui_create_point_projection` operation.
162
163 By intersection of objects
164 --------------------------
165
166 A point can be created by intersection of selected objects:
167
168 **Two edges**
169
170 .. image:: images/Point4.png
171    :align: center
172         
173 .. centered::
174    **Intersection of edges**
175
176 **Edge and plane**
177
178 .. image:: images/Point4-1.png
179    :align: center
180         
181 .. centered::
182    **Intersection of and edge and a plane**
183
184 In this case it is possible to define an offset from a plane along the plane normal for the created point.
185
186 **Three planes**
187
188 .. image:: images/Point4-2.png
189    :align: center
190         
191 .. centered::
192    **Intersection of three planes**
193
194 The new point will be defined by intersection of the selected objects.
195
196 **TUI Commands**:
197
198 .. py:function:: model.addPoint(Part_doc, model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"), model.selection("FACE", "Box_1_1/Left"), 10, False)
199
200     :param part: The current part object.
201     :param object: An edge.
202     :param object: A plane.
203     :param real: Offset.
204     :param boolean: Is offset reversed.
205     :return: Result object.
206
207 Result
208 """"""
209
210 The Result of the operation will be a construction point created by intersection of objects:
211
212 .. image:: images/CreatePoint4.png
213            :align: center
214
215 .. centered::
216    **Point created by intersection of axis**
217
218 **See Also** a sample TUI Script of :ref:`tui_create_point_intersection` operation.
219
220 By geometrical property of object
221 ---------------------------------
222
223 It is possible to use the following property of selected object:
224
225 **A center of gravity**
226
227 .. image:: images/Point5.png
228    :align: center
229         
230 .. centered::
231    **By center of gravity**
232
233 **A center of circle or arc**
234
235 .. image:: images/Point5-1.png
236    :align: center
237         
238 .. centered::
239    **By center of a circle**
240    
241 To create a point, select a desirable object.
242
243 **TUI Commands**:
244
245 .. py:function:: model.addPoint(Part_1_doc, model.selection("SOLID", "Box_1_1"))
246
247     :param part: The current part object.
248     :param object: Solid.
249     :return: Result object.
250
251 Result
252 """"""
253
254 The Result of the operation will be a construction point defined by object property:
255
256 .. image:: images/CreatePoint5.png
257            :align: center
258
259 .. centered::
260    **Point created in COG of a cylinder**
261
262 **See Also** a sample TUI Script of :ref:`tui_create_point_object` operation.