]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #2115
authormpv <mpv@opencascade.com>
Wed, 12 Apr 2017 07:34:12 +0000 (10:34 +0300)
committermpv <mpv@opencascade.com>
Wed, 12 Apr 2017 07:34:12 +0000 (10:34 +0300)
src/SketchPlugin/SketchPlugin_Validators.cpp

index 2f3306af74f9afe485b5b2d6beecf88da22eed38..e5b194c900346ad1130a81e1fad46ad338f9fe8f 100755 (executable)
@@ -1267,12 +1267,12 @@ static bool isOnSameSide(const std::shared_ptr<GeomAPI_Lin>& theLine,
   // the first point is on the line
   if (aVec1->squareModulus() < aTolerance * aTolerance)
     return false;
-  std::shared_ptr<GeomAPI_Dir> aDirP1L(new GeomAPI_Dir(thePoint1->xyz()->decreased(aLineLoc)));
-  std::shared_ptr<GeomAPI_XYZ> aVec2 = thePoint1->xyz()->decreased(aLineLoc);
+  std::shared_ptr<GeomAPI_Dir> aDirP1L(new GeomAPI_Dir(aVec1));
+  std::shared_ptr<GeomAPI_XYZ> aVec2 = thePoint2->xyz()->decreased(aLineLoc);
   // the second point is on the line
   if (aVec2->squareModulus() < aTolerance * aTolerance)
     return false;
-  std::shared_ptr<GeomAPI_Dir> aDirP2L(new GeomAPI_Dir(thePoint2->xyz()->decreased(aLineLoc)));
+  std::shared_ptr<GeomAPI_Dir> aDirP2L(new GeomAPI_Dir(aVec2));
 
   return aLineDir->cross(aDirP1L)->dot(aLineDir->cross(aDirP2L)) > -aTolerance;
 }