Surface Area Calculation

The function

double CalculateArea( const RPArray<MbFace> & faces,
                            double            deviateAngle )

calculates the surface area of a set of faces.

The input parameters of the function are:

  • faces – a set of faces;

  • deviateAngle – a parameter that controls the calculation accuracy.

The function returns the area of the set of faces.

The function is declared in the mip_solid_mass_inertial.h file.

The deviateAngle parameter controls the calculation accuracy, and the computation time depends on its value. The deviateAngle parameter must be within the range 0.01 ≤ deviateAngle ≤ 0.35 radians. In the general case, the calculation is performed numerically and uses triangulation of the parameter domain of face surfaces. Triangulation of the parametric domain of faces is performed by the CalculateWire() method described in subsection Constructing polygons for an object, with stepData.stepType = ist_MipStep and stepData.angle = deviateAngle. The deviateAngle parameter defines the maximum allowable angle between normals of adjacent triangles and quadrilaterals of the surface triangulation.

The function

double CalculateArea( const MbFace & face,
                            double   deviateAngle )

calculates the surface area of a single face.

The input parameters of the function are:

  • face – a face;

  • deviateAngle – a parameter that controls the calculation accuracy.

The function returns the area of the face face.

The function is declared in the tri_face.h file.

The deviateAngle parameter controls the calculation accuracy, and the computation time depends on its value. The deviateAngle parameter must be within the range 0.01 ≤ deviateAngle ≤ 0.35 radians.

The function

double CalculateArea( const MbSurface & surface,
                            double      deviateAngle )

calculates the surface area.

The input parameters of the function are:

  • surface – a surface;

  • deviateAngle – a parameter that controls the calculation accuracy.

The function returns the area of the surface surface.

The function is declared in the mip_solid_area_volume.h file.

The deviateAngle parameter controls the calculation accuracy, and the computation time depends on its value. The deviateAngle parameter must be within the range 0.01 ≤ deviateAngle ≤ 0.35 radians.

The function

double CalculateAreaCentre( const MbFace &        face,
                                  double          deviateAngle,
                                  bool            byOuter,
                                  VERSION         version,
                                  MbCartPoint3D & centre )

calculates the surface area and the center of mass of a face.

The input parameters of the function are:

  • face – a face;

  • deviateAngle – a parameter that controls the calculation accuracy;

  • byOuter – a parameter that ignores inner cuts of the face;

  • version – a parameter that controls calculation versioning.

The output parameter of the function is centre, the center of mass of the face.

The function returns the area of the face.

The function is declared in the mip_solid_area_volume.h file.

The deviateAngle parameter controls the calculation accuracy, and the computation time depends on its value. The deviateAngle parameter must be within the range 0.01 ≤ deviateAngle ≤ 0.35 radians.

The byOuter parameter allows excluding inner cuts of the face from the calculation. If byOuter = true, the calculation assumes that inner cuts of the face are absent. For a normal calculation of the surface area and the center of mass of a face, byOuter should be set to false. The version parameter is required to support old calculation versions.

The function

double CalculateAreaCentre( const MbFaceShell &     shell,
                                  double            deviateAngle,
                                  MbCartPoint3D &   centre )

calculates the surface area and the center of mass of a set of faces.

The input parameters of the function are:

  • shell – a set of faces;

  • deviateAngle – a parameter that controls the calculation accuracy.

The output parameter of the function is centre, the center of mass of the set of faces.

The function returns the area of the set of faces.

The function is declared in the mip_solid_area_volume.h file.

The deviateAngle parameter controls the calculation accuracy, and the computation time depends on its value. The deviateAngle parameter must be within the range 0.01 ≤ deviateAngle ≤ 0.35 radians.