Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/geom.git] / doc / salome / gui / GEOM / input / using_measurement_tools.doc
1 /*!
2
3 \page using_measurement_tools_page Using measurement tools
4
5 \n Measurement tools in GEOM are necessary for getting different data
6 concerning created or imported geometrical objects. They are:
7
8 <ul>
9 <li>\ref point_coord_anchor "Point coordinates"</li>
10 <li>\ref basic_prop_anchor "Basic properties"</li>
11 <li>\ref center_mass_anchor "Center of mass"</li>
12 <li>\ref inertia_anchor "Inertia"</li>
13 <li>\ref normale_anchor "Normal to a Face"</li>
14 <li>\ref boundaries_anchor "Check Free Boundaries"</li>
15 <li>\ref faces_anchor "Check Faces"</li>
16 <li>\ref bounding_box_anchor "Bounding box"</li>
17 <li>\ref min_distance_anchor "Min. distance"</li>
18 <li>\ref angle_anchor "Angle"</li>
19 <li>\ref tolerance_anchor "Tolerance"</li>
20 <li>\ref whatis_anchor "WhatIs"</li>
21 <li>\ref check_anchor "Check"</li>
22 <li>\ref check_compound_anchor "Check compound of blocks"</li>
23 </ul>
24
25 \n Our <b>TUI Scripts</b> show how to use 
26 \ref tui_measurement_tools_page "Measurement Tools" with <b>TUI
27 commands</b>.
28
29 \n <em>To use measurement tools:</em> 
30 \par
31 In the <b>Main menu</b> select \b Measures submenu.
32
33 \anchor point_coord_anchor
34 <br><h2>Point coordinates</h2>
35
36 \n Returns the coordinates of a point.
37
38 \n <b>Result:</b> Point coordinates (X, Y, Z) in 3D space in the form of Python Tuple.
39 \n <b>TUI Command:</b> <em>geompy.PointCoordinates(Point),</em> 
40 where \em Point is a point whose coordinates are inquired.
41
42 \image html measures1.png
43
44 \anchor basic_prop_anchor
45 <br><h2>Basic properties</h2>
46
47 \n Returns the properties (Length, Surface & Volume) for the selected
48 geometrical object.
49
50 \n <b>Result:</b> Display Length, Surface & Volume in the form of
51 Python Tuple.
52 \n <b>TUI Command:</b> <em>geompy.BasicProperties(Shape),</em> where
53 \em Shape is a shape whose properties are inquired.
54
55 \image html neo-basicprop.png
56
57 \anchor center_mass_anchor
58 <br><h2>Center of mass</h2>
59
60 \n Calculates and returns the coordinates of the gravity center for
61 the selected geometrical object.
62
63 \n <b>Result:</b> GEOM_Object (vertex).
64 \n <b>TUI Command:</b> <em> geompy.MakeCDG(Shape),</em> where \em Shape is
65 the shape for which a center of gravity is computed.
66
67 \image html measures3.png
68
69 \anchor inertia_anchor
70 <br><h2>Inertia</h2>
71
72 Returns the axial moments of inertia for the selected geometrical object.
73
74 \n <b>Result:</b> Displays the matrix of the own moments of inertia and
75 the relative moments of inertia in the form of Python Tuple
76  <center>(I11, I12, I13,</center>
77                      <center>I21, I22, I23,</center>
78                      <center>I31, I32, I33,</center>
79                      <center>Ix, Iy, Iz).</center>
80 \n <b>TUI Command:</b> <em>geompy.Inertia(Shape),</em> where \em Shape is
81 a shape for which the own matrix of inertia and the relative moments of inertia are
82 returned.
83
84 \image html measures4.png
85
86 \anchor normale_anchor
87 <br><h2>Normal to a Face</h2>
88
89 \n Calculates the normal vector to the selected \b Face. The \b Point
90 is a point of the \Face, where the Normal should be calculated.
91
92 \image html normaletoface.png
93
94 \anchor boundaries_anchor
95 <br><h2>Check Free Boundaries</h2>
96
97 \n Detects and highlights  wires and edges that are not shared between
98 two faces and are considered a shape's boundary.
99
100 \n <b>TUI Command:</b> <em>(NoError, ClosedWires, OpenWires) =
101 geompy.GetFreeBoundary(Shape),</em> where \em Shape is a shape to be
102 checked, \em NoError is false if an error occurred while checking free
103 boundaries, \em ClosedWires is a list of closed free boundary wires,
104 \em OpenWires is a list of open free boundary wires.
105
106 \image html repair9.png
107
108 \anchor faces_anchor
109 <br><h2>Check Free Faces</h2>
110
111 \n Highlights all free faces of a given shape. A free
112 face is a face which is not shared between two objects of the shape.
113
114 \n \b NOTE: This functionality works only in VTK viewer.
115
116 \n \b Result: a list of IDs of all free faces, containing in the shape.
117 \n <b>TUI Command:</b> <em>GetFreeFacesIDs(Shape),</em> where \em Shape is
118 a shape to be checked.
119
120 \image html repair10.png
121
122 \anchor bounding_box_anchor
123 <br><h2>Bounding box</h2>
124
125 \n Returns the dimensions of the bounding box for the selected
126 geometrical object.
127
128 \n <b>Result:</b> Displays the dimensions of the bounding box of a
129 geometrical object in the form of Python Tuple (Xmin, Xmax, Ymin,
130 Ymax, Zmin, Zmax).
131 \n <b>TUI Command:</b> <em>geompy.BoundingBox(Shape),</em> where \em Shape
132 is a shape for which a bounding box is computed.
133
134 \image html measures5.png
135
136 \anchor min_distance_anchor
137 <br><h2>Min. distance</h2>
138
139 \n Returns the minimum distance between two geometrical objects and
140 the coordinates of the vector of distance and shows the vector in the viewer.  
141
142 \n <b>TUI Command:</b> <em>geompy.MinDistance(Shape1, Shape2),</em>
143 where \em Shape1 and \em Shape2 are shapes between which the minimal
144 distance is computed.
145
146 \image html distance.png
147
148 \anchor angle_anchor
149 <br><h2>Angle</h2>
150
151 \n Returns the angle between two lines or linear edges
152 \n <b>TUI Command:</b> <em>geompy.GetAngle(shape1, shape2),</em> where
153 Shape1 and Shape2 are shapes between which the angle is computed. 
154
155 \image html angle.png
156  
157 \anchor tolerance_anchor
158 <br><h2>Tolerance</h2>
159
160 \n Returns the maximum and the minimum tolerance for the selected
161 geometrical object.
162
163 \n <b>Result:</b> Displays the tolerance values (FaceMinTol,
164 FaceMaxTol, EgdeMinTol, EgdeMaxTol, VertexMinTol, VertexMaxTol).
165 \n <b>TUI Command:</b> <em>geompy.Tolerance(Shape),</em> where \em Shape
166 is a shape for which minimal and maximal tolerances are returned.
167
168 \image html new-tolerance.png
169
170 \anchor whatis_anchor
171 <br><h2>WhatIs</h2>
172
173 \n Displays types and quantities of all elements composing the
174 selected geometrical object.
175
176 \n <b>TUI Command:</b> <em>geompy.WhatIs(Shape),</em> where \em Shape is a
177 shape from which a description is returned.
178
179 \image html measures8.png
180
181 \anchor check_anchor
182 <br><h2>Check</h2>
183
184 \n Checks the topology of the selected geometrical object and returns
185 True if it is valid. Check also geometry checkbox allows to test the
186 geometry as well.
187
188 \n <b>Result:</b> Boolean.
189 \n <b>TUI Command:</b> <em>geompy.(theShape, theIsCheckGeom = 0),</em>
190 where is theShape is the shape checked for validity.
191
192 \image html measures9.png
193
194 \anchor check_compound_anchor
195 <br><h2>Check compound of blocks</h2>
196
197 \n Checks whether a shape is a compound of glued blocks. To be
198 considered as a compound of blocks, the given shape must satisfy the
199 following conditions:
200 <ul>
201 <li>Each element of the compound should be a Block (6 faces and 12 edges);</li>
202 <li>A connection between two Blocks should be an entire quadrangle face or an entire edge;</li>
203 <li>The compound should be connected;</li>
204 <li>Two quadrangle faces should be glued.</li>
205 </ul>
206
207 \n Informs of the following possible errors:
208 <ul>
209 <li>not a block;</li>
210 <li>not glued;</li>
211 <li>not connected;</li>
212 <li>extra or degenerated edge.</li>
213 </ul>
214
215 \n <b>Result:</b> Boolean; highlight in the viewer.
216 \n <b>TUI Command:</b>
217 <em>geompy.CheckCompoundOfBlocks(Compound).</em> Checks if the shape
218 is a valid compound of blocks. If it is true, then the validity flag
219 is returned, and encountered errors are printed in the python console.
220
221 \image html measures10.png
222
223 */