Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes
GProp_GProps Class Reference

Implements a general mechanism to compute the global properties of a "compound geometric system" in 3D space by composition of the global properties of elementary geometric entities such as a curve, surface, solid, or set of points. It is also possible to compose the properties of several "compound geometric systems". More...

#include <GProp_GProps.hxx>

Inheritance diagram for GProp_GProps:
Inheritance graph
[legend]

Public Member Functions

 GProp_GProps ()
 The origin (0, 0, 0) of the absolute Cartesian coordinate system is used to compute the global properties.
 
 GProp_GProps (const gp_Pnt &SystemLocation)
 The point SystemLocation is used to compute the global properties of the system. For greater accuracy, define this point close to the location of the system; for example a point near the centre of mass of the system.
 
void Add (const GProp_GProps &Item, const double Density=1.0)
 Either:
 
double Mass () const
 Returns the mass of the current system.
 
gp_Pnt CentreOfMass () const
 Returns the centre of mass of the current system. With a uniform gravitational field this is also the centre of gravity. The coordinates returned for the centre of mass are expressed in the absolute Cartesian coordinate system.
 
gp_Mat MatrixOfInertia () const
 Returns the matrix of inertia. It is a symmetric matrix whose coefficients are the quadratic moments of inertia:
 
void StaticMoments (double &Ix, double &Iy, double &Iz) const
 Returns the static moments of inertia of the current system - i.e. the moments of inertia about the three axes of the absolute Cartesian coordinate system.
 
double MomentOfInertia (const gp_Ax1 &A) const
 Computes the moment of inertia of the system about the axis A.
 
GProp_PrincipalProps PrincipalProperties () const
 Computes the principal properties of inertia of the current system. There is always a set of axes for which the products of inertia of a geometric system are equal to 0 - i.e. the matrix of inertia of the system is diagonal. These axes are the principal axes of inertia; their origin coincides with the centre of mass of the system. The associated moments are called the principal moments of inertia.
 
double RadiusOfGyration (const gp_Ax1 &A) const
 Returns the radius of gyration of the current system about the axis A.
 

Protected Attributes

gp_Pnt g
 Centre of mass (absolute frame)
 
gp_Pnt loc
 Reference point used for inertia accumulation.
 
double dim
 Total mass / length / area / volume.
 
gp_Mat inertia
 Quadratic moments of inertia matrix.
 

Detailed Description

Implements a general mechanism to compute the global properties of a "compound geometric system" in 3D space by composition of the global properties of elementary geometric entities such as a curve, surface, solid, or set of points. It is also possible to compose the properties of several "compound geometric systems".

To compute the global properties of a compound geometric system:

To compute the global properties of the geometric components of the system, use the services of the following frameworks:

The global properties computed are:

Example:

// Declares the GProps; the absolute origin (0, 0, 0) is used as the
// default reference point to compute the centre of mass.
// Computes the inertia of a 3D curve.
Your_CGProps aComponent1(theCurve, ...);
// Computes the inertia of two surfaces.
// Composes the global properties of components 1, 2, 3. A density
// can be associated with the components; it defaults to 1.0.
const double aDensity1 = 2.0;
const double aDensity2 = 3.0;
// Returns the centre of mass of the system in the absolute
// Cartesian coordinate system.
const gp_Pnt aG = aSystem.CentreOfMass();
// Computes the principal properties of inertia of the system.
const GProp_PrincipalProps aPp = aSystem.PrincipalProperties();
// Returns the principal moments and radii of gyration.
double aIxx, aIyy, aIzz, aRxx, aRyy, aRzz;
aPp.Moments(aIxx, aIyy, aIzz);
aPp.RadiusOfGyration(aRxx, aRyy, aRzz);
Implements a general mechanism to compute the global properties of a "compound geometric system" in 3...
Definition GProp_GProps.hxx:97
A framework to present the principal properties of inertia of a system of which global properties are...
Definition GProp_PrincipalProps.hxx:48
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
Defines a 3D cartesian point.
Definition gp_Pnt.hxx:32

Constructor & Destructor Documentation

◆ GProp_GProps() [1/2]

GProp_GProps::GProp_GProps ( )

The origin (0, 0, 0) of the absolute Cartesian coordinate system is used to compute the global properties.

◆ GProp_GProps() [2/2]

GProp_GProps::GProp_GProps ( const gp_Pnt & SystemLocation)

The point SystemLocation is used to compute the global properties of the system. For greater accuracy, define this point close to the location of the system; for example a point near the centre of mass of the system.

At initialization the framework is empty: it retains no dimensional information such as mass or inertia. It is, however, ready to bring together global properties of various other systems whose global properties have already been computed using another framework. To do this, use Add() to define the components of the system, once per component, and then use the interrogation functions to access the computed values.

Parameters
[in]SystemLocationreference point of the system used for inertia accumulation

Member Function Documentation

◆ Add()

void GProp_GProps::Add ( const GProp_GProps & Item,
const double Density = 1.0 )

Either:

  • initializes the global properties retained by this framework from those retained by the framework Item, or
  • brings together the global properties retained by this framework with those retained by the framework Item.

The value Density (1.0 by default) is used as the density of the system analysed by Item. Sometimes the density has already been accounted for at construction time of Item - for example when Item is a GProp_PGProps framework built to compute the global properties of a set of weighted points, or another GProp_GProps object that already retains composite global properties. In these cases the real density was already taken into account at construction of Item. Note that this is not checked: if the density of parts of the system is taken into account two or more times, the result of the computation will be wrong.

Notes:

  • The reference point of Item may differ from the reference point of this framework. Huygens' theorem is applied automatically to transfer inertia values to the reference point of this framework.
  • Add() is used once per component of the system. After all components are composed, the interrogation functions return values for the system as a whole.
  • The system whose global properties have been brought together by this framework is referred to as the "current system". The current system itself is not retained: only its global properties are.
Parameters
[in]Itemframework holding the global properties of the component to compose
[in]Densitydensity of the component (default 1.0)
Exceptions
Standard_DomainErrorif Density is less than or equal to gp::Resolution().

◆ CentreOfMass()

gp_Pnt GProp_GProps::CentreOfMass ( ) const

Returns the centre of mass of the current system. With a uniform gravitational field this is also the centre of gravity. The coordinates returned for the centre of mass are expressed in the absolute Cartesian coordinate system.

◆ Mass()

double GProp_GProps::Mass ( ) const

Returns the mass of the current system.

If no density has been attached to the components of the current system, the returned value corresponds to:

  • the total length of the edges of the current system if this framework retains only linear properties (for example, when using only LinearProperties() to combine properties of lines from shapes), or
  • the total area of the faces of the current system if this framework retains only surface properties (for example, when using only SurfaceProperties() to combine properties of surfaces from shapes), or
  • the total volume of the solids of the current system if this framework retains only volume properties (for example, when using only VolumeProperties() to combine properties of volumes from solids).
Warning
A length, an area or a volume is computed in the current unit system. The mass of a single object is its length, area or volume multiplied by its density. Be consistent with respect to the units used.

◆ MatrixOfInertia()

gp_Mat GProp_GProps::MatrixOfInertia ( ) const

Returns the matrix of inertia. It is a symmetric matrix whose coefficients are the quadratic moments of inertia:

             | Ixx  Ixy  Ixz |
    matrix = | Ixy  Iyy  Iyz |
             | Ixz  Iyz  Izz |

Ixx, Iyy, Izz are the moments of inertia; Ixy, Ixz, Iyz are the products of inertia.

The matrix of inertia is returned in the central coordinate system (G, Gx, Gy, Gz), where G is the centre of mass of the system and Gx, Gy, Gz are parallel to the X(1, 0, 0), Y(0, 1, 0) and Z(0, 0, 1) directions of the absolute Cartesian coordinate system. To compute the matrix of inertia at another location use GProp::HOperator() (Huygens' theorem).

◆ MomentOfInertia()

double GProp_GProps::MomentOfInertia ( const gp_Ax1 & A) const

Computes the moment of inertia of the system about the axis A.

Parameters
[in]Aaxis about which the moment of inertia is computed

◆ PrincipalProperties()

GProp_PrincipalProps GProp_GProps::PrincipalProperties ( ) const

Computes the principal properties of inertia of the current system. There is always a set of axes for which the products of inertia of a geometric system are equal to 0 - i.e. the matrix of inertia of the system is diagonal. These axes are the principal axes of inertia; their origin coincides with the centre of mass of the system. The associated moments are called the principal moments of inertia.

This function computes the eigen values and eigen vectors of the matrix of inertia of the system. Results are stored in a GProp_PrincipalProps framework which can be queried to access the value sought.

◆ RadiusOfGyration()

double GProp_GProps::RadiusOfGyration ( const gp_Ax1 & A) const

Returns the radius of gyration of the current system about the axis A.

Parameters
[in]Aaxis about which the radius of gyration is computed

◆ StaticMoments()

void GProp_GProps::StaticMoments ( double & Ix,
double & Iy,
double & Iz ) const

Returns the static moments of inertia of the current system - i.e. the moments of inertia about the three axes of the absolute Cartesian coordinate system.

Parameters
[out]Ixstatic moment of inertia about X
[out]Iystatic moment of inertia about Y
[out]Izstatic moment of inertia about Z

Field Documentation

◆ dim

double GProp_GProps::dim
protected

Total mass / length / area / volume.

◆ g

gp_Pnt GProp_GProps::g
protected

Centre of mass (absolute frame)

◆ inertia

gp_Mat GProp_GProps::inertia
protected

Quadratic moments of inertia matrix.

◆ loc

gp_Pnt GProp_GProps::loc
protected

Reference point used for inertia accumulation.


The documentation for this class was generated from the following file: