1 // Copyright (C) 2017 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
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #ifndef FeaturesAPI_Fillet_H_
22 #define FeaturesAPI_Fillet_H_
24 #include "FeaturesAPI.h"
26 #include <FeaturesPlugin_Fillet.h>
28 #include <ModelHighAPI_Interface.h>
29 #include <ModelHighAPI_Macro.h>
31 class ModelHighAPI_Double;
32 class ModelHighAPI_Selection;
34 /// \class FeaturesAPI_Fillet
35 /// \ingroup CPPHighAPI
36 /// \brief Interface for Fillet feature.
37 class FeaturesAPI_Fillet: public ModelHighAPI_Interface
40 /// Constructor without values.
42 explicit FeaturesAPI_Fillet(const std::shared_ptr<ModelAPI_Feature>& theFeature);
44 /// Constructor with values.
46 explicit FeaturesAPI_Fillet(const std::shared_ptr<ModelAPI_Feature>& theFeature,
47 const std::list<ModelHighAPI_Selection>& theBaseObjects,
48 const ModelHighAPI_Double& theRadius);
50 /// Constructor with values.
52 explicit FeaturesAPI_Fillet(const std::shared_ptr<ModelAPI_Feature>& theFeature,
53 const std::list<ModelHighAPI_Selection>& theBaseObjects,
54 const ModelHighAPI_Double& theRadius1,
55 const ModelHighAPI_Double& theRadius2);
59 virtual ~FeaturesAPI_Fillet();
61 INTERFACE_5(FeaturesPlugin_Fillet::ID(),
62 creationMethod, FeaturesPlugin_Fillet::CREATION_METHOD(),
63 ModelAPI_AttributeString,
64 /** Creation method */,
65 baseObjects, FeaturesPlugin_Fillet::OBJECT_LIST_ID(),
66 ModelAPI_AttributeSelectionList,
68 radius, FeaturesPlugin_Fillet::RADIUS_ID(),
69 ModelAPI_AttributeDouble,
70 /** Value of the fixed radius fillet */,
71 startRadius, FeaturesPlugin_Fillet::START_RADIUS_ID(),
72 ModelAPI_AttributeDouble,
73 /** Start radius of the varying radius fillet */,
74 endRadius, FeaturesPlugin_Fillet::END_RADIUS_ID(),
75 ModelAPI_AttributeDouble,
76 /** End radius of the varying radius fillet */)
78 /// Modify base objects of the fillet.
80 void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
82 /// Modify fillet to have fixed radius
84 void setRadius(const ModelHighAPI_Double& theRadius);
86 /// Modify fillet to have varying radius
88 void setRadius(const ModelHighAPI_Double& theRadius1, const ModelHighAPI_Double& theRadius2);
90 /// Dump wrapped feature
92 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
95 void execIfBaseNotEmpty();
98 /// Pointer on Fillet object.
99 typedef std::shared_ptr<FeaturesAPI_Fillet> FilletPtr;
101 /// \ingroup CPPHighAPI
102 /// \brief Create Fillet feature.
104 FilletPtr addFillet(const std::shared_ptr<ModelAPI_Document>& thePart,
105 const std::list<ModelHighAPI_Selection>& theBaseObjects,
106 const ModelHighAPI_Double& theRadius);
108 /// \ingroup CPPHighAPI
109 /// \brief Create Fillet feature.
111 FilletPtr addFillet(const std::shared_ptr<ModelAPI_Document>& thePart,
112 const std::list<ModelHighAPI_Selection>& theBaseObjects,
113 const ModelHighAPI_Double& theRadius1,
114 const ModelHighAPI_Double& theRadius2);
116 #endif // FeaturesAPI_Fillet_H_