Salome HOME
updated copyright message
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Placement.cpp
index c07cda2db43205b1c52ac3070ba255f2370e973e..4c297247b9b1751f89eaed80ed89046488b59b5f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-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 "GeomAlgoAPI_Placement.h"
@@ -177,7 +176,7 @@ void GeomAlgoAPI_Placement::build(const std::shared_ptr<GeomAPI_Shape>& theSourc
           aVec = aSrcDstDirections[0].Crossed(gp_Vec(aSrcDstPoints[0], aSrcDstPoints[1]));
           if (aVec.SquareMagnitude() < Precision::SquareConfusion()) { // lines are equal
             if (Abs(aSrcDstDirections[0].Y()) >= Precision::Confusion() ||
-              Abs(aSrcDstDirections[0].Z()) >= Precision::Confusion())
+                Abs(aSrcDstDirections[0].Z()) >= Precision::Confusion())
               aVec = gp::DX();
             else
               aVec = gp::DY();
@@ -198,8 +197,8 @@ void GeomAlgoAPI_Placement::build(const std::shared_ptr<GeomAPI_Shape>& theSourc
         gp_Vec aVec(aSrcDstPoints[anInd], aSrcDstPoints[1 - anInd]);
         aVec.Cross(aSrcDstDirections[anInd]);
         if (aVec.SquareMagnitude() < Precision::SquareConfusion()) { // point is on line
-          if (Abs(aSrcDstDirections[1 - anInd].Y()) >= Precision::Confusion() ||
-            Abs(aSrcDstDirections[1 - anInd].Z()) >= Precision::Confusion())
+          if (Abs(aSrcDstDirections[anInd].Y()) >= Precision::Confusion() ||
+              Abs(aSrcDstDirections[anInd].Z()) >= Precision::Confusion())
             aVec = gp::DX();
           else
             aVec = gp::DY();
@@ -235,7 +234,7 @@ void GeomAlgoAPI_Placement::build(const std::shared_ptr<GeomAPI_Shape>& theSourc
     // store the accumulated information about the result and this delta
     myTrsf.reset(new GeomAPI_Trsf(new gp_Trsf(aTrsf)));
     TopoDS_Shape aResult = aSourceShape.Moved(aDelta);
-    std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
+    aShape.reset(new GeomAPI_Shape());
     aShape->setImpl(new TopoDS_Shape(aResult));
     this->setShape(aShape);
     this->setDone(true); // it is allways true for simple transformation generation
@@ -252,7 +251,7 @@ void GeomAlgoAPI_Placement::build(const std::shared_ptr<GeomAPI_Shape>& theSourc
     }
     TopoDS_Shape aResult = aBuilder->Shape();
 
-    std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
+    aShape.reset(new GeomAPI_Shape());
     aShape->setImpl(new TopoDS_Shape(aResult));
     this->setShape(aShape);
     this->setDone(true);