# Titre

# Using measurement tools

Measurement tools in GEOM are necessary for getting different data concerning created or imported geometrical objects. They are:

- Point coordinates

- Basic properties

- Center of mass

- Inertia

- Bounding box

- Min. distance

- Tolerance

- WhatIs

- Check

- Check compound of blocks

Our TUI Scripts show how to use Measurement Tools with TUI commands.

To use measurement tools:

In the main menu select Measures submenu.

Point coordinates

Description: Returns the coordinates of a point.

Result: Point coordinates (X, Y, Z) in 3D space in the form of Python Tuple.

TUI command: geompy.PointCoordinates(Point), where Point is a point whose coordinates are inquired.

Arguments: 1 point.

Dialog Box:

Basic properties

Description: Return the properties (Length, Surface & Volume) of a definite geometrical object.

Result: Display Length, Surface & Volume in the form of Python Tuple.

TUI command: geompy.BasicProperties(Shape), where Shape is a shape whose properties are inquired.

Arguments: 1 shape.

Dialog Box:

Center of mass

Description: Creates a gravity center of a shape and returns its coordinates.

Result: GEOM_Object (vertex).

TUI Command: geompy.MakeCDG(Shape), where Shape is the shape for which a center of gravity is computed.

Arguments: 1 shape.

Dialog Box:

Inertia

Description: Returns the inertia axis of a geometrical object.

Result: Display the matrix and moments of inretia in the form of Python Tuple (I11, I12, I13,

I21, I22, I23,

I31, I32, I33,

Ix, Iy, Iz).

TUI command: geompy.Inertia(Shape), where Shape is a shape for which a matrix of inertia and moment of inertia are returned.

Arguments: 1 shape.

Dialog Box:

Bounding box

Description: Returns the dimensions of the bounding box of a geometrical object.

Result: Displays the dimensions of the bounding box of a geometrical object in the form of Python Tuple (Xmin, Xmax, Ymin, Ymax, Zmin, Zmax).

TUI command: geompy.BoundingBox(Shape), where Shape is a shape for which a bounding box is computed.

Arguments: 1 shape.

Dialog Box:

Min. distance

Description: Returns the min. distance between 2 geometrical objects.

Result: Displays the min. distance.

TUI command: geompy.MinDistance(Shape1, Shape2), where Shape1 and Shape2 are shapes between which the minimal distance computed.

Arguments: 2 shapes.

Dialog Box:

Tolerance

Description: Returns the tolerance of a geometrical object.

Result: Displays the tolerance values (FaceMinTol, FaceMaxTol, EgdeMinTol, EgdeMaxTol, VertexMinTol, VertexMaxTol).

TUI command: geompy.Tolerance(Shape), where Shape is a shape for which minimal and maximal tolerances are returned.

Arguments: 1 shape.

Dialog Box:

WhatIs

Description: Returns the type of a geometrical object.

Result: Displays all elements composing your geometrical object.

TUI command: geompy.WhatIs(Shape), where Shape is a shape from which a description is returned.

Arguments: 1 shape.

Dialog Box:

Check

Description: Returns True if this geometrical object is valid.

Result: Boolean.

TUI Command: geompy.CheckShape(Shape), where is shape which is checked for validity.

Arguments: 1 shape.

Dialog Box:

Check compound of blocks

Description: Checks whether a shape is a compound of glued blocks. To be considered as a compound of blocks, the given shape must satisfy the following conditions:

- Each element of the compound should be a Block (6 faces and 12 edges);

- A connection between two Blocks should be an entire quadrangle face or an entire edge;

- The compound should be connected;

- Two quadrangle faces should be glued.

Informs of the following possible errors:

- not a block,

- not glued,

- not connected,

- extra or degenerated edge.

Result: Boolean; highlight in the viewer.

TUI Command: geompy.CheckCompoundOfBlocks(Compound), where the Compound is a shape, investigated in order to see, if it is a valid compound of blocks. Validity flag is returned, encountered errors are printed in the python console.

Arguments: 1 shape.

Dialog Box: