Salome HOME
Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/shaper
[modules/shaper.git] / src / ConstructionPlugin / doc / pointFeature.rst
1
2 Point
3 =====
4
5 The feature Point creates a new construction point.
6
7 Point is a construction object and it can be created as in a part as in part set. To create a point:
8
9 #. select in the Main Menu *Construction - > Point* item  or
10 #. click **Point** button in the toolbar
11
12 .. image:: images/point_button.png
13   :align: center
14
15 .. centered::
16   **Point** button
17
18 There are 5 algorithms for creation of a Point:
19
20 .. image:: images/point_by_xyz_32x32.png
21    :align: left
22 **By X,Y,Z** creates a point by three coordinates.
23
24 .. image:: images/point_by_distance_on_edge_32x32.png
25    :align: left
26 **By distance on edge** creates a point on an edge.
27
28 .. image:: images/point_by_projection_32x32.png
29    :align: left
30 **By projection on edge or plane** creates a point projecting of existing point on an edge or plane.
31
32 .. image:: images/point_by_intersection_32x32.png
33    :align: left
34 **By intersection of objects** creates a point by intersection of planes or/ and edges.
35
36 .. image:: images/point_by_geometrical_property_32x32.png
37    :align: left
38 **By geometrical property of object** creates a point in COG or center of arc or circle.
39
40 By X,Y,Z
41 --------
42
43 .. image:: images/Point1.png
44    :align: center
45         
46 .. centered::
47    **By X,Y,Z coordinates**
48
49 In this case user has to input X, Y, and Z coordinates.
50
51 **TUI Commands**: *model.addPoint(Part_doc, 50, 50, 50)*
52
53 **Arguments**: Part + 3 values (X, Y, Z coordinates).
54
55 Result
56 """"""
57
58 The Result of the operation will be a construction point:
59
60 .. image:: images/CreatePoint1.png
61            :align: center
62
63 .. centered::
64    **Point by coordinates**
65
66 **See Also** a sample TUI Script of a :ref:`tui_create_point_xyz` operation.
67
68 By distance on edge
69 -------------------
70
71 .. image:: images/Point2.png
72    :align: center
73         
74 .. centered::
75    **Along an edge**
76
77 In this case user has to select an edge in a viewer and to define a distance along the edge where point will be defined. This distance can be defined as by an absolute value as by relative as a ratio to the edge length. The direction of the edge can be reverced by the corresponded check box.
78
79 **TUI Commands**: *model.addPoint(Part_doc, model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top"), 0.5, True, False)*
80
81 **Arguments**: Part + edge + value + is by ratio flag + to reverce flag.
82
83 Result
84 """"""
85
86 The Result of the operation will be a construction point create on edge:
87
88 .. image:: images/CreatePoint2.png
89            :align: center
90
91 .. centered::
92    **Point created on edge**
93
94 **See Also** a sample TUI Script of a :ref:`tui_create_point_edge` operation.
95
96 By projection on edge or plane
97 ------------------------------
98
99 .. image:: images/Point3.png
100    :align: center
101         
102 .. centered::
103    **By projection**
104
105 In this case user has to 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.
106
107 **TUI Commands**: *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"))*
108
109 **Arguments**: Part + vertex + edge (or plane).
110
111 Result
112 """"""
113
114 The Result of the operation will be a construction point created by projection on a plane or an edge:
115
116 .. image:: images/CreatePoint3.png
117            :align: center
118
119 .. centered::
120    **Point created by projection on a plane**
121
122 **See Also** a sample TUI Script of a :ref:`tui_create_point_projection` operation.
123
124 By intersection of objects
125 --------------------------
126
127 .. image:: images/Point4.png
128    :align: center
129         
130 .. centered::
131    **Intersection of objects**
132
133 In this case user has to select:
134
135 #. two edges,
136 #. edge and plane,
137 #. three planes
138
139 The new point will be defined by intersection of selected objects.
140
141 **TUI Commands**: *model.addPoint(Part_doc, model.selection("EDGE", "Box_1_1/Front&Box_1_1/Top"), model.selection("FACE", "Box_1_1/Left"), 10, False)*
142
143 **Arguments**: Part + edge + plane (planar face) + offset value + is offcet reversed.
144
145 Result
146 """"""
147
148 The Result of the operation will be a construction point created by intersection of objects:
149
150 .. image:: images/CreatePoint4.png
151            :align: center
152
153 .. centered::
154    **Point created by intersection of axis**
155
156 **See Also** a sample TUI Script of a :ref:`tui_create_point_intersection` operation.
157
158 By geometrical property of object
159 ---------------------------------
160
161 .. image:: images/Point5.png
162    :align: center
163         
164 .. centered::
165    **By geometrical property**
166
167 In this case the new point can be defined as a center of gravity of selected object or as a center of a circle. User has to select desirable object.
168
169 **TUI Commands**:  *model.addPoint(Part_1_doc, model.selection("SOLID", "Box_1_1"))*
170
171 **Arguments**: Part + solid
172
173 Result
174 """"""
175
176 The Result of the operation will be a construction point defined by object property:
177
178 .. image:: images/CreatePoint5.png
179            :align: center
180
181 .. centered::
182    **Point created in COG of a cylinder**
183
184 **See Also** a sample TUI Script of a :ref:`tui_create_point_object` operation.