X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_Feature.h;h=b8437dcbcaf7c3674d2399bc47ac87a5d4171668;hb=2e9c8b6bbbc29447cd5c68e9ca9f341d022bdd1b;hp=7ca0eb6d36d6f0f995d0e32ca7c8d0c53073b2cc;hpb=07bc7fd1c59cbe7a2d916654edf77409670f215b;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Feature.h b/src/SketchPlugin/SketchPlugin_Feature.h index 7ca0eb6d3..b8437dcbc 100644 --- a/src/SketchPlugin/SketchPlugin_Feature.h +++ b/src/SketchPlugin/SketchPlugin_Feature.h @@ -13,29 +13,30 @@ #include #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 GeomAPI_ICustomPrs +class SketchPlugin_Feature : public ModelAPI_Feature { public: - /// 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; } @@ -55,17 +56,6 @@ class SketchPlugin_Feature : public ModelAPI_Feature, public GeomAPI_ICustomPrs /// 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; - } - - /// Customize presentation of the feature - virtual void customisePresentation(AISObjectPtr thePrs); - /// Returns the sketch of this feature SketchPlugin_Sketch* sketch(); protected: