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"
14 #include "GeomAPI_Ax3.h"
20 /**\class GeomAPI_PlanarEdges
22 * \brief Interface to the set of edges located in one plane
24 * Normally this interface corresponds to theedges of the sketch
26 class GeomAPI_PlanarEdges : public GeomAPI_Shape
29 /// Creation of empty (null) shape
30 GEOMAPI_EXPORT GeomAPI_PlanarEdges();
32 /// Returns whether the shape is alone vertex
33 GEOMAPI_EXPORT virtual bool isVertex() const;
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();
42 /// Returns True if the wire is defined in a plane
43 GEOMAPI_EXPORT bool hasPlane() const;
45 /// Returns the plane origin point
46 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> origin() const;
48 /// Returns X direction vector
49 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirX() const;
51 /// Returns Y direction vector
52 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirY() const;
54 /// Returns Z direction vector
55 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> norm() const;
57 /// Returns whether the shape is planar
58 GEOMAPI_EXPORT virtual bool isPlanar() const;
61 /// \param theOrigin origin of the plane axis
62 /// \param theDirX X direction of the plane axis
63 /// \param theNorm normal direction of the plane axis
64 GEOMAPI_EXPORT void setPlane(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
65 const std::shared_ptr<GeomAPI_Dir>& theDirX,
66 const std::shared_ptr<GeomAPI_Dir>& theNorm);
68 /// Returns whether the shapes are equal
70 virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theShape) const;
74 std::shared_ptr<GeomAPI_Ax3> myPlane;