X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Ellipse.h;h=57f96399a35c901121f0e3da349109c1d0e96568;hb=ce72dd01645885d720b731795d676e2feeabc8d6;hp=e8c0252bdc623132a9a77246e12431636b670a7f;hpb=6e421e939851e0de46554ae45a3ca0e1f67cd91d;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Ellipse.h b/src/SketchPlugin/SketchPlugin_Ellipse.h index e8c0252bd..57f96399a 100644 --- a/src/SketchPlugin/SketchPlugin_Ellipse.h +++ b/src/SketchPlugin/SketchPlugin_Ellipse.h @@ -1,4 +1,4 @@ -// Copyright (C) 2017-2019 CEA/DEN, EDF R&D +// Copyright (C) 2017-2020 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 @@ -17,10 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: SketchPlugin_Ellipse.h -// Created: 26 April 2017 -// Author: Artem ZHIDKOV - #ifndef SketchPlugin_Ellipse_H_ #define SketchPlugin_Ellipse_H_ @@ -49,9 +45,41 @@ class SketchPlugin_Ellipse: public SketchPlugin_SketchEntity } /// 2D point - focus of the ellipse - inline static const std::string& FOCUS_ID() + inline static const std::string& FIRST_FOCUS_ID() + { + static const std::string ID("ellipse_first_focus"); + return ID; + } + /// 2D point - second focus of the ellipse + inline static const std::string& SECOND_FOCUS_ID() + { + static const std::string ID("ellipse_second_focus"); + return ID; + } + + /// 2D point - start point of major axis + inline static const std::string& MAJOR_AXIS_START_ID() + { + static const std::string ID("ellipse_major_axis_start_point"); + return ID; + } + /// 2D point - end point of major axis + inline static const std::string& MAJOR_AXIS_END_ID() + { + static const std::string ID("ellipse_major_axis_end_point"); + return ID; + } + + /// 2D point - start point of minor axis + inline static const std::string& MINOR_AXIS_START_ID() { - static const std::string ID("ellipse_focus"); + static const std::string ID("ellipse_minor_axis_start_point"); + return ID; + } + /// 2D point - end point of minor axis + inline static const std::string& MINOR_AXIS_END_ID() + { + static const std::string ID("ellipse_minor_axis_end_point"); return ID; } @@ -91,6 +119,11 @@ class SketchPlugin_Ellipse: public SketchPlugin_SketchEntity protected: /// \brief Initializes attributes of derived class. virtual void initDerivedClassAttributes(); + +private: + bool fillCharacteristicPoints(); + + void createEllipse(SketchPlugin_Sketch* theSketch, const int theResultIndex); }; #endif