Salome HOME
Task 3.2. To keep compounds’ sub-shapes for all operations (issue #3139)
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Fillet.h
index c91956ae0058746b3ec88edd5a7d021930852c52..536f6739121ebb02102904ef08525a3a5438344e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2017  CEA/DEN, EDF R&D
+// Copyright (C) 2017-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #ifndef FeaturesPlugin_Fillet_H_
 #define FeaturesPlugin_Fillet_H_
 
-#include "FeaturesPlugin.h"
-
-#include <GeomAPI_Shape.h>
-
-#include <ModelAPI_Feature.h>
-
-class GeomAlgoAPI_MakeShape;
-class GeomAPI_DataMapOfShapeMapOfShapes;
+#include "FeaturesPlugin_VersionedChFi.h"
 
 /// \class FeaturesPlugin_Fillet
 /// \ingroup Plugins
 /// \brief Feature for applying the Fillet operations on Solids.
 ///        Supports fixed radius fillet and varying 2-radius fillet.
-class FeaturesPlugin_Fillet : public ModelAPI_Feature
+class FeaturesPlugin_Fillet : public FeaturesPlugin_VersionedChFi
 {
 public:
   /// Feature kind.
@@ -96,9 +88,6 @@ public:
     return START_RADIUS_ID();
   }
 
-  /// Creates a new part document if needed.
-  FEATURESPLUGIN_EXPORT virtual void execute();
-
   /// Request for initialization of data model of the feature: adding all attributes.
   FEATURESPLUGIN_EXPORT virtual void initAttributes();
 
@@ -106,14 +95,15 @@ public:
   FeaturesPlugin_Fillet();
 
 private:
-  /// Check algorithm is finished correctly and store error otherwise
-  bool isFailed(const std::shared_ptr<GeomAlgoAPI_MakeShape>& theAlgorithm);
-
-  /// Load Naming data structure of the feature to the document
-  void loadNamingDS(std::shared_ptr<ModelAPI_ResultBody> theResultBody,
-                    const std::shared_ptr<GeomAPI_Shape> theBaseShape,
-                    const std::shared_ptr<GeomAPI_Shape> theResultShape,
-                    const std::shared_ptr<GeomAlgoAPI_MakeShape>& theMakeShape);
+  /// Return attribute storing the selected objects of the operation.
+  virtual std::shared_ptr<ModelAPI_Attribute> objectsAttribute();
+
+  /// Return name of modified shape prefix name
+  virtual const std::string& modifiedShapePrefix() const;
+
+  /// Run chamfer/fillet operation and returns the modification algorithm if succeed.
+  virtual std::shared_ptr<GeomAlgoAPI_MakeShape>
+      performOperation(const GeomShapePtr& theSolid, const ListOfShape& theEdges);
 };
 
 #endif