Physical properties

Types

A3DPhysicalPropertiesData

Functions

A3DStatus

A3DComputePhysicalProperties

A3DStatus

A3DComputeFaceArea

A3DStatus

A3DComputePolyBrepPhysicalProperties

A3DStatus

A3DComputeModelFilePhysicalProperties

Detailed Description

group a3d_physical_properties

Version

5.2

Function Documentation

A3DStatus A3DComputePhysicalProperties(const A3DRiBrepModel *p, const A3DVector3dData *psScale, A3DPhysicalPropertiesData *psPhysicalPropertiesData)

Function to compute the physical properties (surface area, volume and gravity center, and since 11.2 the surfacic gravity center and the surfacic and volumic inertia matrix) of a BrepModel.

To obtain the values in the unit of the model file, pass the scaling of the B-rep in the psScale parameter.

Note that since 11.2, the input psPhysicalPropertiesData structure now has a couple of input parameters with which precision can be adjusted, in addition to the new return values.

The value of psScale should be the cumulative scaling that results from traversing the assembly tree from the root to the designated B-rep, multiplying the scaling of the current node by the cumulative scaling of all of its parent nodes.

The inertia matrices are provided relative to the computed gravity centers, with respect to the global X, Y and Z directions.

Version

5.2

Parameters
  • p[in] The input B-rep model.

  • psScale[in] The optional scale.

  • psPhysicalPropertiesData[inout] The computed physical properties.

Return values
  • A3D_SUCCESS

  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_INVALID_ENTITY_TYPE

  • A3D_RI_BREPMODEL_CANNOT_ACCESS_GEOMETRY

  • A3D_TOOLS_COMPUTE_UV_FAILURE

  • A3D_ERROR

  • A3D_INCOMPATIBLE_FUNCTION_WITH_KEEP_PARSED_ENTITY_MODE

  • A3D_TOOLS_TESSELLATION_ISSUE

  • A3D_TOOLS_PHYSICALPROPERTIES_FAILURE

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DComputeFaceArea(const A3DTopoFace *pFace, const A3DTopoContext *pBrepDataTopoContext, A3DDouble *pArea)

Function to compute the surface of the current A3DTopoFace.

The current TopoContext is needed in order to get the correct current scale.

Version

7.0

Parameters
  • pFace[in] The input A3DTopoFace.

  • pBrepDataTopoContext[in] The corresponding A3DTopoContext of the current A3DTopoBrepData who is owing the A3DTopoFace.

  • pArea[out] The surface of the A3DTopoFace in the current unit.

Return values
  • A3D_SUCCESS

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_ENTITY_NULL

  • A3D_INITIALIZE_NOT_CALLED

  • A3D_ERROR

  • A3D_TOOLS_TESSELLATION_ISSUE

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DComputePolyBrepPhysicalProperties(const A3DRiPolyBrepModel *p, const A3DVector3dData *psScale, A3DPhysicalPropertiesData *psPhysicalPropertiesData)

Function to compute the physical properties (surface area, volume and gravity center, and since 11.2 the surfacic gravity center and the surfacic and volumic inertia matrix) of a PolyBrepModel.

An optional scale, psScale, can be used. It can be either uniform or not. Physical properties will be computed after having scaled the geometrical data in the A3DRiPolyBrepModel.

Note that since 11.2, the input psPhysicalPropertiesData structure now has a couple of input parameters with which precision can be adjusted, in addition to the new return values.

The inertia matrices are provided relative to the computed gravity centers, with respect to the global X, Y and Z directions.

Version

6.1

Parameters
  • p[in] The input poly B-rep model.

  • psScale[in] The optional scale.

  • psPhysicalPropertiesData[inout] The wanted physical properties.

Return values
  • A3D_SUCCESS

  • A3D_INVALID_ENTITY_TYPE

  • A3D_INVALID_ENTITY_NULL

  • A3D_INITIALIZE_NOT_CALLED

  • A3D_ERROR

  • A3D_INCOMPATIBLE_FUNCTION_WITH_KEEP_PARSED_ENTITY_MODE

  • A3D_TOOLS_TESSELLATION_ISSUE

  • A3D_TOOLS_PHYSICALPROPERTIES_FAILURE

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DComputeModelFilePhysicalProperties(const A3DAsmModelFile *p, A3DPhysicalPropertiesData *psPhysicalProperties)

Function to compute the physical properties (surface area, volume and gravity center, and since 11.2 the surfacic gravity center and the surfacic and volumic inertia matrix) of a modelfile, typically an assembly.

Data is returned in the modelfile unit, without density.

Note that since 11.2, the input psPhysicalPropertiesData structure now has a couple of input parameters with which precision can be adjusted, in addition to the new return values.

The inertia matrices are provided relative to the computed gravity centers, with respect to the global X, Y and Z directions. The return values are provided in the modelfile’s unit. The surfacic quantities take into account all representation items, whereas the ones for which the volume was not computed will not be used for the volumic quantities. Note that density is not taken into account. Return values are purely volumic or surfacic. For models with a constant density different than 1 unit of weight per unit of volume, results must be adjusted: matrices must be multiplied by the density of the input CAD file.

Version

5.2

Parameters
  • p[in] The input modelfile.

  • psPhysicalProperties[inout] The physical properties.

Return values
  • A3D_SUCCESS

  • A3D_INITIALIZE_NOT_CALLED

  • A3D_INVALID_ENTITY_NULL

  • A3D_RI_BREPMODEL_CANNOT_ACCESS_GEOMETRY

  • A3D_TOOLS_COMPUTE_UV_FAILURE

  • A3D_ERROR

  • A3D_INCOMPATIBLE_FUNCTION_WITH_KEEP_PARSED_ENTITY_MODE

  • A3D_TOOLS_TESSELLATION_ISSUE

  • A3D_TOOLS_PHYSICALPROPERTIES_FAILURE

Returns

A3D_SUCCESS in case of success or an error code