From: mpv Date: Wed, 12 Apr 2017 07:34:12 +0000 (+0300) Subject: Fix for the issue #2115 X-Git-Tag: V_2.7.0~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=81d59f91b1052fdc91502a3892222f7cf79b2dd0;p=modules%2Fshaper.git Fix for the issue #2115 --- diff --git a/src/SketchPlugin/SketchPlugin_Validators.cpp b/src/SketchPlugin/SketchPlugin_Validators.cpp index 2f3306af7..e5b194c90 100755 --- a/src/SketchPlugin/SketchPlugin_Validators.cpp +++ b/src/SketchPlugin/SketchPlugin_Validators.cpp @@ -1267,12 +1267,12 @@ static bool isOnSameSide(const std::shared_ptr& theLine, // the first point is on the line if (aVec1->squareModulus() < aTolerance * aTolerance) return false; - std::shared_ptr aDirP1L(new GeomAPI_Dir(thePoint1->xyz()->decreased(aLineLoc))); - std::shared_ptr aVec2 = thePoint1->xyz()->decreased(aLineLoc); + std::shared_ptr aDirP1L(new GeomAPI_Dir(aVec1)); + std::shared_ptr aVec2 = thePoint2->xyz()->decreased(aLineLoc); // the second point is on the line if (aVec2->squareModulus() < aTolerance * aTolerance) return false; - std::shared_ptr aDirP2L(new GeomAPI_Dir(thePoint2->xyz()->decreased(aLineLoc))); + std::shared_ptr aDirP2L(new GeomAPI_Dir(aVec2)); return aLineDir->cross(aDirP1L)->dot(aLineDir->cross(aDirP2L)) > -aTolerance; }