Salome HOME
Issue #662 Warning on remove or rename of (may be) used object in PartSet
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_ShapeProps.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAlgoAPI_ShapeProps.h
4 // Created:     8 May 2015
5 // Author:      Dmitry Bobylev
6
7 #ifndef GeomAlgoAPI_ShapeProps_H_
8 #define GeomAlgoAPI_ShapeProps_H_
9
10 #include <GeomAlgoAPI.h>
11
12 #include <GeomAPI_Pnt.h>
13 #include <GeomAPI_Shape.h>
14
15 /** \class GeomAlgoAPI_ShapeProps
16  *  \ingroup DataAlgo
17  *  \brief Allows to compute different shape props.
18  */
19 class GEOMALGOAPI_EXPORT GeomAlgoAPI_ShapeProps
20 {
21 public:
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);
24
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);
28 };
29
30 #endif
31