Added the function Tolerance2d(). Now 2d-tolerance is used instead of 3d-tolerance where it's necessary.