]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
A code correction
authornds <natalia.donis@opencascade.com>
Fri, 10 Apr 2015 07:15:19 +0000 (10:15 +0300)
committernds <natalia.donis@opencascade.com>
Fri, 10 Apr 2015 07:15:19 +0000 (10:15 +0300)
src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp

index b7f708a9c59578efdec9e6d06e6b9690e1c46058..3ee3e65ead27b6677f80a7f2e8537a300cc62b72 100644 (file)
@@ -105,7 +105,7 @@ bool SketchPlugin_ConstraintDistance::compute(const std::string& theAttributeId)
   std::shared_ptr<GeomAPI_Pnt> aPoint1 = sketch()->to3D(aPnt_A->x(), aPnt_A->y());
   std::shared_ptr<GeomAPI_Pnt> aPoint2 = sketch()->to3D(aPnt_B->x(), aPnt_B->y());
   // it is not possible to create lin2d on the points with equal position
-  if (aPoint1->distance(aPoint1) < tolerance)
+  if (aPoint1->distance(aPoint2) < tolerance)
     return false;
 
   std::shared_ptr<GeomAPI_Lin2d> aLine = std::shared_ptr<GeomAPI_Lin2d>(new GeomAPI_Lin2d(aPnt_A, aPnt_B));