Salome HOME
Fix for the issue #1766 : treat face as equal with different orientation to find...
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_RevolutionBoolean.h
index 679eb58317eddf25f7ce06a3ccf6d9784ff0ec33..f4986ffd3bb594b2dd4d5e66684dffd30dc944ea 100644 (file)
@@ -17,6 +17,8 @@
 #include <ModelHighAPI_Macro.h>
 
 class ModelHighAPI_Double;
+class ModelHighAPI_Dumper;
+class ModelHighAPI_Reference;
 class ModelHighAPI_Selection;
 
 /// \class FeaturesAPI_RevolutionBoolean
@@ -30,7 +32,7 @@ public:
   virtual ~FeaturesAPI_RevolutionBoolean();
 
   INTERFACE_11("",
-               sketchLauncher, FeaturesPlugin_Revolution::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch launcher */,
+               sketch, FeaturesPlugin_Revolution::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch launcher */,
                baseObjects, FeaturesPlugin_Revolution::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */,
                axis, FeaturesPlugin_Revolution::AXIS_OBJECT_ID(), ModelAPI_AttributeSelection, /** Axis */,
                creationMethod, FeaturesPlugin_Revolution::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */,
@@ -42,6 +44,10 @@ public:
                fromOffset, FeaturesPlugin_Revolution::FROM_OFFSET_ID(), ModelAPI_AttributeDouble, /** From offset */,
                booleanObjects, FeaturesPlugin_CompositeBoolean::OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Boolean objects */)
 
+  /// Modify base attribute of the feature.
+  FEATURESAPI_EXPORT
+  void setNestedSketch(const ModelHighAPI_Reference& theSketch);
+
   /// Modify base attribute of the feature.
   FEATURESAPI_EXPORT
   void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
@@ -69,19 +75,28 @@ public:
   FEATURESAPI_EXPORT
   void setBooleanObjects(const std::list<ModelHighAPI_Selection>& theBooleanObjects);
 
+  /// Dump wrapped feature
+  FEATURESAPI_EXPORT
+  virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+
 protected:
   /// Constructor without values.
   FEATURESAPI_EXPORT
   explicit FeaturesAPI_RevolutionBoolean(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
+private:
+  void execIfBaseNotEmpty();
 };
 
+/// \class FeaturesAPI_RevolutionCut
+/// \ingroup CPPHighAPI
+/// \brief Interface for RevolutionCut feature.
 class FeaturesAPI_RevolutionCut: public FeaturesAPI_RevolutionBoolean
 {
 public:
-  FEATURESAPI_EXPORT
-  virtual std::string getID() {
-    return FeaturesPlugin_RevolutionCut::ID();
-  }
+
+  static std::string ID() { return FeaturesPlugin_RevolutionCut::ID(); }
+  virtual std::string getID() { return ID(); }
 
   /// Constructor without values.
   FEATURESAPI_EXPORT
@@ -150,13 +165,15 @@ RevolutionCutPtr addRevolutionCut(const std::shared_ptr<ModelAPI_Document>& theP
                                   const ModelHighAPI_Double& theFromOffset,
                                   const std::list<ModelHighAPI_Selection>& theBooleanObjects);
 
+/// \class FeaturesAPI_RevolutionFuse
+/// \ingroup CPPHighAPI
+/// \brief Interface for RevolutionFuse feature.
 class FeaturesAPI_RevolutionFuse: public FeaturesAPI_RevolutionBoolean
 {
 public:
-  FEATURESAPI_EXPORT
-  virtual std::string getID() {
-    return FeaturesPlugin_RevolutionFuse::ID();
-  }
+
+  static std::string ID() { return FeaturesPlugin_RevolutionFuse::ID(); }
+  virtual std::string getID() { return ID(); }
 
   /// Constructor without values.
   FEATURESAPI_EXPORT