Open CASCADE Technology
6.9.1

A framework for computing the global properties of a set of points. A point mass is attached to each point. The global mass of the system is the sum of each individual mass. By default, the point mass is equal to 1 and the mass of a system composed of N points is equal to N. Warning A framework of this sort provides functions to handle sets of points easily. But, like any GProp_GProps object, by using the Add function, it can theoretically bring together the computed global properties and those of a system more complex than a set of points . The mass of each point and the density of each component of the composed system must be coherent. Note that this coherence cannot be checked. Nonetheless, you are advised to restrict your use of a GProp_PGProps object to a set of points and to create a GProp_GProps object in order to bring together global properties of different systems. More...
#include <GProp_PGProps.hxx>
Public Member Functions  
GProp_PGProps ()  
Initializes a framework to compute global properties on a set of points. The point relative to which the inertia of the system is computed will be the origin (0, 0, 0) of the absolute Cartesian coordinate system. At initialization, the framework is empty, i.e. it retains no dimensional information such as mass and inertia. It is, however, now able to keep global properties of a set of points while new points are added using the AddPoint function. The set of points whose global properties are brought together by this framework will then be referred to as the current system. The current system is, however, not kept by this framework, which only keeps that system's global properties. Note that the current system may be more complex than a set of points. More...  
void  AddPoint (const gp_Pnt &P) 
Brings together the global properties already retained by this framework with those induced by the point Pnt. Pnt may be the first point of the current system. A point mass is attached to the point Pnt, it is either equal to 1. or to Density. More...  
void  AddPoint (const gp_Pnt &P, const Standard_Real Density) 
Adds a new point P with its density in the system of points Exceptions Standard_DomainError if the mass value Density is less than gp::Resolution(). More...  
GProp_PGProps (const TColgp_Array1OfPnt &Pnts)  
computes the global properties of the system of points Pnts. The density of the points are defaulted to all being 1 More...  
GProp_PGProps (const TColgp_Array2OfPnt &Pnts)  
computes the global properties of the system of points Pnts. The density of the points are defaulted to all being 1 More...  
GProp_PGProps (const TColgp_Array1OfPnt &Pnts, const TColStd_Array1OfReal &Density)  
computes the global properties of the system of points Pnts. A density is associated with each point. More...  
GProp_PGProps (const TColgp_Array2OfPnt &Pnts, const TColStd_Array2OfReal &Density)  
computes the global properties of the system of points Pnts. A density is associated with each point. More...  
Public Member Functions inherited from GProp_GProps  
GProp_GProps ()  
The origin (0, 0, 0) of the absolute cartesian coordinate system is used to compute the global properties. More...  
GProp_GProps (const gp_Pnt &SystemLocation)  
The point SystemLocation is used to compute the gobal properties of the system. For more accuracy it is better to define this point closed to the location of the system. For example it could be a point around the centre of mass of the system. This point is referred to as the reference point for this framework. For greater accuracy it is better for the reference point to be close to the location of the system. It can, for example, be a point near the center of mass of the system. At initialization, the framework is empty; i.e. it retains no dimensional information such as mass, or inertia. However, it is now able to bring together global properties of various other systems, whose global properties have already been computed using another framework. To do this, use the function Add to define the components of the system. Use it once per component of the system, and then use the interrogation functions available to access the computed values. More...  
void  Add (const GProp_GProps &Item, const Standard_Real Density=1.0) 
Either. More...  
Standard_Real  Mass () const 
Returns the mass of the current system. If no density is attached to the components of the current system the returned value corresponds to : More...  
gp_Pnt  CentreOfMass () const 
Returns the center of mass of the current system. If the gravitational field is uniform, it is the center of gravity. The coordinates returned for the center of mass are expressed in the absolute Cartesian coordinate system. More...  
gp_Mat  MatrixOfInertia () const 
returns the matrix of inertia. It is a symmetrical matrix. The coefficients of the matrix are the quadratic moments of inertia. More...  
void  StaticMoments (Standard_Real &Ix, Standard_Real &Iy, Standard_Real &Iz) const 
Returns Ix, Iy, Iz, the static moments of inertia of the current system; i.e. the moments of inertia about the three axes of the Cartesian coordinate system. More...  
Standard_Real  MomentOfInertia (const gp_Ax1 &A) const 
computes the moment of inertia of the material system about the axis A. More...  
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 is coincident with the center of mass of the system. The associated moments are called the principal moments of inertia. This function computes the eigen values and the eigen vectors of the matrix of inertia of the system. Results are stored by using a presentation framework of principal properties of inertia (GProp_PrincipalProps object) which may be queried to access the value sought. More...  
Standard_Real  RadiusOfGyration (const gp_Ax1 &A) const 
Returns the radius of gyration of the current system about the axis A. More...  
Static Public Member Functions  
static gp_Pnt  Barycentre (const TColgp_Array1OfPnt &Pnts) 
Computes the barycentre of a set of points. The density of the points is defaulted to 1. More...  
static gp_Pnt  Barycentre (const TColgp_Array2OfPnt &Pnts) 
Computes the barycentre of a set of points. The density of the points is defaulted to 1. More...  
static void  Barycentre (const TColgp_Array1OfPnt &Pnts, const TColStd_Array1OfReal &Density, Standard_Real &Mass, gp_Pnt &G) 
Computes the barycentre of a set of points. A density is associated with each point. More...  
static void  Barycentre (const TColgp_Array2OfPnt &Pnts, const TColStd_Array2OfReal &Density, Standard_Real &Mass, gp_Pnt &G) 
Computes the barycentre of a set of points. A density is associated with each point. More...  
Additional Inherited Members  
Protected Attributes inherited from GProp_GProps  
gp_Pnt  g 
gp_Pnt  loc 
Standard_Real  dim 
gp_Mat  inertia 
A framework for computing the global properties of a set of points. A point mass is attached to each point. The global mass of the system is the sum of each individual mass. By default, the point mass is equal to 1 and the mass of a system composed of N points is equal to N. Warning A framework of this sort provides functions to handle sets of points easily. But, like any GProp_GProps object, by using the Add function, it can theoretically bring together the computed global properties and those of a system more complex than a set of points . The mass of each point and the density of each component of the composed system must be coherent. Note that this coherence cannot be checked. Nonetheless, you are advised to restrict your use of a GProp_PGProps object to a set of points and to create a GProp_GProps object in order to bring together global properties of different systems.
GProp_PGProps::GProp_PGProps  (  ) 
Initializes a framework to compute global properties on a set of points. The point relative to which the inertia of the system is computed will be the origin (0, 0, 0) of the absolute Cartesian coordinate system. At initialization, the framework is empty, i.e. it retains no dimensional information such as mass and inertia. It is, however, now able to keep global properties of a set of points while new points are added using the AddPoint function. The set of points whose global properties are brought together by this framework will then be referred to as the current system. The current system is, however, not kept by this framework, which only keeps that system's global properties. Note that the current system may be more complex than a set of points.
GProp_PGProps::GProp_PGProps  (  const TColgp_Array1OfPnt &  Pnts  ) 
computes the global properties of the system of points Pnts. The density of the points are defaulted to all being 1
GProp_PGProps::GProp_PGProps  (  const TColgp_Array2OfPnt &  Pnts  ) 
computes the global properties of the system of points Pnts. The density of the points are defaulted to all being 1
GProp_PGProps::GProp_PGProps  (  const TColgp_Array1OfPnt &  Pnts, 
const TColStd_Array1OfReal &  Density  
) 
computes the global properties of the system of points Pnts. A density is associated with each point.
raises if a density is lower or equal to Resolution from package gp.
raises if the length of Pnts and the length of Density is not the same.
GProp_PGProps::GProp_PGProps  (  const TColgp_Array2OfPnt &  Pnts, 
const TColStd_Array2OfReal &  Density  
) 
computes the global properties of the system of points Pnts. A density is associated with each point.
Raised if a density is lower or equal to Resolution from package gp.
Raised if the length of Pnts and the length of Density is not the same.
void GProp_PGProps::AddPoint  (  const gp_Pnt &  P  ) 
Brings together the global properties already retained by this framework with those induced by the point Pnt. Pnt may be the first point of the current system. A point mass is attached to the point Pnt, it is either equal to 1. or to Density.
void GProp_PGProps::AddPoint  (  const gp_Pnt &  P, 
const Standard_Real  Density  
) 
Adds a new point P with its density in the system of points Exceptions Standard_DomainError if the mass value Density is less than gp::Resolution().

static 
Computes the barycentre of a set of points. The density of the points is defaulted to 1.

static 
Computes the barycentre of a set of points. The density of the points is defaulted to 1.

static 
Computes the barycentre of a set of points. A density is associated with each point.
raises if a density is lower or equal to Resolution from package gp.
Raised if the length of Pnts and the length of Density is not the same.

static 
Computes the barycentre of a set of points. A density is associated with each point.
Raised if a density is lower or equal to Resolution from package gp.
Raised if the length of Pnts and the length of Density is not the same.