Salome HOME
oubli
[modules/shaper.git] / src / SketchAPI / SketchAPI_MacroEllipse.h
index 7e0103b16b7057ee2d6ff4229c9430bcd9bf567b..042c53dc9b7708ea4c19475268f6fb6cc3c79774 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-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
@@ -94,29 +94,25 @@ public:
   /// Return created auxiliary minor axis
   SKETCHAPI_EXPORT std::shared_ptr<SketchAPI_Line> minorAxis();
 
+protected:
+  // find a parent sketch
+  void storeSketch(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
 private:
   /// Set flag of creation by center, major semi-axis and passed point.
-  void setByCenterAndPassedPoints();
+  void setByCenterAndPassedPoints(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
+                                  const ModelHighAPI_RefAttr&           theCenterRef,
+                                  const std::shared_ptr<GeomAPI_Pnt2d>& theMajorAxisPoint,
+                                  const ModelHighAPI_RefAttr&           theMajorAxisPointRef,
+                                  const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint,
+                                  const ModelHighAPI_RefAttr&           thePassedPointRef);
   /// Set flag of creation by major axis and passed point.
-  void setByMajorAxisAndPassedPoint();
-
-  /// Set points of ellipse.
-  void initializePoints(double theMajorAxisX1, double theMajorAxisY1,
-                        double theMajorAxisX2, double theMajorAxisY2,
-                        double thePassedX, double thePassedY);
-
-  /// Set points of ellipse.
-  void initializePoints(const std::shared_ptr<GeomAPI_Pnt2d>& theMajorAxisPoint1,
-                        const std::shared_ptr<GeomAPI_Pnt2d>& theMajorAxisPoint2,
-                        const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint);
-
-  /// Set points of ellipse.
-  void initializePoints(const std::shared_ptr<GeomAPI_Pnt2d>& theMajorAxisPoint1,
-                        const ModelHighAPI_RefAttr&           theMajorAxisPoint1Ref,
-                        const std::shared_ptr<GeomAPI_Pnt2d>& theMajorAxisPoint2,
-                        const ModelHighAPI_RefAttr&           theMajorAxisPoint2Ref,
-                        const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint,
-                        const ModelHighAPI_RefAttr&           thePassedPointRef);
+  void setByMajorAxisAndPassedPoint(const std::shared_ptr<GeomAPI_Pnt2d>& theMajorAxisStart,
+                                    const ModelHighAPI_RefAttr&           theMajorAxisStartRef,
+                                    const std::shared_ptr<GeomAPI_Pnt2d>& theMajorAxisEnd,
+                                    const ModelHighAPI_RefAttr&           theMajorAxisEndRef,
+                                    const std::shared_ptr<GeomAPI_Pnt2d>& thePassedPoint,
+                                    const ModelHighAPI_RefAttr&           thePassedPointRef);
 
   /// Collect auxiliary features
   void collectAuxiliary();