-// Copyright (C) 2018-20xx CEA/DEN, EDF R&D
+// Copyright (C) 2018-2020 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "GeomAPI_Solid.h"
anApex->z() + aParam0 * anAxis->z()));
// calculate radii of caps
- aParam0 /= Cos(aSemiAngle);
- aParam1 /= Cos(aSemiAngle);
+ aParam0 *= Tan(aSemiAngle);
+ aParam1 *= Tan(aSemiAngle);
aCone = GeomConePtr(new GeomAPI_Cone(aLocation, anAxis, aSemiAngle, aParam0, aParam1));
}
return anInnerPoint;
GProp_GProps aProps;
- BRepGProp::SurfaceProperties(aSolid, aProps, 1.e-4);
+ BRepGProp::VolumeProperties(aSolid, aProps, 1.e-4);
gp_Pnt aPnt = aProps.CentreOfMass();
anInnerPoint = GeomPointPtr(new GeomAPI_Pnt(aPnt.X(), aPnt.Y(), aPnt.Z()));