X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMImpl%2FGEOMImpl_PolylineDriver.cxx;h=0a6d2420ca7ffc7b1d7042e034a7a9441fe2ff97;hb=66a2554913f5c53b13a4e811160becede9b11132;hp=60a8aaa409e6ca6103d170e323bb27b9d56371ea;hpb=ff7fc4d6c2f5e6de741fd7f0b9ebf01de04d0e10;p=modules%2Fgeom.git diff --git a/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx b/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx index 60a8aaa40..0a6d2420c 100644 --- a/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2022 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 @@ -69,8 +69,7 @@ GEOMImpl_PolylineDriver::GEOMImpl_PolylineDriver() //function : MakePolyline2D //purpose : //======================================================================= -Standard_Integer GEOMImpl_PolylineDriver::MakePolyline2D - (TFunction_Logbook& log) const +Standard_Integer GEOMImpl_PolylineDriver::MakePolyline2D(Handle(TFunction_Logbook)& log) const { if (Label().IsNull()) { return 0; @@ -105,7 +104,7 @@ Standard_Integer GEOMImpl_PolylineDriver::MakePolyline2D return 0; } - if (aNbSections != aCoords.size()) { + if (aNbSections != (int)aCoords.size()) { return 0; } @@ -179,7 +178,7 @@ Standard_Integer GEOMImpl_PolylineDriver::MakePolyline2D } aFunction->SetValue(aShape); - log.SetTouched(Label()); + log->SetTouched(Label()); return 1; } @@ -188,7 +187,7 @@ Standard_Integer GEOMImpl_PolylineDriver::MakePolyline2D //function : Execute //purpose : //======================================================================= -Standard_Integer GEOMImpl_PolylineDriver::Execute(TFunction_Logbook& log) const +Standard_Integer GEOMImpl_PolylineDriver::Execute(Handle(TFunction_Logbook)& log) const { if (Label().IsNull()) return 0; Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); @@ -273,7 +272,7 @@ Standard_Integer GEOMImpl_PolylineDriver::Execute(TFunction_Logbook& log) const aFunction->SetValue(aShape); - log.SetTouched(Label()); + log->SetTouched(Label()); return 1; } @@ -319,10 +318,8 @@ GetCreationInformation(std::string& theOperationName, Handle(TColStd_HArray1OfReal) coords = aCI.GetCoordinates(); if ( coords->Length() > 3 ) 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++ ) << " ) "; + for ( int i = coords->Lower(), nb = coords->Lower()+(coords->Length()/3)*3; i < nb; i+=3) + pntParam << "( " << coords->Value( i ) << ", " << coords->Value( i+1 ) << ", " << coords->Value( i+2 ) << " ) "; } else { @@ -384,7 +381,7 @@ GetCreationInformation(std::string& theOperationName, AddParam(theParams, "Number of curves", aNbCurves); aP2d.GetCoords(aCoords); - Standard_Integer aNbCoords = aCoords.size(); + //Standard_Integer aNbCoords = aCoords.size(); std::list >::const_iterator anIt = aCoords.begin(); @@ -438,5 +435,4 @@ GetCreationInformation(std::string& theOperationName, return true; } -IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PolylineDriver,GEOM_BaseDriver); -IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PolylineDriver,GEOM_BaseDriver); +IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PolylineDriver,GEOM_BaseDriver)