Salome HOME
Merge branch 'V9_4_BR'
[modules/shaper.git] / src / GeomAPI / GeomAPI_Vertex.h
index 13668b6af2c4c1034c719c06d6ba5b1b99ad28d3..5c564f842fb7f5ffefa6f49184571d6d93e21072 100644 (file)
@@ -49,6 +49,24 @@ public:
   /// Returns true if the current edge is geometrically equal to the given edge.
   GEOMAPI_EXPORT
   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