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