Salome HOME
Fix for the issue #593: do not remove naming attribute, but use TNaming_Builder for...
[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 class GeomAPI_Lin;
15
16 /**\class GeomAPI_Edge
17 * \ingroup DataModel
18  * \brief Interface to the edge object
19  */
20
21 class GEOMAPI_EXPORT GeomAPI_Edge : public GeomAPI_Shape
22 {
23 public:
24    /// Creation of empty (null) shape
25    GeomAPI_Edge();
26
27    /// Creation of edge by the edge-shape
28    GeomAPI_Edge(const std::shared_ptr<GeomAPI_Shape>& theShape);
29
30   /// Verifies that the edge is a line
31   bool isLine() const;
32
33   /// Verifies that the edge is a circle
34   bool isCircle() const;
35
36   /// Verifies that the edge is an arc of circle
37   bool isArc() const;
38
39   /// Returns the first vertex coordinates of the edge 
40   std::shared_ptr<GeomAPI_Pnt> firstPoint();
41
42   /// Returns the Last vertex coordinates of the edge 
43   std::shared_ptr<GeomAPI_Pnt> lastPoint();
44
45   /// Returns a circle if edge is based on the circle curve
46   std::shared_ptr<GeomAPI_Circ> circle();
47
48   /// Returns a line if edge is based on the linear curve
49   std::shared_ptr<GeomAPI_Lin> line();
50
51   /// Returns true if the current edge is geometrically equal to the given edge
52   bool isEqual(const std::shared_ptr<GeomAPI_Shape> theEdge) const;
53 };
54
55 #endif
56