Salome HOME
Fill missed translations to French.
[modules/shaper.git] / src / PartSet / PartSet_Tools.cpp
index 09f2e143726776d661a379a62fd906eacffb590c..0fd66fd4813b96434be19e44642b4e437e5f0054 100644 (file)
@@ -122,6 +122,9 @@ gp_Pnt PartSet_Tools::convertClickToPoint(QPoint thePoint, Handle(V3d_View) theV
   gp_Pnt EyePoint(XEye, YEye, ZEye);
   gp_Pnt AtPoint(XAt, YAt, ZAt);
 
+  if (EyePoint.Distance(AtPoint) < Precision::Confusion())
+    return gp_Pnt();
+
   gp_Vec EyeVector(EyePoint, AtPoint);
   gp_Dir EyeDir(EyeVector);
 
@@ -131,9 +134,8 @@ gp_Pnt PartSet_Tools::convertClickToPoint(QPoint thePoint, Handle(V3d_View) theV
   gp_Pnt ConvertedPoint(X, Y, Z);
 
   gp_Pnt2d ConvertedPointOnPlane = ProjLib::Project(PlaneOfTheView, ConvertedPoint);
-  gp_Pnt ResultPoint = ElSLib::Value(ConvertedPointOnPlane.X(), ConvertedPointOnPlane.Y(),
+  return ElSLib::Value(ConvertedPointOnPlane.X(), ConvertedPointOnPlane.Y(),
                                      PlaneOfTheView);
-  return ResultPoint;
 }
 
 void PartSet_Tools::convertTo2D(const gp_Pnt& thePoint, FeaturePtr theSketch,