diff --git a/Geo/GEdge.cpp b/Geo/GEdge.cpp
index f7ae18bdcda1c70c88a704184a167da8b7575ec9..41f7bb7cb2e3096b9f35b41e318102a73c699a45 100644
--- a/Geo/GEdge.cpp
+++ b/Geo/GEdge.cpp
@@ -1,4 +1,4 @@
-// $Id: GEdge.cpp,v 1.25 2007-03-18 23:02:26 geuzaine Exp $
+// $Id: GEdge.cpp,v 1.26 2007-05-04 08:56:17 remacle Exp $
 //
 // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
 //
@@ -157,3 +157,8 @@ double GEdge::curvature(double par) const
   SVector3 d = one_over_D*(n2-n1);
   return norm(d);
 }
+
+bool GEdge::is_mesh_degenereted() const
+{
+  return (v0==v1 && mesh_vertices.size()<2);
+}
diff --git a/Geo/GEdge.h b/Geo/GEdge.h
index a64f6f6a6166a143b26a80216b90a74a748b7984..8d5df444da2a7620ea2029a2af390a8e41c929d6 100644
--- a/Geo/GEdge.h
+++ b/Geo/GEdge.h
@@ -44,6 +44,8 @@ class GEdge : public GEntity {
 
   void addFace(GFace *f);
   void delFace(GFace *f);
+  /* start==end and no more than 2 segments */
+  bool is_mesh_degenereted() const;
 
   virtual int dim() const {return 1;}
   virtual bool periodic(int dim=0) const = 0;