X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSketcherPrs%2FSketcherPrs_Perpendicular.cpp;h=314c74cb283f94240d26868b9fb39ffceb17e4c2;hb=8d8cd4bfaf5af5db0fe563e3e75b2526e472dbe0;hp=14cef6b266af7a1c93305663db2914bd06e8da1d;hpb=1c530eba1d76c012cfc61df1c21694e62f203d94;p=modules%2Fshaper.git diff --git a/src/SketcherPrs/SketcherPrs_Perpendicular.cpp b/src/SketcherPrs/SketcherPrs_Perpendicular.cpp index 14cef6b26..314c74cb2 100644 --- a/src/SketcherPrs/SketcherPrs_Perpendicular.cpp +++ b/src/SketcherPrs/SketcherPrs_Perpendicular.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -12,10 +12,9 @@ // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "SketcherPrs_Perpendicular.h" @@ -37,9 +36,8 @@ IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Perpendicular, SketcherPrs_SymbolPrs); static Handle(Image_AlienPixMap) MyPixMap; SketcherPrs_Perpendicular::SketcherPrs_Perpendicular(ModelAPI_Feature* theConstraint, - ModelAPI_CompositeFeature* theSketcher, - const std::shared_ptr& thePlane) - : SketcherPrs_SymbolPrs(theConstraint, theSketcher, thePlane) + SketchPlugin_Sketch* theSketcher) + : SketcherPrs_SymbolPrs(theConstraint, theSketcher) { } @@ -60,7 +58,7 @@ bool SketcherPrs_Perpendicular::IsReadyToDisplay(ModelAPI_Feature* theConstraint bool SketcherPrs_Perpendicular::updateIfReadyToDisplay(double theStep, bool withColor) const { - if (!IsReadyToDisplay(myConstraint, myPlane)) + if (!IsReadyToDisplay(myConstraint, plane())) return false; ObjectPtr aObj1 = @@ -83,10 +81,10 @@ 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())); + bool isInside2 = (aParam2 >= (aCurve2.startParam() - Precision::Confusion())) && + (aParam2 <= (aCurve2.endParam() + Precision::Confusion())); if (!(isInside1 && isInside2)) aPnt = std::shared_ptr();