Mass Properties
Method Introduced:
The function
pfcSolid::GetMassProperty provides information about the distribution of mass in the part or assembly. It can provide the information relative to a coordinate system datum, which you name, or the default one if you provide
null as the name. It returns a class called
MassProperty.
The class contains the following fields:
• The volume.
• The surface area.
• The density. The density value is 1.0, unless a material has been assigned.
• The mass.
• The center of gravity (COG).
• The inertia matrix.
• The inertia tensor.
• The inertia about the COG.
• The principal moments of inertia (the eigen values of the COG inertia).
• The principal axes (the eigenvectors of the COG inertia).
The method
pfcSolid::GetMassPropertyWithDensity calculates the mass properties of a part or an assembly in the specified coordinate system. The input arguments follow:
• CoordSysName—Name of the coordinate system. If this is Null, the method uses the default coordinate system.
• DensityOpt—Value of the density flag specified using the enumerated data type pfcMPDensityUse and the valid values are as follows:
◦ pfcMP_DENSITY_DEFAULT—Calculate the mass properties using the material density.
◦ pfcMP_DENSITY_USE_ALWAYS—Calculate the mass properties using the specified density, even if material has a defined density.
◦ pfcMP_DENSITY_USE_IF_MISSING—Calculate mass properties using specified density, even if material does not have a defined density.
• density—Density used while calculating mass properties depending on the value specified for the input argument DensityOpt.
The method
pfcAssembly::GetMassPropertyByCompPath calculates the mass properties of a solid that is referenced by the specified coordinate system selection, using the respective component paths. The input arguments follow:
• CompPath—Component path of the solid. If this is null, the top assembly is referred.
• CsysItem—Coordinate system model item. If this is null, default coordinate system is referred.
• CsysPath—Component path of the coordinate system. If this is null, default coordinate system is referred.