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(), ModelAPI_AttributeSelectionList, /** Base objects */,
56 path, FeaturesPlugin_Pipe::PATH_OBJECT_ID(), ModelAPI_AttributeSelection, /** Path */,
57 creationMethod, FeaturesPlugin_Pipe::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */,
58 biNormal, FeaturesPlugin_Pipe::BINORMAL_ID(), ModelAPI_AttributeSelection, /** Bi-Normal */,
59 locations, FeaturesPlugin_Pipe::LOCATIONS_ID(), ModelAPI_AttributeSelectionList, /** Locations */)
61 /// Modify base attribute of the feature.
63 void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
65 /// Modify path attribute of the feature.
67 void setPath(const ModelHighAPI_Selection& thePath);
69 /// Modify creation method, base and path.
71 void setByBasePath(const std::list<ModelHighAPI_Selection>& theBaseObjects,
72 const ModelHighAPI_Selection& thePath);
74 /// Modify creation method, base, path and bi-normal.
76 void setByBasePathBiNormal(const std::list<ModelHighAPI_Selection>& theBaseObjects,
77 const ModelHighAPI_Selection& thePath,
78 const ModelHighAPI_Selection& theBiNoramal);
80 /// Modify creation method, base, path and locations.
82 void setByBasePathLocations(const std::list<ModelHighAPI_Selection>& theBaseObjects,
83 const ModelHighAPI_Selection& thePath,
84 const std::list<ModelHighAPI_Selection>& theLocations);
86 /// Dump wrapped feature
88 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
91 /// Pointer on Pipe object.
92 typedef std::shared_ptr<FeaturesAPI_Pipe> PipePtr;
94 /// \ingroup CPPHighAPI
95 /// \brief Create Pipe feature.
97 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
98 const std::list<ModelHighAPI_Selection>& theBaseObjects,
99 const ModelHighAPI_Selection& thePath);
101 /// \ingroup CPPHighAPI
102 /// \brief Create Pipe feature.
104 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
105 const std::list<ModelHighAPI_Selection>& theBaseObjects,
106 const ModelHighAPI_Selection& thePath,
107 const ModelHighAPI_Selection& theBiNoramal);
109 /// \ingroup CPPHighAPI
110 /// \brief Create Pipe feature.
112 PipePtr addPipe(const std::shared_ptr<ModelAPI_Document>& thePart,
113 const std::list<ModelHighAPI_Selection>& theBaseObjects,
114 const ModelHighAPI_Selection& thePath,
115 const std::list<ModelHighAPI_Selection>& theLocations);
117 #endif // FeaturesAPI_Pipe_H_