Salome HOME
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
[modules/shaper.git] / src / GeomAPI / GeomAPI_Edge.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_Edge.hxx
4 // Created:     24 Jul 2014
5 // Author:      Artem ZHIDKOV
6
7 #ifndef GeomAPI_Edge_H_
8 #define GeomAPI_Edge_H_
9
10 #include <GeomAPI_Shape.h>
11
12 class GeomAPI_Pnt;
13 class GeomAPI_Circ;
14
15 /**\class GeomAPI_Edge
16 * \ingroup DataModel
17  * \brief Interface to the edge object
18  */
19
20 class GEOMAPI_EXPORT GeomAPI_Edge : public GeomAPI_Shape
21 {
22 public:
23    /// Creation of empty (null) shape
24    GeomAPI_Edge();
25
26    /// Creation of edge by the edge-shape
27    GeomAPI_Edge(const std::shared_ptr<GeomAPI_Shape>& theShape);
28
29   /// Verifies that the edge is a line
30   bool isLine() const;
31
32   /// Verifies that the edge is a circle
33   bool isCircle() const;
34
35   /// Verifies that the edge is an arc of circle
36   bool isArc() const;
37
38   /// Returns the first vertex coordinates of the edge 
39   std::shared_ptr<GeomAPI_Pnt> firstPoint();
40
41   /// Returns the Last vertex coordinates of the edge 
42   std::shared_ptr<GeomAPI_Pnt> lastPoint();
43
44   /// Returns a circle if edge is based on the cirsle curve
45   std::shared_ptr<GeomAPI_Circ> circle();
46
47   /// Returns true if the current edge is geometrically equal to the given edge
48   bool isEqual(const std::shared_ptr<GeomAPI_Shape> theEdge) const;
49 };
50
51 #endif
52