- gp_Pnt2d uvFirst2 = c2->Value( f );
- gp_Pnt2d uvLast2 = c2->Value( l );
- double tol2 = 1e-5 * uvLast2.SquareDistance( uvFirst2 );
+ gp_Pnt2d uvFirst2 = c2->Value( E2.Orientation() == TopAbs_REVERSED ? l : f );
+ double tol2 = Max( Precision::PConfusion() * Precision::PConfusion(),
+ 1e-5 * uvLast1.SquareDistance( uvFirst1 ));