Salome HOME
Task #3231: Sketcher Offset of a curve
[modules/shaper.git] / src / GeomAPI / GeomAPI_BSpline.h
index 95468bec452e447402013653e038af3e95fb636d..251122dd8c93f270eef921dcc7cef466fd2981fc 100644 (file)
 #include <memory>
 
 class GeomAPI_Pnt;
+class GeomAPI_BSpline;
+
+//! Pointer on the object
+typedef std::shared_ptr<GeomAPI_BSpline> GeomBSplinePtr;
 
 /**\class GeomAPI_BSpline
  * \ingroup DataModel
@@ -36,7 +40,7 @@ class GeomAPI_BSpline : public GeomAPI_Interface
 {
 public:
   /// Creation of B-spline defined by a curve
-  GEOMAPI_EXPORT GeomAPI_BSpline(const GeomCurvePtr& theCurve);
+  GEOMAPI_EXPORT GeomAPI_BSpline (const GeomCurvePtr& theCurve);
 
   /// Degree of B-spline curve
   GEOMAPI_EXPORT int degree() const;
@@ -55,9 +59,9 @@ public:
 
   /// Return \c true if the curve is periodic
   GEOMAPI_EXPORT bool isPeriodic() const;
-};
 
-//! Pointer on the object
-typedef std::shared_ptr<GeomAPI_BSpline> GeomBSplinePtr;
+  /// Convert any curve into a B-spline curve
+  GEOMAPI_EXPORT static GeomBSplinePtr convertToBSpline (const GeomCurvePtr& theCurve);
+};
 
 #endif