X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_MacroArc.cpp;h=e57bcc03926ce1dc4fcc1c2810ab3f5094da25e0;hb=1fd15bed1c62f994a3438bc4a12f44d0361f98c9;hp=4acf03698f203c4a894282144b2a45d64922a990;hpb=a94fc319f2aa64b43c9a73b5ff7063923648faec;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_MacroArc.cpp b/src/SketchAPI/SketchAPI_MacroArc.cpp index 4acf03698..e57bcc039 100644 --- a/src/SketchAPI/SketchAPI_MacroArc.cpp +++ b/src/SketchAPI/SketchAPI_MacroArc.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2021 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 "SketchAPI_MacroArc.h" @@ -30,9 +29,6 @@ #include #include -/// Obtain constraints prepared by tangent arc -static std::list tangentArcConstraints(const FeaturePtr& theArc); - //================================================================================================ SketchAPI_MacroArc::SketchAPI_MacroArc(const std::shared_ptr & theFeature) : SketchAPI_SketchEntity(theFeature) @@ -202,3 +198,29 @@ void SketchAPI_MacroArc::setByTangent(const ModelHighAPI_RefAttr& theTangentPoin execute(); } + +//================================================================================================ +void SketchAPI_MacroArc::setByTransversal(const ModelHighAPI_RefAttr& theTransversalPoint, + double theEndX, double theEndY, + bool theInversed) +{ + fillAttribute(SketchPlugin_MacroArc::ARC_TYPE_BY_TRANSVERSAL_LINE(), myarcType); + fillAttribute(theTransversalPoint, mytransversalPoint); + fillAttribute(endPoint4(), theEndX, theEndY); + fillAttribute(theInversed, myreversed); + + execute(); +} + +//================================================================================================ +void SketchAPI_MacroArc::setByTransversal(const ModelHighAPI_RefAttr& theTransversalPoint, + const std::shared_ptr& theEnd, + bool theInversed) +{ + fillAttribute(SketchPlugin_MacroArc::ARC_TYPE_BY_TRANSVERSAL_LINE(), myarcType); + fillAttribute(theTransversalPoint, mytransversalPoint); + fillAttribute(theEnd, myendPoint4); + fillAttribute(theInversed, myreversed); + + execute(); +}