1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_PlanarEdges.hxx
4 // Created: 24 Jul 2014
5 // Author: Artem ZHIDKOV
7 #ifndef GEOMAPI_WIRE_H_
8 #define GEOMAPI_WIRE_H_
11 #include "GeomAPI_Edge.h"
12 #include "GeomAPI_Pnt.h"
13 #include "GeomAPI_Dir.h"
19 /**\class GeomAPI_PlanarEdges
21 * \brief Interface to the set of edges located in one plane
23 * Normally this interface corresponds to theedges of the sketch
25 class GeomAPI_PlanarEdges : public GeomAPI_Shape
28 /// Creation of empty (null) shape
29 GEOMAPI_EXPORT GeomAPI_PlanarEdges();
31 /// Returns whether the shape is alone vertex
32 GEOMAPI_EXPORT virtual bool isVertex() const;
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();
41 /// Returns True if the wire is defined in a plane
42 GEOMAPI_EXPORT bool hasPlane() const;
45 GEOMAPI_EXPORT void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
47 /// Returns the plane origin point
48 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> origin() const;
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;
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;
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;
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;