Salome HOME
Issue #1834: Fix length of lines
[modules/shaper.git] / src / BuildAPI / BuildAPI_Wire.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        BuildAPI_Wire.h
4 // Created:     09 June 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef BuildAPI_Wire_H_
8 #define BuildAPI_Wire_H_
9
10 #include "BuildAPI.h"
11
12 #include <BuildPlugin_Wire.h>
13
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
16
17 class ModelHighAPI_Selection;
18
19 /// \class BuildAPI_Wire
20 /// \ingroup CPPHighAPI
21 /// \brief Interface for Wire feature.
22 class BuildAPI_Wire: public ModelHighAPI_Interface
23 {
24 public:
25   /// Constructor without values.
26   BUILDAPI_EXPORT
27   explicit BuildAPI_Wire(const std::shared_ptr<ModelAPI_Feature>& theFeature);
28
29   /// Constructor with values.
30   BUILDAPI_EXPORT
31   explicit BuildAPI_Wire(const std::shared_ptr<ModelAPI_Feature>& theFeature,
32                          const std::list<ModelHighAPI_Selection>& theBaseObjects);
33
34   /// Destructor.
35   BUILDAPI_EXPORT
36   virtual ~BuildAPI_Wire();
37
38   INTERFACE_1(BuildPlugin_Wire::ID(),
39               baseObjects, BuildPlugin_Wire::BASE_OBJECTS_ID(),
40               ModelAPI_AttributeSelectionList, /** Base objects */)
41
42   /// Modify base attribute of the feature.
43   BUILDAPI_EXPORT
44   void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
45
46   /// Adds closed contour.
47   BUILDAPI_EXPORT
48   void addContour();
49
50   /// Dump wrapped feature
51   BUILDAPI_EXPORT
52   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
53 };
54
55 /// Pointer on Wire object.
56 typedef std::shared_ptr<BuildAPI_Wire> WirePtr;
57
58 /// \ingroup CPPHighAPI
59 /// \brief Create Wire feature.
60 BUILDAPI_EXPORT
61 WirePtr addWire(const std::shared_ptr<ModelAPI_Document>& thePart,
62                 const std::list<ModelHighAPI_Selection>& theBaseObjects);
63
64 #endif // BuildAPI_Wire_H_