From 00074cfd3880c016908daac0e8eb8667fba19c1d Mon Sep 17 00:00:00 2001 From: mpv Date: Wed, 24 Jun 2015 08:29:02 +0300 Subject: [PATCH] Fix for the issue #673 : creation of sketch on -X direction-plane --- src/SketchPlugin/SketchPlugin_Sketch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SketchPlugin/SketchPlugin_Sketch.cpp b/src/SketchPlugin/SketchPlugin_Sketch.cpp index f7d09acbb..1b97f5634 100644 --- a/src/SketchPlugin/SketchPlugin_Sketch.cpp +++ b/src/SketchPlugin/SketchPlugin_Sketch.cpp @@ -228,8 +228,8 @@ void SketchPlugin_Sketch::attributeChanged(const std::string& theID) { aCoords = aCoords->multiplied(-aD * aCoords->distance(aZero)); std::shared_ptr anOrigPnt(new GeomAPI_Pnt(aCoords)); // X axis is preferable to be dirX on the sketch - static const double tol = 1.e-7; - bool isX = fabs(anA - 1.0) < tol && fabs(aB) < tol && fabs(aC) < tol; + static const double tol = 0.1; // here can not be very small value to avoid very close to X normal axis (issue 595) + bool isX = fabs(anA) - 1.0 < tol && fabs(aB) < tol && fabs(aC) < tol; std::shared_ptr aTempDir( isX ? new GeomAPI_Dir(0, 1, 0) : new GeomAPI_Dir(1, 0, 0)); std::shared_ptr aYDir(new GeomAPI_Dir(aNormDir->cross(aTempDir))); -- 2.39.2