EDGE creation problem

Hi,
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,
polygon.Add(gp_Pnt(p1->getX(),p1->getY(),p1->getZ()));
polygon.Add(gp_Pnt(p2->getX(),p2->getY(),p2->getZ()));
TopoDS_Edge anEdge = polygon.Edge();

Dmitry Khabi's picture

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