X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_MacroArc.h;h=305b89d8a19fcecf64abefceabbbfecb3c64e650;hb=698653a482c7a9bf408a95703097957264cf25d1;hp=e36fc5d9c0ab65387e5ab9fbe81cfaab39599c83;hpb=1de75803e9baf3de59fa755f9eccb6ef60bb64e4;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_MacroArc.h b/src/SketchPlugin/SketchPlugin_MacroArc.h index e36fc5d9c..305b89d8a 100644 --- a/src/SketchPlugin/SketchPlugin_MacroArc.h +++ b/src/SketchPlugin/SketchPlugin_MacroArc.h @@ -1,8 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> - -// File: SketchPlugin_MacroArc.h -// Created: 26 May 2014 -// Author: Artem ZHIDKOV +// 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 +// #ifndef SketchPlugin_MacroArc_H_ #define SketchPlugin_MacroArc_H_ @@ -59,6 +72,12 @@ class SketchPlugin_MacroArc: public SketchPlugin_SketchEntity, return ID; } + inline static const std::string& ARC_TYPE_BY_TRANSVERSAL_LINE() + { + static const std::string ID("by_transversal_line"); + return ID; + } + /// Central 2D point of the circle which contains the arc inline static const std::string& CENTER_POINT_ID() { @@ -113,6 +132,13 @@ class SketchPlugin_MacroArc: public SketchPlugin_SketchEntity, return ID; } + /// End 2D point of the arc + inline static const std::string& END_POINT_4_ID() + { + static const std::string ID = "end_point_4"; + return ID; + } + inline static const std::string& END_POINT_REF_ID() { static const std::string ID = "end_point_ref"; @@ -138,6 +164,12 @@ class SketchPlugin_MacroArc: public SketchPlugin_SketchEntity, return ID; } + static const std::string& TRANSVERSAL_POINT_ID() + { + static const std::string ID("transversal_point"); + return ID; + } + /// Reversed flag inline static const std::string& REVERSED_ID() { @@ -186,13 +218,6 @@ class SketchPlugin_MacroArc: public SketchPlugin_SketchEntity, /// Creates an arc-shape SKETCHPLUGIN_EXPORT virtual void execute(); - /// Moves the feature - /// \param theDeltaX the delta for X coordinate is moved - /// \param theDeltaY the delta for Y coordinate is moved - SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY) - { - }; - /// Reimplemented from ModelAPI_Feature::isMacro(). SKETCHPLUGIN_EXPORT virtual bool isMacro() const {return true;}; @@ -214,8 +239,9 @@ private: void fillByCenterAndTwoPassed(); /// Set fields for center, start and end points by selected passed points void fillByThreePassedPoints(); - /// Set fields for center, start and end points by selected tangent edge - void fillByTangentEdge(); + /// Set fields for center, start and end points by selected tangent or transversal edge + /// \param theTransversal if \c true, builds transversal arc, otherwise builds tangential arc. + void fillByEdge(bool theTransversal); FeaturePtr createArcFeature();