From: vsv Date: Mon, 9 Oct 2017 08:47:44 +0000 (+0300) Subject: Issue #2269: Avoid two icons shown if points are connected. X-Git-Tag: V_2.9.0~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aa17d3339fdb302b8e7054c840eceec06c20522c;p=modules%2Fshaper.git Issue #2269: Avoid two icons shown if points are connected. --- diff --git a/src/SketcherPrs/SketcherPrs_Perpendicular.cpp b/src/SketcherPrs/SketcherPrs_Perpendicular.cpp index 14cef6b26..c1e980f34 100644 --- a/src/SketcherPrs/SketcherPrs_Perpendicular.cpp +++ b/src/SketcherPrs/SketcherPrs_Perpendicular.cpp @@ -83,10 +83,14 @@ bool SketcherPrs_Perpendicular::updateIfReadyToDisplay(double theStep, bool with GeomAPI_Curve aCurve1(aShp1); GeomAPI_Curve aCurve2(aShp2); - bool isInside1 = ((aParam1 - aCurve1.startParam()) >= -Precision::Confusion()) && - ((aCurve1.endParam() - aParam1) >= Precision::Confusion()); - bool isInside2 = ((aParam2 - aCurve2.startParam()) >= -Precision::Confusion()) && - ((aCurve2.endParam() - aParam2) >= Precision::Confusion()); + bool isInside1 = (aParam1 >= (aCurve1.startParam() - Precision::Confusion())) && + (aParam1 <= (aCurve1.endParam() + Precision::Confusion())); + //((aParam1 - aCurve1.startParam()) >= -Precision::Confusion()) && + // ((aCurve1.endParam() - aParam1) >= Precision::Confusion()); + bool isInside2 = (aParam2 >= (aCurve2.startParam() - Precision::Confusion())) && + (aParam2 <= (aCurve2.endParam() + Precision::Confusion())); + //(fabs(aParam2 - aCurve2.startParam()) >= -Precision::Confusion()) && + // ((aCurve2.endParam() - aParam2) >= Precision::Confusion()); if (!(isInside1 && isInside2)) aPnt = std::shared_ptr();