Salome HOME
updated copyright message
[modules/shaper.git] / src / GeomAPI / GeomAPI_Shell.cpp
index ae5e12ae972a347398aa852ad71fefd8414fd931..0b07404d0a8b42144d972c14cef08288b618cb9b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2018-20xx  CEA/DEN, EDF R&D
+// Copyright (C) 2018-2023  CEA, EDF
 //
 // 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_Shell.h"
@@ -98,8 +97,8 @@ std::shared_ptr<GeomAPI_Cylinder> GeomAPI_Shell::getCylinder() const
 
   GeomPointPtr aLocation;
   GeomDirPtr anAxis;
-  double aRadius;
-  double aHeight;
+  double aRadius = 0.0;
+  double aHeight = 0.0;
 
   for (TopExp_Explorer anExp(impl<TopoDS_Shape>(), TopAbs_FACE); anExp.More(); anExp.Next()) {
     GeomFacePtr aFace(new GeomAPI_Face);
@@ -176,8 +175,8 @@ std::shared_ptr<GeomAPI_Cone> GeomAPI_Shell::getCone() const
 
   GeomPointPtr anApex;
   GeomDirPtr anAxis;
-  double aSemiAngle, aTanSemiAngle;
-  double aHeight1, aHeight2;
+  double aSemiAngle = 0.0, aTanSemiAngle = 0.0;
+  double aHeight1 = 0.0, aHeight2 = 0.0;
 
   for (TopExp_Explorer anExp(impl<TopoDS_Shape>(), TopAbs_FACE); anExp.More(); anExp.Next()) {
     GeomFacePtr aFace(new GeomAPI_Face);
@@ -211,7 +210,7 @@ std::shared_ptr<GeomAPI_Cone> GeomAPI_Shell::getCone() const
 
       double aSign = anAxis->dot(aCurCone->axis());
       double aCurSemiAngle = aCurCone->semiAngle();
-      double aTanCurSemiAngle = Tan(aSemiAngle);
+      double aTanCurSemiAngle = Tan(aCurSemiAngle);
 
       double aH = aCurCone->radius1() / aTanCurSemiAngle * aSign;
       if (aH < aHeight1)