X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Feature.h;h=b8437dcbcaf7c3674d2399bc47ac87a5d4171668;hb=2e9c8b6bbbc29447cd5c68e9ca9f341d022bdd1b;hp=01b9d88eecf788dd89f6f2ec9a7b858ea32cd17f;hpb=f1cd93fd02a54259f72e3191d037323a496b2bef;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Feature.h b/src/SketchPlugin/SketchPlugin_Feature.h index 01b9d88ee..b8437dcbc 100644 --- a/src/SketchPlugin/SketchPlugin_Feature.h +++ b/src/SketchPlugin/SketchPlugin_Feature.h @@ -13,32 +13,30 @@ #include #include #include +#include + +#include class SketchPlugin_Sketch; class GeomAPI_Pnt2d; class Handle_AIS_InteractiveObject; /**\class SketchPlugin_Feature - * \ingroup DataModel + * \ingroup Plugins * \brief Feature for creation of the new feature in PartSet. This is an abstract class to give * an interface to create the sketch feature preview. */ class SketchPlugin_Feature : public ModelAPI_Feature { public: - /// Simple creation of interactive object by the result of the object - static AISObjectPtr simpleAISObject(std::shared_ptr theRes, - AISObjectPtr thePrevious); - - /// Reference to the external edge or vertex as a AttributeSelection - inline static const std::string& EXTERNAL_ID() + /// Returns true if this feature must be displayed in the history (top level of Part tree) + SKETCHPLUGIN_EXPORT virtual bool isInHistory() { - static const std::string MY_EXTERNAL_ID("External"); - return MY_EXTERNAL_ID; + return false; } - /// Returns true if this feature must be displayed in the history (top level of Part tree) - SKETCHPLUGIN_EXPORT virtual bool isInHistory() + /// Returns true of the feature is created basing on the external shape of not-this-sketch object + SKETCHPLUGIN_EXPORT virtual bool isExternal() const { return false; } @@ -58,14 +56,6 @@ class SketchPlugin_Feature : public ModelAPI_Feature /// Returns true is sketch element is under the rigid constraint SKETCHPLUGIN_EXPORT virtual bool isFixed() {return false;} - inline bool isExternal() const - { - AttributeSelectionPtr aAttr = data()->selection(EXTERNAL_ID()); - if (aAttr) - return aAttr->context(); - return false; - } - /// Returns the sketch of this feature SketchPlugin_Sketch* sketch(); protected: