X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_MacroArc.cpp;h=d8f9cb6f5d950fbe501871133b502d3835736987;hb=64e079cfbf1302eeb3f7fe60c46de6f5b73cc35f;hp=2fa73d5a3616e0f3549c0450fcdb90ecdb158e8c;hpb=a2ab2dc339b560c7309540e1f10b6ad60e5ed0af;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_MacroArc.cpp b/src/SketchAPI/SketchAPI_MacroArc.cpp index 2fa73d5a3..d8f9cb6f5 100644 --- a/src/SketchAPI/SketchAPI_MacroArc.cpp +++ b/src/SketchAPI/SketchAPI_MacroArc.cpp @@ -1,8 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> - -// File: SketchAPI_MacroArc.cpp -// Created: 09 June 2016 -// Author: Dmitry Bobylev +// 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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// 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 +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #include "SketchAPI_MacroArc.h" @@ -16,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) @@ -188,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(); +}