1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: SketchPlugin_ConstraintFillet.h
4 // Created: 19 Mar 2015
5 // Author: Artem ZHIDKOV
7 #ifndef SketchPlugin_ConstraintFillet_H_
8 #define SketchPlugin_ConstraintFillet_H_
10 #include "SketchPlugin.h"
11 #include <SketchPlugin_Sketch.h>
12 #include "SketchPlugin_ConstraintBase.h"
14 /** \class SketchPlugin_ConstraintFillet
16 * \brief Feature for creation of a new constraint filleting two objects which have coincident point
18 * This constraint has three attributes:
19 * SketchPlugin_Constraint::ENTITY_A() and SketchPlugin_Constraint::ENTITY_B() for the filleting objects;
20 * SketchPlugin_Constraint::VALUE() contains radius of filleting circular arc
22 * Also the constraint has attribute SketchPlugin_Constraint::ENTITY_C()
23 * which contains created list objects forming the fillet
25 class SketchPlugin_ConstraintFillet : public SketchPlugin_ConstraintBase
28 /// Fillet constraint kind
29 inline static const std::string& ID()
31 static const std::string MY_CONSTRAINT_FILLET_ID("SketchConstraintFillet");
32 return MY_CONSTRAINT_FILLET_ID;
34 /// \brief Returns the kind of a feature
35 SKETCHPLUGIN_EXPORT virtual const std::string& getKind()
37 static std::string MY_KIND = SketchPlugin_ConstraintFillet::ID();
41 /// \brief Creates a new part document if needed
42 SKETCHPLUGIN_EXPORT virtual void execute();
44 /// \brief Request for initialization of data model of the feature: adding all attributes
45 SKETCHPLUGIN_EXPORT virtual void initAttributes();
47 /// Called on change of any argument-attribute of this object
48 /// \param theID identifier of changed attribute
49 SKETCHPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
51 /// Returns the AIS preview
52 SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
54 /// Reimplemented from ModelAPI_Feature::isMacro().
56 SKETCHPLUGIN_EXPORT virtual bool isMacro() const;
58 /// \brief Use plugin manager for features creation
59 SketchPlugin_ConstraintFillet();
62 std::list<FeaturePtr> myProducedFeatures; ///< list of constraints provided by the fillet
63 std::list<FeaturePtr> myBaseObjects; ///< list of objects the fillet is based