Salome HOME
Copyright update 2021
[modules/geom.git] / src / GEOMImpl / GEOMImpl_SplineDriver.cxx
index c4c3b509dd8b93f7250e206c549deec04154f094..196a93be8d85b0f0e380a9ee5cb7802a377c0c62 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  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
@@ -128,7 +128,7 @@ GEOMImpl_SplineDriver::GEOMImpl_SplineDriver()
 //function : Execute
 //purpose  :
 //=======================================================================
-Standard_Integer GEOMImpl_SplineDriver::Execute(TFunction_Logbook& log) const
+Standard_Integer GEOMImpl_SplineDriver::Execute(Handle(TFunction_Logbook)& log) const
 {
   if (Label().IsNull()) return 0;
   Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@@ -166,12 +166,14 @@ Standard_Integer GEOMImpl_SplineDriver::Execute(TFunction_Logbook& log) const
           }
         }
         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));
@@ -325,7 +327,7 @@ Standard_Integer GEOMImpl_SplineDriver::Execute(TFunction_Logbook& log) const
 
   aFunction->SetValue(aShape);
 
-  log.SetTouched(Label());
+  log->SetTouched(Label());
 
   return 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,5 +399,4 @@ GetCreationInformation(std::string&             theOperationName,
   return true;
 }
 
-IMPLEMENT_STANDARD_HANDLE (GEOMImpl_SplineDriver,GEOM_BaseDriver);
-IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SplineDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_SplineDriver,GEOM_BaseDriver)