Salome HOME
Improve rigid constraint presentation
[modules/shaper.git] / src / GeomAPI / GeomAPI_Curve.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_Curve.hxx
4 // Created:     04 Sep 2014
5 // Author:      Mikhail PONIKAROV
6
7 #ifndef GeomAPI_Curve_H_
8 #define GeomAPI_Curve_H_
9
10 #include <GeomAPI_Shape.h>
11 #include <memory>
12
13 class GeomAPI_Pnt;
14
15 /**\class GeomAPI_Curve
16  * \ingroup DataModel
17  * \brief Interface to the generic curve object
18  */
19
20 class GEOMAPI_EXPORT GeomAPI_Curve : public GeomAPI_Interface
21 {
22  public:
23   /// Creation of empty (null) shape
24   GeomAPI_Curve();
25
26   /// Creates a curve from the shape (edge)
27   GeomAPI_Curve(const std::shared_ptr<GeomAPI_Shape>& theShape);
28
29   /// Returns true if curve is not initialized
30   bool isNull() const;
31
32   /// Returns whether the curve is linear
33   virtual bool isLine() const;
34
35   /// Returns whether the curve is circular
36   virtual bool isCircle() const;
37
38   /// Returns start parameter of the curve
39   double startParam() const { return myStart; }
40
41   /// Returns end parameter of the curve
42   double endParam() const { return myEnd; }
43
44   /// Returns point on the curve by parameter
45   /// \param theParam parameter on the curve
46   std::shared_ptr<GeomAPI_Pnt> getPoint(double theParam);
47
48 private:
49   double myStart;
50   double myEnd;
51 };
52
53 #endif