Salome HOME
Update movement of a circle
[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_Edge : public GeomAPI_Shape
22 {
23 public:
24    /// Creation of empty (null) shape
25   GEOMAPI_EXPORT 
26    GeomAPI_Edge();
27
28    /// Creation of edge by the edge-shape
29   GEOMAPI_EXPORT 
30    GeomAPI_Edge(const std::shared_ptr<GeomAPI_Shape>& theShape);
31
32   /// Verifies that the edge is a line
33   GEOMAPI_EXPORT 
34   bool isLine() const;
35
36   /// Verifies that the edge is a circle
37   GEOMAPI_EXPORT 
38   bool isCircle() const;
39
40   /// Verifies that the edge is an arc of circle
41   GEOMAPI_EXPORT 
42   bool isArc() const;
43
44   /// Returns the first vertex coordinates of the edge 
45   GEOMAPI_EXPORT 
46   std::shared_ptr<GeomAPI_Pnt> firstPoint();
47
48   /// Returns the Last vertex coordinates of the edge 
49   GEOMAPI_EXPORT 
50   std::shared_ptr<GeomAPI_Pnt> lastPoint();
51
52   /// Returns a circle if edge is based on the circle curve
53   GEOMAPI_EXPORT 
54   std::shared_ptr<GeomAPI_Circ> circle();
55
56   /// Returns a line if edge is based on the linear curve
57   GEOMAPI_EXPORT 
58   std::shared_ptr<GeomAPI_Lin> line();
59
60   /// Returns true if the current edge is geometrically equal to the given edge
61   GEOMAPI_EXPORT 
62   bool isEqual(const std::shared_ptr<GeomAPI_Shape> theEdge) const;
63
64   /// Returns range of parameter on the curve
65   GEOMAPI_EXPORT 
66   void getRange(double& theFirst, double& theLast) const;
67 };
68
69 #endif
70