1 // File: GeomAPI_PlanarEdges.hxx
2 // Created: 24 Jul 2014
3 // Author: Artem ZHIDKOV
5 #ifndef GEOMAPI_WIRE_H_
6 #define GEOMAPI_WIRE_H_
9 #include "GeomAPI_Edge.h"
10 #include "GeomAPI_Pnt.h"
11 #include "GeomAPI_Dir.h"
13 #include <boost/smart_ptr/shared_ptr.hpp>
17 /**\class GeomAPI_PlanarEdges
19 * \brief Interface to the edge object
22 class GeomAPI_PlanarEdges : public GeomAPI_Shape
25 /// Creation of empty (null) shape
26 GEOMAPI_EXPORT GeomAPI_PlanarEdges();
28 GEOMAPI_EXPORT virtual bool isVertex() const
33 /// Returns whether the shape is an edge
34 GEOMAPI_EXPORT virtual bool isEdge() const
39 GEOMAPI_EXPORT void addEdge(boost::shared_ptr<GeomAPI_Shape> theEdge);
40 GEOMAPI_EXPORT std::list<boost::shared_ptr<GeomAPI_Shape> > getEdges();
42 /// Returns True if the wire is defined in a plane
43 GEOMAPI_EXPORT bool hasPlane() const { return myOrigin && myNorm && myDirX && myDirY; }
45 /// Set/Get origin point
46 GEOMAPI_EXPORT void setOrigin(const boost::shared_ptr<GeomAPI_Pnt>& theOrigin)
47 { myOrigin = theOrigin; }
48 GEOMAPI_EXPORT boost::shared_ptr<GeomAPI_Pnt> origin() const { return myOrigin; }
50 /// Set/Get X direction vector
51 GEOMAPI_EXPORT void setDirX(const boost::shared_ptr<GeomAPI_Dir>& theDirX) { myDirX = theDirX; }
52 GEOMAPI_EXPORT boost::shared_ptr<GeomAPI_Dir> dirX() const { return myDirX; }
54 /// Set/Get Y direction vector
55 GEOMAPI_EXPORT void setDirY(const boost::shared_ptr<GeomAPI_Dir>& theDirY) { myDirY = theDirY; }
56 GEOMAPI_EXPORT boost::shared_ptr<GeomAPI_Dir> dirY() const { return myDirY; }
58 /// Set/Get Normal direction vector
59 GEOMAPI_EXPORT void setNorm(const boost::shared_ptr<GeomAPI_Dir>& theNorm) { myNorm = theNorm; }
60 GEOMAPI_EXPORT boost::shared_ptr<GeomAPI_Dir> norm() const { return myNorm; }
63 boost::shared_ptr<GeomAPI_Pnt> myOrigin;
64 boost::shared_ptr<GeomAPI_Dir> myDirX;
65 boost::shared_ptr<GeomAPI_Dir> myDirY;
66 boost::shared_ptr<GeomAPI_Dir> myNorm;