X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_MacroArc.h;h=fb684eeb1607951f0eeb2ec7eaeb43bacdc3e24b;hb=77ce6d35ac8d2f0fdaecb4f23e0870bf74e36103;hp=c24e24750f74bec9aa1fe57b45c711fd4d2e5f56;hpb=099946a7d91982c9a2c4ca2ccdd934320f196413;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_MacroArc.h b/src/SketchAPI/SketchAPI_MacroArc.h index c24e24750..fb684eeb1 100644 --- a/src/SketchAPI/SketchAPI_MacroArc.h +++ b/src/SketchAPI/SketchAPI_MacroArc.h @@ -1,8 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> - -// File: SketchAPI_MacroArc.h -// Created: 09 June 2016 -// Author: Dmitry Bobylev +// 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 +// 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 +// #ifndef SketchAPI_MacroArc_H_ #define SketchAPI_MacroArc_H_ @@ -75,11 +88,7 @@ public: SKETCHAPI_EXPORT virtual ~SketchAPI_MacroArc(); - void test() { - SketchPlugin_MacroArc::ID(); - } - - INTERFACE_12(SketchPlugin_MacroArc::ID(), + INTERFACE_14(SketchPlugin_MacroArc::ID(), arcType, SketchPlugin_MacroArc::ARC_TYPE(), ModelAPI_AttributeString, /** Arc type */, center, SketchPlugin_MacroArc::CENTER_POINT_ID(), @@ -98,6 +107,10 @@ public: ModelAPI_AttributeRefAttr, /** Tangent point */, endPoint3, SketchPlugin_MacroArc::END_POINT_3_ID(), GeomDataAPI_Point2D, /** End point */, + transversalPoint, SketchPlugin_MacroArc::TRANSVERSAL_POINT_ID(), + ModelAPI_AttributeRefAttr, /** Transversal point */, + endPoint4, SketchPlugin_MacroArc::END_POINT_4_ID(), + GeomDataAPI_Point2D, /** End point */, reversed, SketchPlugin_MacroArc::REVERSED_ID(), ModelAPI_AttributeBoolean, /** Reversed flag */, radius, SketchPlugin_MacroArc::RADIUS_ID(), @@ -105,8 +118,6 @@ public: angle, SketchPlugin_MacroArc::ANGLE_ID(), ModelAPI_AttributeDouble, /** Angle */) -private: - /// Set by center and start, end point. SKETCHAPI_EXPORT void setByCenterStartEnd(double theCenterX, double theCenterY, @@ -144,6 +155,18 @@ private: void setByTangent(const ModelHighAPI_RefAttr& theTangentPoint, const std::shared_ptr& theEnd, bool theInversed); + + /// Set by tangent and end point. + SKETCHAPI_EXPORT + void setByTransversal(const ModelHighAPI_RefAttr& theTransversalPoint, + double theEndX, double theEndY, + bool theInversed); + + /// Set by tangent and end point. + SKETCHAPI_EXPORT + void setByTransversal(const ModelHighAPI_RefAttr& theTransversalPoint, + const std::shared_ptr& theEnd, + bool theInversed); }; /// Pointer on Arc object.