From: nds Date: Wed, 4 Jun 2014 09:05:59 +0000 (+0400) Subject: Correction for tolerance value X-Git-Tag: V_0.4.4~328 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=56e04b3cef94fcf153206f5a2798c22c0d4d65e9;p=modules%2Fshaper.git Correction for tolerance value --- diff --git a/src/PartSet/PartSet_OperationSketch.cpp b/src/PartSet/PartSet_OperationSketch.cpp index 7445573e2..d57b5da4a 100644 --- a/src/PartSet/PartSet_OperationSketch.cpp +++ b/src/PartSet/PartSet_OperationSketch.cpp @@ -226,7 +226,7 @@ void PartSet_OperationSketch::setSketchPlane(const TopoDS_Shape& theShape) aCoords = aCoords->multiplied(-aD * aCoords->distance(aZero)); boost::shared_ptr anOrigPnt(new GeomAPI_Pnt(aCoords)); // X axis is preferable to be dirX on the sketch - const double tol = 1e-7; + const double tol = Precision::Confusion(); bool isX = fabs(anA - 1.0) < tol && fabs(aB) < tol && fabs(aC) < tol; boost::shared_ptr aTempDir(isX ? new GeomAPI_Dir(0, 1, 0) : new GeomAPI_Dir(1, 0, 0)); boost::shared_ptr aYDir(new GeomAPI_Dir(aNormDir->cross(aTempDir)));