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_Selection;
19 /// \class FeaturesAPI_Intersection
20 /// \ingroup CPPHighAPI
21 /// \brief Interface for Intersection feature.
22 class FeaturesAPI_Intersection: public ModelHighAPI_Interface
25 /// Constructor without values.
27 explicit FeaturesAPI_Intersection(const std::shared_ptr<ModelAPI_Feature>& theFeature);
29 /// Constructor with values.
31 explicit FeaturesAPI_Intersection(const std::shared_ptr<ModelAPI_Feature>& theFeature,
32 const std::list<ModelHighAPI_Selection>& theObjects,
33 const std::list<ModelHighAPI_Selection>& theTools);
37 virtual ~FeaturesAPI_Intersection();
39 INTERFACE_2(FeaturesPlugin_Intersection::ID(),
40 objects, FeaturesPlugin_Intersection::OBJECT_LIST_ID(), ModelAPI_AttributeSelectionList, /** Objects */,
41 tools, FeaturesPlugin_Intersection::TOOL_LIST_ID(), ModelAPI_AttributeSelectionList, /** Tools */)
43 /// Modify objects attribute of the feature.
45 void setObjects(const std::list<ModelHighAPI_Selection>& theObjects);
47 /// Modify tools attribute of the feature.
49 void setTools(const std::list<ModelHighAPI_Selection>& theTools);
52 /// Pointer on Intersection object.
53 typedef std::shared_ptr<FeaturesAPI_Intersection> IntersectionPtr;
55 /// \ingroup CPPHighAPI
56 /// \brief Create Intersection feature.
58 IntersectionPtr addIntersection(const std::shared_ptr<ModelAPI_Document>& thePart,
59 const std::list<ModelHighAPI_Selection>& theObjects,
60 const std::list<ModelHighAPI_Selection>& theTools);
62 #endif // FeaturesAPI_Intersection_H_