1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_Edge.hxx
4 // Created: 24 Jul 2014
5 // Author: Artem ZHIDKOV
7 #ifndef GeomAPI_Edge_H_
8 #define GeomAPI_Edge_H_
10 #include <GeomAPI_Shape.h>
16 class GeomAPI_Ellipse;
18 /**\class GeomAPI_Edge
20 * \brief Interface to the edge object
23 class GeomAPI_Edge : public GeomAPI_Shape
26 /// Makes an undefined Edge (no geometry).
30 /// Creation of edge by the edge-shape
32 GeomAPI_Edge(const std::shared_ptr<GeomAPI_Shape>& theShape);
34 /// Verifies that the edge is a line
38 /// Verifies that the edge is a circle
40 bool isCircle() const;
42 /// Verifies that the edge is an arc of circle
46 /// Verifies that the edge is an arc of circle
48 bool isEllipse() const;
50 /// Returns the first vertex coordinates of the edge
52 std::shared_ptr<GeomAPI_Pnt> firstPoint();
54 /// Returns the Last vertex coordinates of the edge
56 std::shared_ptr<GeomAPI_Pnt> lastPoint();
58 /// Returns a circle if edge is based on the circle curve
60 std::shared_ptr<GeomAPI_Circ> circle() const;
62 /// Returns an ellipse if edge is based on the ellipse curve
64 std::shared_ptr<GeomAPI_Ellipse> ellipse() const;
66 /// Returns a line if edge is based on the linear curve
68 std::shared_ptr<GeomAPI_Lin> line() const;
70 /// Returns true if the current edge is geometrically equal to the given edge
72 bool isEqual(const std::shared_ptr<GeomAPI_Shape> theEdge) const;
74 /// Returns range of parameter on the curve
76 void getRange(double& theFirst, double& theLast) const;
78 /// Returns true, if the edge is fully placed in the specified plane
80 bool isInPlane(const std::shared_ptr<GeomAPI_Pln> thePlane) const;
82 /// Returns edge length.
84 double length() const;
87 //! Pointer on attribute object
88 typedef std::shared_ptr<GeomAPI_Edge> GeomEdgePtr;