Salome HOME
Updated copyright comment
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_CurveBuilder.h
index 89c4255bb0fdb2f0159e5c9cff24ebc7eccaa2f7..1b3e9b4239fcbe7877920d46f2c1dfb7a92b8c1d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // 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
+// 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>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #ifndef GeomAlgoAPI_CurveBuilder_H_
 
 /// \class GeomAlgoAPI_CurveBuilder
 /// \ingroup DataAlgo
-/// \brief Allows to create interpolation curve.
+/// \brief Allows to create a curve by the list of point.
 class GeomAlgoAPI_CurveBuilder
 {
  public:
    /// \brief Creates an interpolation curve from points.
    /// \param[in] thePoints list of points.
-   /// \param[in] theIsClosed defines whether the curve to be closed.
+   /// \param[in] thePeriodic defines whether the curve to be periodic.
    /// \param[in] theIsToReorder defines whether to change the order of points to construct
    ///            the shortest curve.
    /// \param[in] theStartTangent vector tangent to the start of curve.
    /// \param[in] theEndTangent vector tangent to the end of curve.
    /// \return Interpolation curve (edge). Empty in case of error or bad input.
    GEOMALGOAPI_EXPORT static GeomEdgePtr edge(const std::list<GeomPointPtr>& thePoints,
-                                              const bool theIsClosed,
+                                              const bool thePeriodic,
                                               const bool theIsToReorder,
                                               const GeomDirPtr& theStartTangent,
                                               const GeomDirPtr& theEndTangent);
+
+   /// \brief Approximate the given points by a curve.
+   /// \param[in] thePoints list of points.
+   /// \param[in] thePeriodic defines whether the curve to be periodic.
+   /// \param[in] thePrecision how close the curve should be to the points.
+   /// \return Apporimation curve (edge). Empty in case of error or bad input.
+   GEOMALGOAPI_EXPORT static GeomEdgePtr approximate(const std::list<GeomPointPtr>& thePoints,
+                                                     const bool thePeriodic,
+                                                     const double thePrecision);
+
+   /// \brief Reoder the list of points to get a polyline of minimal length
+   GEOMALGOAPI_EXPORT static void reorderPoints(std::list<GeomPointPtr>& thePoints);
 };
 
 #endif