Salome HOME
Copyright update 2021
[modules/geom.git] / src / GEOMImpl / GEOMImpl_SplineDriver.cxx
index ccc9a793fc781f89b6b49d53c907e73e8623f138..196a93be8d85b0f0e380a9ee5cb7802a377c0c62 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -166,12 +166,14 @@ Standard_Integer GEOMImpl_SplineDriver::Execute(Handle(TFunction_Logbook)& log)
           }
         }
         if (nearest > 0 && nearest != i + 1) {
-          // Keep given order of points to use it in case of equidistant candidates
-          //               .-<---<-.
-          //              /         \
-          // o  o  o  c  o->o->o->o->n  o  o
-          //          |  |           |
-          //          i i+1       nearest
+          /*====================================================================
+          Keep given order of points to use it in case of equidistant candidates
+                         .-<---<-.
+                        /         \ 
+           o  o  o  c  o->o->o->o->n  o  o
+                    |  |           |
+                    i i+1       nearest
+          ======================================================================*/
           gp_Pnt p = points->Value(nearest);
           for (int j = nearest; j > i+1; j--)
             points->SetValue(j, points->Value(j-1));
@@ -374,11 +376,11 @@ GetCreationInformation(std::string&             theOperationName,
       {
         Handle(TColStd_HArray1OfReal) coords = aCI.GetCoordinates();
         GEOM_Param& pntParam = AddParam( theParams, "Points");
-        pntParam << ( coords->Length() ) / 3 << " points: ";
-        for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; )
-          pntParam << "( " << coords->Value( i++ )
-                   << ", " << coords->Value( i++ )
-                   << ", " << coords->Value( i++ ) << " ) ";
+        pntParam << ( coords->Length() / 3 ) << " points: ";
+        for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; i += 3 )
+          pntParam << "( " << coords->Value( i+0 )
+                   << ", " << coords->Value( i+1 )
+                   << ", " << coords->Value( i+2 ) << " ) ";
       }
       else
       {
@@ -397,4 +399,4 @@ GetCreationInformation(std::string&             theOperationName,
   return true;
 }
 
-IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SplineDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SplineDriver,GEOM_BaseDriver)