1 // Copyright (C) 2017-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef FeaturesPlugin_Fillet_H_
21 #define FeaturesPlugin_Fillet_H_
23 #include "FeaturesPlugin.h"
25 #include <GeomAPI_Shape.h>
27 #include <ModelAPI_Feature.h>
29 class GeomAlgoAPI_MakeShape;
30 class GeomAPI_DataMapOfShapeMapOfShapes;
32 /// \class FeaturesPlugin_Fillet
34 /// \brief Feature for applying the Fillet operations on Solids.
35 /// Supports fixed radius fillet and varying 2-radius fillet.
36 class FeaturesPlugin_Fillet : public ModelAPI_Feature
40 inline static const std::string& ID()
42 static const std::string MY_ID("Fillet");
46 /// \return the kind of a feature.
47 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
49 static std::string MY_KIND = FeaturesPlugin_Fillet::ID();
53 inline static const std::string& CREATION_METHOD()
55 static std::string MY_CREATION_METHOD("creation_method");
56 return MY_CREATION_METHOD;
59 inline static const std::string CREATION_METHOD_SINGLE_RADIUS()
61 static std::string MY_SINGLE_RADIUS("fixed_radius");
62 return MY_SINGLE_RADIUS;
65 inline static const std::string CREATION_METHOD_VARYING_RADIUS()
67 static std::string MY_VARYING_RADIUS("variable_radius");
68 return MY_VARYING_RADIUS;
71 /// Attribute name of main objects.
72 inline static const std::string& OBJECT_LIST_ID()
74 static const std::string MY_OBJECT_LIST_ID("main_objects");
75 return MY_OBJECT_LIST_ID;
78 /// Attribute name of start radius.
79 inline static const std::string& START_RADIUS_ID()
81 static const std::string MY_START_RADIUS_ID("radius1");
82 return MY_START_RADIUS_ID;
85 /// Attribute name of end radius.
86 inline static const std::string& END_RADIUS_ID()
88 static const std::string MY_END_RADIUS_ID("radius2");
89 return MY_END_RADIUS_ID;
92 /// Attribute name of a radius for fillet with fixed radius.
93 inline static const std::string& RADIUS_ID()
95 return START_RADIUS_ID();
98 /// Performs the fillet algorithm and stores it in the data structure.
99 FEATURESPLUGIN_EXPORT virtual void execute();
101 /// Request for initialization of data model of the feature: adding all attributes.
102 FEATURESPLUGIN_EXPORT virtual void initAttributes();
104 /// Use plugin manager for features creation.
105 FeaturesPlugin_Fillet();
108 /// Load Naming data structure of the feature to the document
109 void loadNamingDS(std::shared_ptr<ModelAPI_ResultBody> theResultBody,
110 const std::shared_ptr<GeomAPI_Shape> theBaseShape,
111 const std::shared_ptr<GeomAPI_Shape> theResultShape,
112 const std::shared_ptr<GeomAlgoAPI_MakeShape>& theMakeShape);