X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_PlanarEdges.h;h=ef1cea8beeef1be375c07277592466338e6d956a;hb=dc1f458b1518baeab0479275e47fd60d50bc18b7;hp=2b94de9b358ede3e77e990d64fdfdc7d5cba15d4;hpb=0fcae5b2e143e67306603d26f0b5e01cbe33d2bb;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_PlanarEdges.h b/src/GeomAPI/GeomAPI_PlanarEdges.h index 2b94de9b3..ef1cea8be 100644 --- a/src/GeomAPI/GeomAPI_PlanarEdges.h +++ b/src/GeomAPI/GeomAPI_PlanarEdges.h @@ -1,6 +1,22 @@ -// File: GeomAPI_PlanarEdges.hxx -// Created: 24 Jul 2014 -// Author: Artem ZHIDKOV +// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or +// email : webmaster.salome@opencascade.com +// #ifndef GEOMAPI_WIRE_H_ #define GEOMAPI_WIRE_H_ @@ -9,54 +25,67 @@ #include "GeomAPI_Edge.h" #include "GeomAPI_Pnt.h" #include "GeomAPI_Dir.h" +#include "GeomAPI_Ax3.h" -#include +#include #include /**\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(); + /// Returns whether the shape is alone vertex GEOMAPI_EXPORT virtual bool isVertex() const; - /// Returns whether the shape is an edge + /// Returns whether the shape is alone edge GEOMAPI_EXPORT virtual bool isEdge() const; - - GEOMAPI_EXPORT void addEdge(boost::shared_ptr theEdge); - GEOMAPI_EXPORT std::list > getEdges(); + /// 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; - /// Set/Get origin point - GEOMAPI_EXPORT void setOrigin(const boost::shared_ptr& theOrigin); - GEOMAPI_EXPORT boost::shared_ptr origin() const; + /// Returns the plane origin point + GEOMAPI_EXPORT std::shared_ptr origin() const; + + /// Returns X direction vector + GEOMAPI_EXPORT std::shared_ptr dirX() const; - /// Set/Get X direction vector - GEOMAPI_EXPORT void setDirX(const boost::shared_ptr& theDirX); - GEOMAPI_EXPORT boost::shared_ptr dirX() const; + /// Returns Y direction vector + GEOMAPI_EXPORT std::shared_ptr dirY() const; - /// Set/Get Y direction vector - GEOMAPI_EXPORT void setDirY(const boost::shared_ptr& theDirY); - GEOMAPI_EXPORT boost::shared_ptr dirY() const; + /// Returns Z direction vector + GEOMAPI_EXPORT std::shared_ptr norm() const; - /// Set/Get Normal direction vector - GEOMAPI_EXPORT void setNorm(const boost::shared_ptr& theNorm); - GEOMAPI_EXPORT boost::shared_ptr norm() const; + /// Returns whether the shape is planar + GEOMAPI_EXPORT virtual bool isPlanar() const; + + /// Set working plane + /// \param theOrigin origin of the plane axis + /// \param theDirX X 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); + + /// Returns whether the shapes are equal + GEOMAPI_EXPORT + virtual bool isEqual(const std::shared_ptr theShape) const; private: - boost::shared_ptr myOrigin; - boost::shared_ptr myDirX; - boost::shared_ptr myDirY; - boost::shared_ptr myNorm; + + std::shared_ptr myPlane; }; #endif