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_Dumper;
18 class ModelHighAPI_Selection;
20 /// \class FeaturesAPI_Pipe
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for Pipe feature.
23 class FeaturesAPI_Pipe: public ModelHighAPI_Interface
26 /// Constructor without values.
28 explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature);
30 /// Constructor with values.
32 explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33 const std::list<ModelHighAPI_Selection>& theBaseObjects,
34 const ModelHighAPI_Selection& thePath);
36 /// Constructor with values.
38 explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
39 const std::list<ModelHighAPI_Selection>& theBaseObjects,
40 const ModelHighAPI_Selection& thePath,
41 const ModelHighAPI_Selection& theBiNoramal);
43 /// Constructor with values.
45 explicit FeaturesAPI_Pipe(const std::shared_ptr<ModelAPI_Feature>& theFeature,
46 const std::list<ModelHighAPI_Selection>& theBaseObjects,
47 const ModelHighAPI_Selection& thePath,
48 const std::list<ModelHighAPI_Selection>& theLocations);
52 virtual ~FeaturesAPI_Pipe();
54 INTERFACE_5(FeaturesPlugin_Pipe::ID(),
55 baseObjects, FeaturesPlugin_Pipe::BASE_OBJECTS_ID(),
56 ModelAPI_AttributeSelectionList, /** Base objects */,
57 path, FeaturesPlugin_Pipe::PATH_OBJECT_ID(),
58 ModelAPI_AttributeSelection, /** Path */,
59 creationMethod, FeaturesPlugin_Pipe::CREATION_METHOD(),
60 ModelAPI_AttributeString, /** Creation method */,
61 biNormal, FeaturesPlugin_Pipe::BINORMAL_ID(),
62 ModelAPI_AttributeSelection, /** Bi-Normal */,
63 locations, FeaturesPlugin_Pipe::LOCATIONS_ID(),
64 ModelAPI_AttributeSelectionList, /** Locations */)
66 /// Modify base attribute of the feature.
68 void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
70 /// Modify path attribute of the feature.
72 void setPath(const ModelHighAPI_Selection& thePath);
74 /// Modify creation method, base and path.
76 void setByBasePath(const std::list<ModelHighAPI_Selection>& theBaseObjects,
77 const ModelHighAPI_Selection& thePath);
79 /// Modify creation method, base, path and bi-normal.
81 void setByBasePathBiNormal(const std::list<ModelHighAPI_Selection>& theBaseObjects,
82 const ModelHighAPI_Selection& thePath,
83 const ModelHighAPI_Selection& theBiNoramal);
85 /// Modify creation method, base, path and locations.
87 void setByBasePathLocations(const std::list<ModelHighAPI_Selection>& theBaseObjects,
88 const ModelHighAPI_Selection& thePath,
89 const std::list<ModelHighAPI_Selection>& theLocations);
91 /// Dump wrapped feature
93 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
96 /// Pointer on Pipe object.
97 typedef std::shared_ptr<FeaturesAPI_Pipe> PipePtr;
99 /// \ingroup CPPHighAPI
100 /// \brief Create Pipe feature.
102 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
103 const std::list<ModelHighAPI_Selection>& theBaseObjects,
104 const ModelHighAPI_Selection& thePath);
106 /// \ingroup CPPHighAPI
107 /// \brief Create Pipe feature.
109 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
110 const std::list<ModelHighAPI_Selection>& theBaseObjects,
111 const ModelHighAPI_Selection& thePath,
112 const ModelHighAPI_Selection& theBiNoramal);
114 /// \ingroup CPPHighAPI
115 /// \brief Create Pipe feature.
117 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
118 const std::list<ModelHighAPI_Selection>& theBaseObjects,
119 const ModelHighAPI_Selection& thePath,
120 const std::list<ModelHighAPI_Selection>& theLocations);
122 #endif // FeaturesAPI_Pipe_H_