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