EDGE creation problem

I have two points. The distance between these two points are very small(e-6). When I create an EDGE using these points it crashes.
How can I create an edge if the distance between two points are very small?

I am using the following code,
TopoDS_Edge anEdge = polygon.Edge();

Dmitry Khabi's picture

In some algorithmen the distance must be bigger as precisions. If its not -> exception...