Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom.git into Dev_0.7.1
[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
15 #include <memory>
16
17 #include <list>
18
19 /**\class GeomAPI_PlanarEdges
20  * \ingroup DataModel
21  * \brief Interface to the set of edges located in one plane
22  *
23  * Normally this interface corresponds to theedges of the sketch
24  */
25 class GeomAPI_PlanarEdges : public GeomAPI_Shape
26 {
27  public:
28   /// Creation of empty (null) shape
29   GEOMAPI_EXPORT GeomAPI_PlanarEdges();
30
31   /// Returns whether the shape is alone vertex
32   GEOMAPI_EXPORT virtual bool isVertex() const;
33
34   /// Returns whether the shape is alone edge
35   GEOMAPI_EXPORT virtual bool isEdge() const;
36   /// Appends the edge to the set
37   GEOMAPI_EXPORT void addEdge(std::shared_ptr<GeomAPI_Shape> theEdge);
38   /// Returns the list of edges in this interface
39   GEOMAPI_EXPORT std::list<std::shared_ptr<GeomAPI_Shape> > getEdges();
40
41   /// Returns True if the wire is defined in a plane
42   GEOMAPI_EXPORT bool hasPlane() const;
43
44   /// Sets origin point
45   GEOMAPI_EXPORT void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
46
47   /// Returns the plane origin point
48   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> origin() const;
49
50   /// Sets X direction vector
51   GEOMAPI_EXPORT void setDirX(const std::shared_ptr<GeomAPI_Dir>& theDirX);
52   /// Returns X direction vector
53   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirX() const;
54
55   /// Sets Y direction vector
56   GEOMAPI_EXPORT void setDirY(const std::shared_ptr<GeomAPI_Dir>& theDirY);
57   /// Returns Y direction vector
58   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirY() const;
59
60   /// Sets Z direction vector
61   GEOMAPI_EXPORT void setNorm(const std::shared_ptr<GeomAPI_Dir>& theNorm);
62   /// Returns Z direction vector
63   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> norm() const;
64
65 private:
66   /// Origin point of the plane
67   std::shared_ptr<GeomAPI_Pnt> myOrigin;
68   /// The X direction inside of the plane
69   std::shared_ptr<GeomAPI_Dir> myDirX;
70   /// The Y direction inside of the plane
71   std::shared_ptr<GeomAPI_Dir> myDirY;
72   /// The normal direction to the plane
73   std::shared_ptr<GeomAPI_Dir> myNorm;
74 };
75
76 #endif
77