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