Salome HOME
updated copyright message
[modules/shaper.git] / src / GeomAPI / GeomAPI_PlanarEdges.h
index 627bc5d719cfded780ee8c181ba13a29d18103c2..1f9d1cabeec1d7f8c51823fce76ea7b734bba7ad 100644 (file)
@@ -1,8 +1,21 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        GeomAPI_PlanarEdges.hxx
-// Created:     24 Jul 2014
-// Author:      Artem ZHIDKOV
+// Copyright (C) 2014-2023  CEA, EDF
+//
+// 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_
@@ -11,6 +24,7 @@
 #include "GeomAPI_Edge.h"
 #include "GeomAPI_Pnt.h"
 #include "GeomAPI_Dir.h"
+#include "GeomAPI_Ax3.h"
 
 #include <memory>
 
@@ -20,7 +34,7 @@
  * \ingroup DataModel
  * \brief Interface to the set of edges located in one plane
  *
- * Normally this interface corresponds to theedges of the sketch
+ * Normally this interface corresponds to the edges of the sketch
  */
 class GeomAPI_PlanarEdges : public GeomAPI_Shape
 {
@@ -41,36 +55,36 @@ class GeomAPI_PlanarEdges : public GeomAPI_Shape
   /// Returns True if the wire is defined in a plane
   GEOMAPI_EXPORT bool hasPlane() const;
 
-  /// Sets origin point
-  GEOMAPI_EXPORT void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
-
   /// Returns the plane origin point
   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> origin() const;
 
-  /// Sets X direction vector
-  GEOMAPI_EXPORT void setDirX(const std::shared_ptr<GeomAPI_Dir>& theDirX);
   /// Returns X direction vector
   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirX() const;
 
-  /// Sets Y direction vector
-  GEOMAPI_EXPORT void setDirY(const std::shared_ptr<GeomAPI_Dir>& theDirY);
   /// Returns Y direction vector
   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> dirY() const;
 
-  /// Sets Z direction vector
-  GEOMAPI_EXPORT void setNorm(const std::shared_ptr<GeomAPI_Dir>& theNorm);
   /// Returns Z direction vector
   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Dir> 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<GeomAPI_Pnt>& theOrigin,
+                               const std::shared_ptr<GeomAPI_Dir>& theDirX,
+                               const std::shared_ptr<GeomAPI_Dir>& theNorm);
+
+  /// Returns whether the shapes are equal
+  GEOMAPI_EXPORT
+  virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theShape) const;
+
 private:
-  /// Origin point of the plane
-  std::shared_ptr<GeomAPI_Pnt> myOrigin;
-  /// The X direction inside of the plane
-  std::shared_ptr<GeomAPI_Dir> myDirX;
-  /// The Y direction inside of the plane
-  std::shared_ptr<GeomAPI_Dir> myDirY;
-  /// The normal direction to the plane
-  std::shared_ptr<GeomAPI_Dir> myNorm;
+
+  std::shared_ptr<GeomAPI_Ax3> myPlane;
 };
 
 #endif