X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_PlanarEdges.h;h=c26ad2505e180e386ff739d3852b85012581ab52;hb=a731f82dccbfdb67cbf8e8d617222a4d3e32018a;hp=1521d5addae1d5cc1004c43f12bf2381bde9c0e9;hpb=9e869ede4d8c56262bb20534543c2bf56cd6a91b;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_PlanarEdges.h b/src/GeomAPI/GeomAPI_PlanarEdges.h index 1521d5add..c26ad2505 100644 --- a/src/GeomAPI/GeomAPI_PlanarEdges.h +++ b/src/GeomAPI/GeomAPI_PlanarEdges.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomAPI_PlanarEdges.hxx // Created: 24 Jul 2014 // Author: Artem ZHIDKOV @@ -9,6 +11,7 @@ #include "GeomAPI_Edge.h" #include "GeomAPI_Pnt.h" #include "GeomAPI_Dir.h" +#include "GeomAPI_Ax3.h" #include @@ -16,54 +19,53 @@ /**\class GeomAPI_PlanarEdges * \ingroup DataModel - * \brief Interface to the edge object + * \brief Interface to the set of edges located in one plane + * + * Normally this interface corresponds to theedges of the sketch */ - class GeomAPI_PlanarEdges : public GeomAPI_Shape { public: /// Creation of empty (null) shape GEOMAPI_EXPORT GeomAPI_PlanarEdges(); - GEOMAPI_EXPORT virtual bool isVertex() const - { - return false; - } - - /// Returns whether the shape is an edge - GEOMAPI_EXPORT virtual bool isEdge() const - { - return false; - } + /// Returns whether the shape is alone vertex + GEOMAPI_EXPORT virtual bool isVertex() const; + /// Returns whether the shape is alone edge + GEOMAPI_EXPORT virtual bool isEdge() const; + /// Appends the edge to the set GEOMAPI_EXPORT void addEdge(std::shared_ptr theEdge); + /// Returns the list of edges in this interface GEOMAPI_EXPORT std::list > getEdges(); /// Returns True if the wire is defined in a plane - GEOMAPI_EXPORT bool hasPlane() const { return myOrigin && myNorm && myDirX && myDirY; } + GEOMAPI_EXPORT bool hasPlane() const; - /// Set/Get origin point - GEOMAPI_EXPORT void setOrigin(const std::shared_ptr& theOrigin) - { myOrigin = theOrigin; } - GEOMAPI_EXPORT std::shared_ptr origin() const { return myOrigin; } + /// Returns the plane origin point + GEOMAPI_EXPORT std::shared_ptr origin() const; - /// Set/Get X direction vector - GEOMAPI_EXPORT void setDirX(const std::shared_ptr& theDirX) { myDirX = theDirX; } - GEOMAPI_EXPORT std::shared_ptr dirX() const { return myDirX; } + /// Returns X direction vector + GEOMAPI_EXPORT std::shared_ptr dirX() const; - /// Set/Get Y direction vector - GEOMAPI_EXPORT void setDirY(const std::shared_ptr& theDirY) { myDirY = theDirY; } - GEOMAPI_EXPORT std::shared_ptr dirY() const { return myDirY; } + /// Returns Y direction vector + GEOMAPI_EXPORT std::shared_ptr dirY() const; - /// Set/Get Normal direction vector - GEOMAPI_EXPORT void setNorm(const std::shared_ptr& theNorm) { myNorm = theNorm; } - GEOMAPI_EXPORT std::shared_ptr norm() const { return myNorm; } + /// Returns Z direction vector + GEOMAPI_EXPORT std::shared_ptr norm() const; + + /// Set working plane + /// \param theOrigin origin of the plane axis + /// \param theDirX X direction of the plane axis + /// \param theDirY Y direction of the plane axis + /// \param theNorm normal direction of the plane axis + GEOMAPI_EXPORT void setPlane(const std::shared_ptr& theOrigin, + const std::shared_ptr& theDirX, + const std::shared_ptr& theNorm); private: - std::shared_ptr myOrigin; - std::shared_ptr myDirX; - std::shared_ptr myDirY; - std::shared_ptr myNorm; + + std::shared_ptr myPlane; }; #endif