Salome HOME
updated copyright message
[modules/shaper.git] / src / GeomAPI / GeomAPI_Lin2d.cpp
index 18351340a36e219c4591272dce20faf167276f81..c74ed5c8b0fe2873f814404c50eb862eb119f3c9 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 <GeomAPI_Lin2d.h>
@@ -81,8 +80,8 @@ const std::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::intersect(
     const std::shared_ptr<GeomAPI_Lin2d>& theLine) const
 {
   IntAna2d_AnaIntersection anInter(*MY_LIN2D, theLine->impl<gp_Lin2d>());
-  if (!anInter.IsDone() || anInter.IsEmpty())
-  return std::shared_ptr<GeomAPI_Pnt2d>();
+  if (!anInter.IsDone() || anInter.NbPoints() == 0)
+    return std::shared_ptr<GeomAPI_Pnt2d>();
   const gp_Pnt2d& aResult = anInter.Point(1).Value();
   return std::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aResult.X(), aResult.Y()));
 }