3 \page using_measurement_tools_page Using measurement tools
5 \n Measurement tools in GEOM are necessary for getting different data
6 concerning created or imported geometrical objects. They are:
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>
25 \n Our <b>TUI Scripts</b> show how to use
26 \ref tui_measurement_tools_page "Measurement Tools" with <b>TUI
29 \n <em>To use measurement tools:</em>
31 In the <b>Main menu</b> select \b Measures submenu.
33 \anchor point_coord_anchor
34 <br><h2>Point coordinates</h2>
36 \n Returns the coordinates of a point.
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.
42 \image html measures1.png
44 \anchor basic_prop_anchor
45 <br><h2>Basic properties</h2>
47 \n Returns the properties (Length, Surface & Volume) for the selected
50 \n <b>Result:</b> Display Length, Surface & Volume in the form of
52 \n <b>TUI Command:</b> <em>geompy.BasicProperties(Shape),</em> where
53 \em Shape is a shape whose properties are inquired.
55 \image html neo-basicprop.png
57 \anchor center_mass_anchor
58 <br><h2>Center of mass</h2>
60 \n Calculates and returns the coordinates of the gravity center for
61 the selected geometrical object.
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.
67 \image html measures3.png
69 \anchor inertia_anchor
72 Returns the axial moments of inertia for the selected geometrical object.
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
84 \image html measures4.png
86 \anchor normale_anchor
87 <br><h2>Normal to a Face</h2>
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.
92 \image html normaletoface.png
94 \anchor boundaries_anchor
95 <br><h2>Check Free Boundaries</h2>
97 \n Detects and highlights wires and edges that are not shared between
98 two faces and are considered a shape's boundary.
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.
106 \image html repair9.png
109 <br><h2>Check Free Faces</h2>
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.
114 \n \b NOTE: This functionality works only in VTK viewer.
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.
120 \image html repair10.png
122 \anchor bounding_box_anchor
123 <br><h2>Bounding box</h2>
125 \n Returns the dimensions of the bounding box for the selected
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,
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.
134 \image html measures5.png
136 \anchor min_distance_anchor
137 <br><h2>Min. distance</h2>
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.
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.
146 \image html distance.png
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.
155 \image html angle.png
157 \anchor tolerance_anchor
158 <br><h2>Tolerance</h2>
160 \n Returns the maximum and the minimum tolerance for the selected
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.
168 \image html new-tolerance.png
170 \anchor whatis_anchor
173 \n Under the Object input field it displays types and quantities of
174 all topological entities, composing the selected object. Below this
175 information there is "Kind of Shape" field, that characterises the
176 whole shape. If there is no additional information available for the
177 shape, the "Basic Properties" button will be disabled, otherwise it
178 will show a "Basic Properties" dialog with information about
179 dimensions, position, orientation and other parameters of the shape.
181 \n <b>TUI Command:</b> <em>geompy.WhatIs(Shape),</em> where \em Shape is a
182 shape from which a description is returned.
183 \n <b>TUI Command:</b> <em>geompy.KindOfShape(Shape),</em> where \em Shape is a
184 shape from which a description is returned.
186 \image html measures8.png
191 \n Checks the topology of the selected geometrical object and returns
192 True if it is valid. Check also geometry checkbox allows to test the
195 \n <b>Result:</b> Boolean.
196 \n <b>TUI Command:</b> <em>geompy.(theShape, theIsCheckGeom = 0),</em>
197 where is theShape is the shape checked for validity.
199 \image html measures9.png
201 \anchor check_compound_anchor
202 <br><h2>Check compound of blocks</h2>
204 \n Checks whether a shape is a compound of glued blocks. To be
205 considered as a compound of blocks, the given shape must satisfy the
206 following conditions:
208 <li>Each element of the compound should be a Block (6 faces and 12 edges);</li>
209 <li>A connection between two Blocks should be an entire quadrangle face or an entire edge;</li>
210 <li>The compound should be connected;</li>
211 <li>Two quadrangle faces should be glued.</li>
214 \n Informs of the following possible errors:
216 <li>not a block;</li>
218 <li>not connected;</li>
219 <li>extra or degenerated edge.</li>
222 \n <b>Result:</b> Boolean; highlight in the viewer.
223 \n <b>TUI Command:</b>
224 <em>geompy.CheckCompoundOfBlocks(Compound).</em> Checks if the shape
225 is a valid compound of blocks. If it is true, then the validity flag
226 is returned, and encountered errors are printed in the python console.
228 \image html measures10.png