1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_ShapeProps.h
5 // Author: Dmitry Bobylev
7 #ifndef GeomAlgoAPI_ShapeProps_H_
8 #define GeomAlgoAPI_ShapeProps_H_
10 #include <GeomAlgoAPI.h>
12 #include <GeomAPI_Pnt.h>
13 #include <GeomAPI_Shape.h>
15 /** \class GeomAlgoAPI_ShapeProps
17 * \brief Allows to compute different shape props.
19 class GEOMALGOAPI_EXPORT GeomAlgoAPI_ShapeProps
22 /// \return the total volume of the solids of the current shape or 0.0 if it can be computed.
23 static double volume(std::shared_ptr<GeomAPI_Shape> theShape);
25 /// \return the centre of mass of the current face. The coordinates returned for the center of mass
26 /// are expressed in the absolute Cartesian coordinate system. (This function works only for surfaces).
27 static std::shared_ptr<GeomAPI_Pnt> centreOfMass(std::shared_ptr<GeomAPI_Shape> theShape);