X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_MacroCircle.h;fp=src%2FSketchPlugin%2FSketchPlugin_MacroCircle.h;h=d5b45c59f738152d187c5f5234b76360f65c010d;hb=f64e1300ed35bb1e9a2486cdb5713355e832dd39;hp=c810eb06191d1a56c5313777c9af01e086e2f2ff;hpb=a75b67fb7c1a4d8bf4acec94ecd441a48415634d;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_MacroCircle.h b/src/SketchPlugin/SketchPlugin_MacroCircle.h index c810eb061..d5b45c59f 100644 --- a/src/SketchPlugin/SketchPlugin_MacroCircle.h +++ b/src/SketchPlugin/SketchPlugin_MacroCircle.h @@ -87,6 +87,19 @@ class SketchPlugin_MacroCircle: public SketchPlugin_SketchEntity, return ID; } + /// 2D point - center of the circle. + inline static const std::string& ROTATE_POINT_ID() + { + static const std::string ID("rotate_point"); + return ID; + } + + /// Reference for center point selection. + inline static const std::string& ROTATE_POINT_REF_ID() + { + static const std::string ID("rotate_point_ref"); + return ID; + } /// 2D point - passed point of the circle inline static const std::string& PASSED_POINT_ID() { @@ -150,6 +163,21 @@ class SketchPlugin_MacroCircle: public SketchPlugin_SketchEntity, return ID; } + /// Rotate angle of the circle + inline static const std::string& CIRCLE_ROTATE_ANGLE_ID() + { + static const std::string ID("circle_angle"); + return ID; + } + + /// Attribute name of the version of Circle feature + /// Need for compability with old way of creating circle + inline static const std::string& VERSION_ID() + { + static const std::string MY_VERSION_ID("version"); + return MY_VERSION_ID; + } + /// Returns the kind of a feature SKETCHPLUGIN_EXPORT virtual const std::string& getKind() { @@ -191,11 +219,15 @@ private: void constraintsForCircleByCenterAndPassed(FeaturePtr theCircleFeature); void constraintsForCircleByThreePoints(FeaturePtr theCircleFeature); + void computeNewAngle(std::shared_ptr& theCircle); + FeaturePtr createCircleFeature(); private: std::shared_ptr myCenter; + std::shared_ptr myRotPoint; double myRadius; + double myAngle; }; #endif