1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_Intersection.h
4 // Created: 09 June 2016
5 // Author: Dmitry Bobylev
7 #ifndef FeaturesAPI_Intersection_H_
8 #define FeaturesAPI_Intersection_H_
10 #include "FeaturesAPI.h"
12 #include <FeaturesPlugin_Intersection.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Dumper;
18 class ModelHighAPI_Selection;
20 /// \class FeaturesAPI_Intersection
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for Intersection feature.
23 class FeaturesAPI_Intersection: public ModelHighAPI_Interface
26 /// Constructor without values.
28 explicit FeaturesAPI_Intersection(const std::shared_ptr<ModelAPI_Feature>& theFeature);
30 /// Constructor with values.
32 explicit FeaturesAPI_Intersection(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33 const std::list<ModelHighAPI_Selection>& theObjects,
34 const std::list<ModelHighAPI_Selection>& theTools);
38 virtual ~FeaturesAPI_Intersection();
40 INTERFACE_2(FeaturesPlugin_Intersection::ID(),
41 objects, FeaturesPlugin_Intersection::OBJECT_LIST_ID(),
42 ModelAPI_AttributeSelectionList, /** Objects */,
43 tools, FeaturesPlugin_Intersection::TOOL_LIST_ID(),
44 ModelAPI_AttributeSelectionList, /** Tools */)
46 /// Modify objects attribute of the feature.
48 void setObjects(const std::list<ModelHighAPI_Selection>& theObjects);
50 /// Modify tools attribute of the feature.
52 void setTools(const std::list<ModelHighAPI_Selection>& theTools);
54 /// Dump wrapped feature
56 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
59 /// Pointer on Intersection object.
60 typedef std::shared_ptr<FeaturesAPI_Intersection> IntersectionPtr;
62 /// \ingroup CPPHighAPI
63 /// \brief Create Intersection feature.
65 IntersectionPtr addIntersection(const std::shared_ptr<ModelAPI_Document>& thePart,
66 const std::list<ModelHighAPI_Selection>& theObjects,
67 const std::list<ModelHighAPI_Selection>& theTools);
69 #endif // FeaturesAPI_Intersection_H_