1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_ShapeProps.cpp
5 // Author: Dmitry Bobylev
7 #include <GeomAlgoAPI_ShapeProps.h>
9 #include <BRepGProp.hxx>
10 #include <GProp_GProps.hxx>
11 #include <TopoDS_Shape.hxx>
14 double GeomAlgoAPI_ShapeProps::volume(std::shared_ptr<GeomAPI_Shape> theShape)
17 TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
18 BRepGProp::VolumeProperties(aShape, aGProps);
19 return aGProps.Mass();