X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Arc.h;h=0464ebeadb30d60da9aa89f6937af6657f29508c;hb=f5c7bb3100ed321392da42f61c2ab505833ec61a;hp=044d074627efede8d9e5d561e4912573078d0603;hpb=a0bf1eb5af40ce92ee7e682959bf5738a3fc092b;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Arc.h b/src/SketchPlugin/SketchPlugin_Arc.h index 044d07462..0464ebead 100644 --- a/src/SketchPlugin/SketchPlugin_Arc.h +++ b/src/SketchPlugin/SketchPlugin_Arc.h @@ -8,7 +8,7 @@ #define SketchPlugin_Arc_H_ #include "SketchPlugin.h" -#include +#include #include #include @@ -19,11 +19,16 @@ * calculated when there is non-initialized attributes of the arc. The second is a result and * it is calculated if all attributes are initialized. */ -class SketchPlugin_Arc : public SketchPlugin_Feature, public GeomAPI_IPresentable +class SketchPlugin_Arc : public SketchPlugin_SketchEntity, public GeomAPI_IPresentable { /// to avoid cyclic dependencies in automatic updates: they mean that /// update is performed right now and automatic updates are not needed bool myStartUpdate, myEndUpdate; + /// to avoid (if possible) additional modification of changed coordinate (issue #855) + double myXEndBefore, myYEndBefore; + + /// to define in which direction draw arc + double myParamBefore; public: /// Arc feature kind @@ -52,6 +57,13 @@ class SketchPlugin_Arc : public SketchPlugin_Feature, public GeomAPI_IPresentabl return MY_END_ID; } + /// Inversed flag + inline static const std::string& INVERSED_ID() + { + static const std::string MY_INVERSED_ID("InversedArc"); + return MY_INVERSED_ID; + } + /// Returns the kind of a feature SKETCHPLUGIN_EXPORT virtual const std::string& getKind() { @@ -80,9 +92,11 @@ class SketchPlugin_Arc : public SketchPlugin_Feature, public GeomAPI_IPresentabl /// \param theDeltaY the delta for Y coordinate is moved SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY); - /// Return the distance between the feature and the point - /// \param thePoint the point - virtual double distanceToPoint(const std::shared_ptr& thePoint); + /// Updates the "reversed" flag + /// \param isReversed whether the arc will be reversed + void setReversed(bool isReversed); + /// Returns \c true is the arc is reversed + bool isReversed(); /// Use plugin manager for features creation SketchPlugin_Arc();