X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_MacroEllipse.h;h=bc2ab1333a01e8ba68ae055c331e6174179dac37;hb=417d68795a489d77f81650584dab4f8282304081;hp=596a417e6801682a5479a8e84354f355541d62f8;hpb=c30e18c73237bc82890b00fe48352f88e054ed5b;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_MacroEllipse.h b/src/SketchAPI/SketchAPI_MacroEllipse.h index 596a417e6..bc2ab1333 100644 --- a/src/SketchAPI/SketchAPI_MacroEllipse.h +++ b/src/SketchAPI/SketchAPI_MacroEllipse.h @@ -37,7 +37,8 @@ class SketchAPI_MacroEllipse: public SketchAPI_SketchEntity public: /// Constructor without values. SKETCHAPI_EXPORT - explicit SketchAPI_MacroEllipse(const std::shared_ptr& theFeature); + explicit SketchAPI_MacroEllipse(const std::shared_ptr& theFeature, + bool callInitialize = true); /// Constructor with values. SKETCHAPI_EXPORT @@ -93,29 +94,25 @@ public: /// Return created auxiliary minor axis SKETCHAPI_EXPORT std::shared_ptr minorAxis(); +protected: + // find a parent sketch + void storeSketch(const std::shared_ptr& theFeature); + private: /// Set flag of creation by center, major semi-axis and passed point. - void setByCenterAndPassedPoints(); + void setByCenterAndPassedPoints(const std::shared_ptr& theCenter, + const ModelHighAPI_RefAttr& theCenterRef, + const std::shared_ptr& theMajorAxisPoint, + const ModelHighAPI_RefAttr& theMajorAxisPointRef, + const std::shared_ptr& 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& theMajorAxisPoint1, - const std::shared_ptr& theMajorAxisPoint2, - const std::shared_ptr& thePassedPoint); - - /// Set points of ellipse. - void initializePoints(const std::shared_ptr& theMajorAxisPoint1, - const ModelHighAPI_RefAttr& theMajorAxisPoint1Ref, - const std::shared_ptr& theMajorAxisPoint2, - const ModelHighAPI_RefAttr& theMajorAxisPoint2Ref, - const std::shared_ptr& thePassedPoint, - const ModelHighAPI_RefAttr& thePassedPointRef); + void setByMajorAxisAndPassedPoint(const std::shared_ptr& theMajorAxisStart, + const ModelHighAPI_RefAttr& theMajorAxisStartRef, + const std::shared_ptr& theMajorAxisEnd, + const ModelHighAPI_RefAttr& theMajorAxisEndRef, + const std::shared_ptr& thePassedPoint, + const ModelHighAPI_RefAttr& thePassedPointRef); /// Collect auxiliary features void collectAuxiliary();