X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Projection.h;h=21d8e0d47b110d198a3f2e7af4a038bb7f7886ce;hb=2541f84689e048c4ef29e26010ca385b37f07a0a;hp=b820daf991e95a19bfd0dfe6fa00e84580aaed3b;hpb=bb4ab20a1f03f936d4d8511eb9e9733ee965bb72;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Projection.h b/src/SketchPlugin/SketchPlugin_Projection.h index b820daf99..21d8e0d47 100644 --- a/src/SketchPlugin/SketchPlugin_Projection.h +++ b/src/SketchPlugin/SketchPlugin_Projection.h @@ -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 @@ -62,6 +62,24 @@ public: return MY_INCLUDE; } + static const std::string& KEEP_REFERENCE_ID() + { + static std::string ID("keep_reference"); + return ID; + } + + static const std::string& MAKE_FIXED() + { + static std::string ID("make_fixed"); + return ID; + } + + static const std::string& FIXED_CONSTRAINT_ID() + { + static std::string ID("fixed_constraint"); + return ID; + } + /// Returns true because projected feature is always external virtual bool isFixed() { return true; } @@ -79,6 +97,11 @@ public: /// Called on change of any argument-attribute of this object: for external point SKETCHPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID); + /// Returns true if this feature is used as macro: creates other features and then removed. + /// This feature may change its macro-state according to selected item. + /// \returns false by default + SKETCHPLUGIN_EXPORT virtual bool isMacro() const; + /// Use plugin manager for features creation SketchPlugin_Projection(); @@ -86,6 +109,9 @@ protected: /// \brief Initializes attributes of derived class. virtual void initDerivedClassAttributes(); + /// \brief Initializes attributes of keeping the reference to the original shape. + virtual void initDerivedClassAttributes2(); + private: /// \brief Find projection of a feature onto sketch plane void computeProjection(const std::string& theID); @@ -100,7 +126,8 @@ private: /// \brief Fill attributes of the Arc feature bool fillArc(FeaturePtr& theProjection, const std::shared_ptr& theArc, - const std::shared_ptr& thePlane); + const std::shared_ptr& thePlane, + const std::shared_ptr& theOriginalEdge); /// \brief Fill attributes of the Circle feature bool fillCircle(FeaturePtr& theProjection, const std::shared_ptr& theCircle, @@ -112,7 +139,8 @@ private: /// \brief Fill attributes of the EllipticArc feature bool fillEllipticArc(FeaturePtr& theProjection, const std::shared_ptr& theEllipticArc, - const std::shared_ptr& thePlane); + const std::shared_ptr& thePlane, + const std::shared_ptr& theOriginalEdge); /// \brief Fill attributes of the B-spline feature bool fillBSpline(FeaturePtr& theProjection, const std::shared_ptr& theCurve,