Salome HOME
Ameliorate help pages
[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 corresponded 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 .. image:: images/Point3.png
109    :align: center
110         
111 .. centered::
112    **By projection**
113
114 To create a point, select an existing point or vertex and an edge or face. The new point will be created by projection of the selected point on the edge or face.
115
116 **TUI Commands**:
117
118 .. 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"))
119
120     :param part: The current part object.
121     :param object: A vertex.
122     :param object: An edge or plane.
123     :return: Result object.
124
125 Result
126 """"""
127
128 The Result of the operation will be a construction point created by projection on a plane or an edge:
129
130 .. image:: images/CreatePoint3.png
131            :align: center
132
133 .. centered::
134    **Point created by projection on a plane**
135
136 **See Also** a sample TUI Script of :ref:`tui_create_point_projection` operation.
137
138 By intersection of objects
139 --------------------------
140
141 .. image:: images/Point4.png
142    :align: center
143         
144 .. centered::
145    **Intersection of objects**
146
147 To create a point, select:
148
149 #. two edges,
150 #. edge and plane,
151 #. three planes
152
153 The new point will be defined by intersection of the selected objects.
154
155 **TUI Commands**:
156
157 .. 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)
158
159     :param part: The current part object.
160     :param object: An edge.
161     :param object: A plane.
162     :param real: Offset.
163     :param boolean: Is offset reversed.
164     :return: Result object.
165
166 Result
167 """"""
168
169 The Result of the operation will be a construction point created by intersection of objects:
170
171 .. image:: images/CreatePoint4.png
172            :align: center
173
174 .. centered::
175    **Point created by intersection of axis**
176
177 **See Also** a sample TUI Script of :ref:`tui_create_point_intersection` operation.
178
179 By geometrical property of object
180 ---------------------------------
181
182 .. image:: images/Point5.png
183    :align: center
184         
185 .. centered::
186    **By geometrical property**
187
188 In this case the new point can be defined as a center of gravity of the selected object or as a center of a circle. To create a point, select the desirable object.
189
190 **TUI Commands**:
191
192 .. py:function:: model.addPoint(Part_1_doc, model.selection("SOLID", "Box_1_1"))
193
194     :param part: The current part object.
195     :param object: Solid.
196     :return: Result object.
197
198 Result
199 """"""
200
201 The Result of the operation will be a construction point defined by object property:
202
203 .. image:: images/CreatePoint5.png
204            :align: center
205
206 .. centered::
207    **Point created in COG of a cylinder**
208
209 **See Also** a sample TUI Script of :ref:`tui_create_point_object` operation.