Version: 6.3.1

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.

measures1.png


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.

neo-basicprop.png


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.

measures3.png


Get Vertex by Index


It is possible to get the first or the last vertex from an edge or a wire, depending on its direction (orientation), or to find the vertex by the index inside the wire. The numeration of vertexes starts from 0. This function has only a TUI implementation)


Result: GEOM_Object (vertex).
TUI Command: geompy.GetVertexByIndex(Shape, Index), geompy.GetFirstVertex(Shape), geompy.GetLastVertex(Shape), where Shape must be Wire or Edge.


Inertia

Returns the axial moments of inertia for the selected geometrical object.


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

measures4.png


Normal to a Face


Calculates the normal vector to the selected Face. The Point is a point of the Face, where the Normal should be calculated.

normaletoface.png


Check Free Boundaries


Detects and highlights wires and edges that are not shared between two faces and are considered a shape's boundary.


TUI Command: (NoError, ClosedWires, OpenWires) = geompy.GetFreeBoundary(Shape), where Shape is a shape to be checked, NoError is false if an error occurred while checking free boundaries, ClosedWires is a list of closed free boundary wires, OpenWires is a list of open free boundary wires.

repair9.png


Check Free Faces


Highlights all free faces of a given shape. A free face is a face which is not shared between two objects of the shape.


NOTE: This functionality works only in VTK viewer.


Result: a list of IDs of all free faces, containing in the shape.
TUI Command: GetFreeFacesIDs(Shape), where Shape is a shape to be checked.

repair10.png


Bounding box

Returns the dimensions of the bounding box for the selected geometrical object.

NOTE: In order to take into account any possible distortion of a shape that affects the resulting bounding box, the algorithm enlarges the bounding box to the value of the maximum deflection value of faces (by iterating through all faces of a shape). This functionallity is implemented in such a way in order to have satisfactory performance.

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.

measures5.png


Min. distance


Returns the minimum distance between two geometrical objects and the coordinates of the vector of distance and shows the vector in the viewer.


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

distance.png


Angle


Returns the angle between two lines or linear edges in degrees
TUI Command: geompy.GetAngle(shape1, shape2), where Shape1 and Shape2 are shapes between which the angle is computed. Another TUI command is geompy.GetAngleRadians(shape1,shape2), which returns the value of angle in radians.

angle.png


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.

new-tolerance.png


WhatIs


General information about the selected geometrical object is the list of types and quantities of all topological entities, composing the shape.


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

measures8.png


Kind of Shape field characterises the whole shape. If there is no additional information available for the shape, Basic Properties button will be disabled, otherwise it will show a dialog with information about dimensions, position, orientation and other parameters of the shape.


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

measures8a.png


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(theShape, theIsCheckGeom = 0), where theShape is the shape checked for validity.

measures9.png


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:

  • 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). 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.

measures10.png
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS