X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_Tools.cpp;h=0fd66fd4813b96434be19e44642b4e437e5f0054;hb=ccebb4b23e0354829c9636110b903c59923d8e30;hp=09f2e143726776d661a379a62fd906eacffb590c;hpb=645e2cb70c0e40290725f28fdc5fec8a93338d28;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Tools.cpp b/src/PartSet/PartSet_Tools.cpp index 09f2e1437..0fd66fd48 100644 --- a/src/PartSet/PartSet_Tools.cpp +++ b/src/PartSet/PartSet_Tools.cpp @@ -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,