Salome HOME
ce01edd8078b0a25f2c27c7e48b989c924cd67e2
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_RevolutionBoolean.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        FeaturesPlugin_RevolutionBoolean.h
4 // Created:     11 June 2015
5 // Author:      Dmitry Bobylev
6
7 #ifndef FeaturesPlugin_RevolutionBoolean_H_
8 #define FeaturesPlugin_RevolutionBoolean_H_
9
10 #include <FeaturesPlugin_CompositeBoolean.h>
11
12 /** \class FeaturesPlugin_RevolutionBoolean
13  *  \ingroup Plugins
14  */
15 class FeaturesPlugin_RevolutionBoolean : public FeaturesPlugin_CompositeBoolean
16 {
17 public:
18   /// Attribute name of an revolution axis.
19   inline static const std::string& AXIS_OBJECT_ID()
20   {
21     static const std::string MY_AXIS_ID("axis_object");
22     return MY_AXIS_ID;
23   }
24
25   /// attribute name for creation method
26   inline static const std::string& CREATION_METHOD()
27   {
28     static const std::string METHOD_ATTR("CreationMethod");
29     return METHOD_ATTR;
30   }
31
32   /// Attribute name of revolution to angle.
33   inline static const std::string& TO_ANGLE_ID()
34   {
35     static const std::string MY_TO_ANGLE_ID("to_angle");
36     return MY_TO_ANGLE_ID;
37   }
38
39   /// Attribute name of revolution from angle.
40   inline static const std::string& FROM_ANGLE_ID()
41   {
42     static const std::string MY_FROM_ANGLE_ID("from_angle");
43     return MY_FROM_ANGLE_ID;
44   }
45   
46   /// Attribute name of an object to which the revolution grows.
47   inline static const std::string& TO_OBJECT_ID()
48   {
49     static const std::string MY_TO_OBJECT_ID("to_object");
50     return MY_TO_OBJECT_ID;
51   }
52
53   /// Attribute name of extrusion offset.
54   inline static const std::string& TO_OFFSET_ID()
55   {
56     static const std::string MY_TO_OFFSET_ID("to_offset");
57     return MY_TO_OFFSET_ID;
58   }
59
60   /// Attribute name of an object from which the revolution grows.
61   inline static const std::string& FROM_OBJECT_ID()
62   {
63     static const std::string MY_FROM_OBJECT_ID("from_object");
64     return MY_FROM_OBJECT_ID;
65   }
66
67   /// Attribute name of extrusion offset.
68   inline static const std::string& FROM_OFFSET_ID()
69   {
70     static const std::string MY_FROM_OFFSET_ID("from_offset");
71     return MY_FROM_OFFSET_ID;
72   }
73
74 protected:
75   /// Init attributes for revolution.
76   virtual void initMakeSolidsAttributes();
77
78   /// Create solids from faces with revolution.
79   virtual void makeSolids(const ListOfShape& theFaces,
80                           ListOfShape& theResults,
81                           std::list<std::shared_ptr<GeomAPI_Interface>>& theAlgos);
82
83 protected:
84   FeaturesPlugin_RevolutionBoolean(){};
85 };
86
87 #endif