Salome HOME
c26ad2505e180e386ff739d3852b85012581ab52
[modules/shaper.git] / src / GeomAPI / GeomAPI_PlanarEdges.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_PlanarEdges.hxx
4 // Created:     24 Jul 2014
5 // Author:      Artem ZHIDKOV
6
7 #ifndef GEOMAPI_WIRE_H_
8 #define GEOMAPI_WIRE_H_
9
10 #include "GeomAPI.h"
11 #include "GeomAPI_Edge.h"
12 #include "GeomAPI_Pnt.h"
13 #include "GeomAPI_Dir.h"
14 #include "GeomAPI_Ax3.h"
15
16 #include <memory>
17
18 #include <list>
19
20 /**\class GeomAPI_PlanarEdges
21  * \ingroup DataModel
22  * \brief Interface to the set of edges located in one plane
23  *
24  * Normally this interface corresponds to theedges of the sketch
25  */
26 class GeomAPI_PlanarEdges : public GeomAPI_Shape
27 {
28  public:
29   /// Creation of empty (null) shape
30   GEOMAPI_EXPORT GeomAPI_PlanarEdges();
31
32   /// Returns whether the shape is alone vertex
33   GEOMAPI_EXPORT virtual bool isVertex() const;
34
35   /// Returns whether the shape is alone edge
36   GEOMAPI_EXPORT virtual bool isEdge() const;
37   /// Appends the edge to the set
38   GEOMAPI_EXPORT void addEdge(std::shared_ptr<GeomAPI_Shape> theEdge);
39   /// Returns the list of edges in this interface
40   GEOMAPI_EXPORT std::list<std::shared_ptr<GeomAPI_Shape> > getEdges();
41
42   /// Returns True if the wire is defined in a plane
43   GEOMAPI_EXPORT bool hasPlane() const;
44
45   /// Returns the plane origin point
46   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> origin() const;
47
48   /// Returns X direction vector
49   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirX() const;
50
51   /// Returns Y direction vector
52   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirY() const;
53
54   /// Returns Z direction vector
55   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> norm() const;
56
57   /// Set working plane
58   /// \param theOrigin origin of the plane axis
59   /// \param theDirX X direction of the plane axis
60   /// \param theDirY Y direction of the plane axis
61   /// \param theNorm normal direction of the plane axis
62   GEOMAPI_EXPORT void setPlane(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
63                                const std::shared_ptr<GeomAPI_Dir>& theDirX,
64                                const std::shared_ptr<GeomAPI_Dir>& theNorm);
65
66 private:
67
68   std::shared_ptr<GeomAPI_Ax3> myPlane;
69 };
70
71 #endif
72