-// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023 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
//
// 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
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#ifndef GeomAPI_Vertex_H_
GEOMAPI_EXPORT
GeomAPI_Vertex(const std::shared_ptr<GeomAPI_Shape>& theShape);
+ /// Creation of vertex by the given point.
+ GEOMAPI_EXPORT
+ GeomAPI_Vertex(const std::shared_ptr<GeomAPI_Pnt>& thePoint);
+
/// Creation of vertex by 3d coordinates.
GEOMAPI_EXPORT
GeomAPI_Vertex(double theX, double theY, double theZ);
/// Returns true if the current edge is geometrically equal to the given edge.
GEOMAPI_EXPORT
- bool isEqual(const std::shared_ptr<GeomAPI_Shape> theVert) const;
+ virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theVert) const;
+
+public:
+ /// \brief Compare vertices geometrically
+ class GeometricComparator
+ {
+ public:
+ GEOMAPI_EXPORT
+ GeometricComparator(const double theTolerance = 1.e-7) : myTolerance(theTolerance)
+ {}
+
+ /// Return \c true if the first vertex is less than the second
+ GEOMAPI_EXPORT
+ bool operator ()(const std::shared_ptr<GeomAPI_Vertex>& theVertex1,
+ const std::shared_ptr<GeomAPI_Vertex>& theVertex2) const;
+ private:
+ double myTolerance;
+ };
+
};
+//! Pointer on the object
+typedef std::shared_ptr<GeomAPI_Vertex> GeomVertexPtr;
+
#endif