DMU Space Analysis

Computing a Mass and a Center of Gravity's Position


This macro shows you how to use inertia to compute product's mass and position of the center of gravity. The macro assumes that a CATProduct has been loaded and that one component is selected.

This image shows the selection state before the use of the macro :

 

This image shows the result of the macro :

 

CAASpaInertia is launched in CATIA [1]. A previously opened document is needed.

CAASpaInertia.CATScript is located in the CAAScdDmuUseCases module. Execute macro (Windows only).

 

CAASpaInertia includes four steps:

  1. Retrieving the selected component
  2. Compute the inertia
  3. Read the inertia data
  4. Display the results

Retrieving the selected component

The FindObject method is used on the Selection object with the string "CATIAProduct" to retrieve the selected oProduct (see Product ).

Compute the inertia

GetTechnologicalObject method, with the string "Inertia", is used to compute the oInertia object (see Inertia ) related to the oProduct component.

Read the inertia data

The Mass and GetCOGPosition methods are used on the oInertia object to read the corresponding inertia data.

Display the results

The results are displayed in a Msgbox.

[Top]


In Short

This use case has shown how to use inertia in order to compute mass and position of the center of gravity. Specifically, it has illustrated how to :

[Top]


References

[1] Replaying a Macro
[2] Space Analysis automation objects

[Top]


DMU Navigator Home DMU Space Analysis Home DMU Kinematics Simulation Home

Copyright © 2001, Dassault Systèmes. All rights reserved.