1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_Pipe.h
4 // Created: 09 June 2016
5 // Author: Dmitry Bobylev
7 #ifndef FeaturesAPI_Pipe_H_
8 #define FeaturesAPI_Pipe_H_
10 #include "FeaturesAPI.h"
12 #include <FeaturesPlugin_Pipe.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Selection;
19 /// \class FeaturesAPI_Pipe
20 /// \ingroup CPPHighAPI
21 /// \brief Interface for Pipe feature.
22 class FeaturesAPI_Pipe: public ModelHighAPI_Interface
25 /// Constructor without values.
27 explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature);
29 /// Constructor with values.
31 explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
32 const std::list<ModelHighAPI_Selection>& theBaseObjects,
33 const ModelHighAPI_Selection& thePath);
35 /// Constructor with values.
37 explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
38 const std::list<ModelHighAPI_Selection>& theBaseObjects,
39 const ModelHighAPI_Selection& thePath,
40 const ModelHighAPI_Selection& theBiNoramal);
42 /// Constructor with values.
44 explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
45 const std::list<ModelHighAPI_Selection>& theBaseObjects,
46 const ModelHighAPI_Selection& thePath,
47 const std::list<ModelHighAPI_Selection>& theLocations);
51 virtual ~FeaturesAPI_Pipe();
53 INTERFACE_5(FeaturesPlugin_Pipe::ID(),
54 baseObjects, FeaturesPlugin_Pipe::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */,
55 path, FeaturesPlugin_Pipe::PATH_OBJECT_ID(), ModelAPI_AttributeSelection, /** Path */,
56 creationMethod, FeaturesPlugin_Pipe::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */,
57 biNormal, FeaturesPlugin_Pipe::BINORMAL_ID(), ModelAPI_AttributeSelection, /** Bi-Normal */,
58 locations, FeaturesPlugin_Pipe::LOCATIONS_ID(), ModelAPI_AttributeSelectionList, /** Locations */)
60 /// Modify base attribute of the feature.
62 void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
64 /// Modify path attribute of the feature.
66 void setPath(const ModelHighAPI_Selection& thePath);
68 /// Modify creation method, base and path.
70 void setByBasePath(const std::list<ModelHighAPI_Selection>& theBaseObjects,
71 const ModelHighAPI_Selection& thePath);
73 /// Modify creation method, base, path and bi-normal.
75 void setByBasePathBiNormal(const std::list<ModelHighAPI_Selection>& theBaseObjects,
76 const ModelHighAPI_Selection& thePath,
77 const ModelHighAPI_Selection& theBiNoramal);
79 /// Modify creation method, base, path and locations.
81 void setByBasePathLocations(const std::list<ModelHighAPI_Selection>& theBaseObjects,
82 const ModelHighAPI_Selection& thePath,
83 const std::list<ModelHighAPI_Selection>& theLocations);
86 /// Pointer on Pipe object.
87 typedef std::shared_ptr<FeaturesAPI_Pipe> PipePtr;
89 /// \ingroup CPPHighAPI
90 /// \brief Create Pipe feature.
92 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
93 const std::list<ModelHighAPI_Selection>& theBaseObjects,
94 const ModelHighAPI_Selection& thePath);
96 /// \ingroup CPPHighAPI
97 /// \brief Create Pipe feature.
99 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
100 const std::list<ModelHighAPI_Selection>& theBaseObjects,
101 const ModelHighAPI_Selection& thePath,
102 const ModelHighAPI_Selection& theBiNoramal);
104 /// \ingroup CPPHighAPI
105 /// \brief Create Pipe feature.
107 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
108 const std::list<ModelHighAPI_Selection>& theBaseObjects,
109 const ModelHighAPI_Selection& thePath,
110 const std::list<ModelHighAPI_Selection>& theLocations);
112 #endif // FeaturesAPI_Pipe_H_