Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
[modules/shaper.git] / src / GeomAPI / GeomAPI_Edge.h
index bd186c22b9659cc632cf5884fcd9b8ea19a1fb0e..1ecbde0fc6797b1c08beda0b7377ca23e34b6171 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        GeomAPI_Edge.hxx
 // Created:     24 Jul 2014
 // Author:      Artem ZHIDKOV
@@ -7,24 +9,23 @@
 
 #include <GeomAPI_Shape.h>
 
+class GeomAPI_Pnt;
+class GeomAPI_Circ;
+class GeomAPI_Lin;
+
 /**\class GeomAPI_Edge
- * \ingroup DataModel
+* \ingroup DataModel
  * \brief Interface to the edge object
  */
 
-class GEOMAPI_EXPORT GeomAPI_Edge: public GeomAPI_Shape
+class GEOMAPI_EXPORT GeomAPI_Edge : public GeomAPI_Shape
 {
 public:
-  /// Creation of empty (null) shape
-  GeomAPI_Edge();
+   /// Creation of empty (null) shape
+   GeomAPI_Edge();
 
-  /// Returns whether the shape is a vertex
-  virtual bool isVertex() const
-  { return false; }
-
-  /// Returns whether the shape is an edge
-  virtual bool isEdge() const
-  { return true; }
+   /// Creation of edge by the edge-shape
+   GeomAPI_Edge(const std::shared_ptr<GeomAPI_Shape>& theShape);
 
   /// Verifies that the edge is a line
   bool isLine() const;
@@ -34,6 +35,21 @@ public:
 
   /// Verifies that the edge is an arc of circle
   bool isArc() const;
+
+  /// Returns the first vertex coordinates of the edge 
+  std::shared_ptr<GeomAPI_Pnt> firstPoint();
+
+  /// Returns the Last vertex coordinates of the edge 
+  std::shared_ptr<GeomAPI_Pnt> lastPoint();
+
+  /// Returns a circle if edge is based on the circle curve
+  std::shared_ptr<GeomAPI_Circ> circle();
+
+  /// Returns a line if edge is based on the linear curve
+  std::shared_ptr<GeomAPI_Lin> line();
+
+  /// Returns true if the current edge is geometrically equal to the given edge
+  bool isEqual(const std::shared_ptr<GeomAPI_Shape> theEdge) const;
 };
 
 #endif