Salome HOME
Issue #1860: fix end lines with spaces
[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_Curve : public GeomAPI_Interface
21 {
22  public:
23   /// Creation of empty (null) shape
24   GEOMAPI_EXPORT
25   GeomAPI_Curve();
26
27   /// Creates a curve from the shape (edge)
28   GEOMAPI_EXPORT
29   GeomAPI_Curve(const std::shared_ptr<GeomAPI_Shape>& theShape);
30
31   /// Returns true if curve is not initialized
32   GEOMAPI_EXPORT
33   bool isNull() const;
34
35   /// Returns whether the curve is linear
36   GEOMAPI_EXPORT
37   virtual bool isLine() const;
38
39   /// Returns whether the curve is circular
40   GEOMAPI_EXPORT
41   virtual bool isCircle() const;
42
43   /// Returns start parameter of the curve
44   GEOMAPI_EXPORT
45   double startParam() const { return myStart; }
46
47   /// Returns end parameter of the curve
48   GEOMAPI_EXPORT
49   double endParam() const { return myEnd; }
50
51   /// Returns point on the curve by parameter
52   /// \param theParam parameter on the curve
53   GEOMAPI_EXPORT
54   std::shared_ptr<GeomAPI_Pnt> getPoint(double theParam);
55
56 private:
57   double myStart;
58   double myEnd;
59 };
60
61 #endif