Salome HOME
Composite features update due to changes in Extrusion and Revolution algos
[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  *  \brief Interface for the composite revolution feature.
15  */
16 class FeaturesPlugin_RevolutionBoolean : public FeaturesPlugin_CompositeBoolean
17 {
18 public:
19   /// Attribute name of an revolution axis.
20   inline static const std::string& AXIS_OBJECT_ID()
21   {
22     static const std::string MY_AXIS_ID("axis_object");
23     return MY_AXIS_ID;
24   }
25
26   /// attribute name for creation method
27   inline static const std::string& CREATION_METHOD()
28   {
29     static const std::string METHOD_ATTR("CreationMethod");
30     return METHOD_ATTR;
31   }
32
33   /// Attribute name of revolution to angle.
34   inline static const std::string& TO_ANGLE_ID()
35   {
36     static const std::string MY_TO_ANGLE_ID("to_angle");
37     return MY_TO_ANGLE_ID;
38   }
39
40   /// Attribute name of revolution from angle.
41   inline static const std::string& FROM_ANGLE_ID()
42   {
43     static const std::string MY_FROM_ANGLE_ID("from_angle");
44     return MY_FROM_ANGLE_ID;
45   }
46   
47   /// Attribute name of an object to which the revolution grows.
48   inline static const std::string& TO_OBJECT_ID()
49   {
50     static const std::string MY_TO_OBJECT_ID("to_object");
51     return MY_TO_OBJECT_ID;
52   }
53
54   /// Attribute name of extrusion offset.
55   inline static const std::string& TO_OFFSET_ID()
56   {
57     static const std::string MY_TO_OFFSET_ID("to_offset");
58     return MY_TO_OFFSET_ID;
59   }
60
61   /// Attribute name of an object from which the revolution grows.
62   inline static const std::string& FROM_OBJECT_ID()
63   {
64     static const std::string MY_FROM_OBJECT_ID("from_object");
65     return MY_FROM_OBJECT_ID;
66   }
67
68   /// Attribute name of extrusion offset.
69   inline static const std::string& FROM_OFFSET_ID()
70   {
71     static const std::string MY_FROM_OFFSET_ID("from_offset");
72     return MY_FROM_OFFSET_ID;
73   }
74
75 protected:
76   /// Init attributes for revolution.
77   virtual void initMakeSolidsAttributes();
78
79   /// Create solids from faces with revolution.
80   virtual void makeSolids(const ListOfShape& theFaces,
81                           ListOfShape& theResults,
82                           ListOfMakeShape& theAlgos);
83
84 protected:
85   FeaturesPlugin_RevolutionBoolean(){};
86 };
87
88 #endif