X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Line.cpp;h=6f8b21c2577d80ebce0ccf6f058c015d87bd2855;hb=77ce6d35ac8d2f0fdaecb4f23e0870bf74e36103;hp=f01a332f296b0b90d751165547938b937376df3f;hpb=4ddacde2a835dcba71074928bd8412e8ae9de57f;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Line.cpp b/src/SketchPlugin/SketchPlugin_Line.cpp index f01a332f2..6f8b21c25 100644 --- a/src/SketchPlugin/SketchPlugin_Line.cpp +++ b/src/SketchPlugin/SketchPlugin_Line.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -104,28 +104,6 @@ std::string SketchPlugin_Line::processEvent(const std::shared_ptr& thePoint) -{ - double aDelta = 0; - - std::shared_ptr aData = data(); - std::shared_ptr aPoint1 = - std::dynamic_pointer_cast(aData->attribute(START_ID())); - std::shared_ptr aPoint2 = - std::dynamic_pointer_cast(aData->attribute(END_ID())); - - GeomAPI_Lin2d aLin2d(aPoint1->x(), aPoint1->y(), aPoint2->x(), aPoint2->y()); - - if (false/*projection*/) { // TODO: if it has not been necessary, remove this block - std::shared_ptr aResult = aLin2d.project(thePoint); - aDelta = aResult->distance(thePoint); - } else { // distance - aDelta = aLin2d.distance(thePoint); - } - - return aDelta; -} - const std::string& SketchPlugin_Line::getKind() { static std::string MY_KIND = SketchPlugin_Line::ID();