Salome HOME
[bos #29098] Help panel for SHAPER module. Eliminate the limitation on store/restore...
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Ellipse.h
index fc4b77c64e48be137a9b04d00704664b86aac12c..26ba68e5127a917f8f86c151e0c5762dd26366a8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2017  CEA/DEN, EDF R&D
+// Copyright (C) 2017-2022  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
 //
 // 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<mailto:webmaster.salome@opencascade.com>
+// 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_
 
@@ -50,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_focus");
+    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_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;
   }
 
@@ -86,17 +113,17 @@ class SketchPlugin_Ellipse: public SketchPlugin_SketchEntity
   /// Creates a new part document if needed
   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);
-
   /// Use plugin manager for features creation
   SketchPlugin_Ellipse();
 
 protected:
   /// \brief Initializes attributes of derived class.
   virtual void initDerivedClassAttributes();
+
+private:
+  bool fillCharacteristicPoints();
+
+  void createEllipse(SketchPlugin_Sketch* theSketch, const int theResultIndex);
 };
 
 #endif