1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchPlugin_Fillet.h
4 // Created: 19 Mar 2015
5 // Author: Artem ZHIDKOV
7 #ifndef SketchPlugin_Fillet_H_
8 #define SketchPlugin_Fillet_H_
10 #include "SketchPlugin.h"
12 #include "SketchPlugin_SketchEntity.h"
14 #include <GeomAPI_IPresentable.h>
18 /// \class SketchPlugin_Fillet
20 /// \brief Feature for creation of a new arc filleting two objects which have
22 class SketchPlugin_Fillet: public SketchPlugin_SketchEntity, public GeomAPI_IPresentable
26 inline static const std::string& ID()
28 static const std::string MY_FEATURE_ID("SketchFillet");
32 /// Attribute name of fillet point.
33 inline static const std::string& FILLET_POINT_ID()
35 static const std::string ID("fillet_point");
39 /// \return the kind of a feature.
40 SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
42 static std::string MY_KIND = SketchPlugin_Fillet::ID();
46 /// \brief Creates a new part document if needed.
47 SKETCHPLUGIN_EXPORT virtual void execute();
49 /// \brief Request for initialization of data model of the feature: adding all attributes.
50 SKETCHPLUGIN_EXPORT virtual void initAttributes();
52 /// Returns the AIS preview
53 SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
55 /// Reimplemented from ModelAPI_Feature::isMacro().
57 SKETCHPLUGIN_EXPORT virtual bool isMacro() const {return true;};
59 SKETCHPLUGIN_EXPORT virtual bool isPreviewNeeded() const {return false;};
61 /// Reimplemented from SketchPlugin_Feature::move().
63 SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY) {};
65 /// \brief Use plugin manager for features creation
66 SketchPlugin_Fillet();
69 FeaturePtr myBaseFeatures[2];
70 std::string myFeatAttributes[4]; // attributes of features
72 bool myIsNotInversed[2]; // indicates which point the features share
74 std::shared_ptr<GeomAPI_XY> myCenterXY;
75 std::shared_ptr<GeomAPI_XY> myTangentXY1;
76 std::shared_ptr<GeomAPI_XY> myTangentXY2;