Using measurement tools

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

 

 

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

 

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.

 

 

 

Basic properties

 

Returns the properties (Length, Surface & Volume) for the selected 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.

 

 

 

Center of mass

 

Calculates and returns the coordinates of the gravity center for the selected geometrical object.

 

Result: GEOM_Object (vertex).

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

 

 

 

Inertia

 

Returns the axis of inertia for the selected geometrical object.

 

Result: Displays the matrix and moments of inertia 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.

 

 

 

Bounding box

 

Returns the dimensions of the bounding box for the selected 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.

 

 

 

Min. distance

 

Returns the minimum distance between two geometrical objects.

 

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

 

 

 

Tolerance

 

Returns the maximum and the minimum tolerance for the selected 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.

 

 

 

WhatIs

 

Displays types and quantities of all elements composing the selected geometrical object.

 

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

 

 

 

Check

 

Checks the topology of the selected geometrical object and returns True if it is valid. Check also geometry checkbox allows to test the geometry as well.

 

Result: Boolean.

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

 

 

 

Check compound of blocks

 

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:

 

Informs of the following possible errors:

 

Result: Boolean; highlight in the viewer.

TUI Command: geompy.CheckCompoundOfBlocks(Compound). Checks if the shape is a valid compound of blocks. If it is true, then the validity flag is returned, and encountered errors are printed in the python console.