1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesPlugin_Partition.h
4 // Created: 31 Jul 2015
5 // Author: Natalia ERMOLAEVA
7 #ifndef FeaturesPlugin_Partition_H_
8 #define FeaturesPlugin_Partition_H_
10 #include "FeaturesPlugin.h"
11 #include <ModelAPI_Feature.h>
13 #include <GeomAlgoAPI_Partition.h>
15 /// \class FeaturesPlugin_Partition
17 /// \brief Feature for applying of Partition operations on Shapes. Partition makes conjunctional
18 /// faces of solids as shared. The result of partitions is a compsolid.
19 class FeaturesPlugin_Partition : public ModelAPI_Feature
23 inline static const std::string& ID()
25 static const std::string MY_ID("Partition");
29 /// Attribute name of base objects.
30 inline static const std::string& BASE_OBJECTS_ID()
32 static const std::string MY_BASE_OBJECTS_ID("base_objects");
33 return MY_BASE_OBJECTS_ID;
36 /// \return the kind of a feature.
37 FEATURESPLUGIN_EXPORT virtual const std::string& getKind()
39 static std::string MY_KIND = FeaturesPlugin_Partition::ID();
43 /// Creates a new part document if needed
44 FEATURESPLUGIN_EXPORT virtual void execute();
46 /// Request for initialization of data model of the feature: adding all attributes
47 FEATURESPLUGIN_EXPORT virtual void initAttributes();
49 /// Use plugin manager for features creation
50 FeaturesPlugin_Partition();
53 /// Stores result of generation.
54 void storeResult(ListOfShape& theObjects,
55 ListOfShape& thePlanes,
56 const GeomShapePtr theResultShape,
57 const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape,
58 const int theIndex = 0);