Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_Circ2dBuilder.cpp
index 6ae62b929644a08106da15b6c70934eca34c3a15..f0d92c7f75d22d6c043c9c57913bd564f281cdfe 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2017-20xx CEA/DEN, EDF R&D
-
-// File:        GeomAlgoAPI_Circ2dBuilder.cpp
-// Created:     3 April 2017
-// Author:      Artem ZHIDKOV
+// Copyright (C) 2014-2017  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
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// 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
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
 
 #include <GeomAlgoAPI_Circ2dBuilder.h>
 #include <GeomAPI_Ax3.h>
@@ -167,7 +181,7 @@ private:
 
     double aParSol, aPonTgCurve;
     gp_Pnt2d aTgPnt;
-    for (int i = 1; i <= aNbSol && aCurve; ++i) {
+    for (int i = 1; i <= aNbSol && aNbSol > 1 && aCurve; ++i) {
       theBuilder->Tangency1(i, aParSol, aPonTgCurve, aTgPnt);
       if (isParamOnCurve(aPonTgCurve, aCurve)) {
         double aDist = distanceToClosestPoint(theBuilder->ThisSolution(i));