X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMImpl%2FGEOMImpl_ICurvesOperations.cxx;h=463af06e3fa0364dd257c3a9334dba63bc152d52;hb=3059f9d5521dd7c91c35c50afbd6beb18b8826fd;hp=364c16c2354f96bdffafd861494840ae68ed9d80;hpb=0b6826bc5f36b5420f41af1475e1a79371a25323;p=modules%2Fgeom.git diff --git a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx index 364c16c23..463af06e3 100644 --- a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2010 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 @@ -19,6 +19,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #include #include @@ -80,7 +81,7 @@ GEOMImpl_ICurvesOperations::~GEOMImpl_ICurvesOperations() * MakePolyline */ //============================================================================= -Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline (list thePoints) +Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline (std::list thePoints) { SetErrorCode(KO); @@ -101,7 +102,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline (list::iterator it = thePoints.begin(); + std::list::iterator it = thePoints.begin(); for (; it != thePoints.end(); it++, ind++) { Handle(GEOM_Function) aRefPnt = (*it)->GetLastFunction(); if (aRefPnt.IsNull()) { @@ -597,7 +598,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArcOfEllipse (Handle(GEOM_Ob */ //============================================================================= Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier - (list thePoints) + (std::list thePoints) { SetErrorCode(KO); @@ -618,7 +619,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier aCI.SetLength(aLen); int ind = 1; - list::iterator it = thePoints.begin(); + std::list::iterator it = thePoints.begin(); for (; it != thePoints.end(); it++, ind++) { Handle(GEOM_Function) aRefPnt = (*it)->GetLastFunction(); @@ -664,7 +665,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier */ //============================================================================= Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation - (list thePoints, + (std::list thePoints, bool theIsClosed) { SetErrorCode(KO); @@ -686,7 +687,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation aCI.SetLength(aLen); int ind = 1; - list::iterator it = thePoints.begin(); + std::list::iterator it = thePoints.begin(); for (; it != thePoints.end(); it++, ind++) { Handle(GEOM_Function) aRefPnt = (*it)->GetLastFunction(); @@ -722,7 +723,9 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation while (it != thePoints.end()) { pd << ", " << (*it++); } - pd << "])"; + pd << "]"; + if ( theIsClosed ) pd << ", True"; + pd << ")"; SetErrorCode(OK); return aSpline; @@ -734,7 +737,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation */ //============================================================================= Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher (const char* theCommand, - list theWorkingPlane) + std::list theWorkingPlane) { SetErrorCode(KO); @@ -757,7 +760,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher (const char* theCom aCI.SetCommand(aCommand); int ind = 1; - list::iterator it = theWorkingPlane.begin(); + std::list::iterator it = theWorkingPlane.begin(); for (; it != theWorkingPlane.end(); it++, ind++) aCI.SetWorkingPlane(ind, *it); @@ -797,7 +800,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher (const char* theCom * Make3DSketcher */ //============================================================================= -Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcher (list theCoordinates) +Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcher (std::list theCoordinates) { SetErrorCode(KO); @@ -815,7 +818,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcher (list the GEOMImpl_I3DSketcher aCI (aFunction); int nbOfCoords = 0; - list::iterator it = theCoordinates.begin(); + std::list::iterator it = theCoordinates.begin(); for (; it != theCoordinates.end(); it++) nbOfCoords++;