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