]> SALOME platform Git repositories - modules/shaper.git/blob - src/FeaturesAPI/FeaturesAPI_Placement.h
Salome HOME
Issue #1834: Fix length of lines
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_Placement.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_Placement.h
4 // Created:     07 June 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef FeaturesAPI_Placement_H_
8 #define FeaturesAPI_Placement_H_
9
10 #include "FeaturesAPI.h"
11
12 #include <FeaturesPlugin_Placement.h>
13
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
16
17 class ModelHighAPI_Dumper;
18 class ModelHighAPI_Selection;
19
20 /// \class FeaturesAPI_Placement
21 /// \ingroup CPPHighAPI
22 /// \brief Interface for Placement feature.
23 class FeaturesAPI_Placement: public ModelHighAPI_Interface
24 {
25 public:
26   /// Constructor without values.
27   FEATURESAPI_EXPORT
28   explicit FeaturesAPI_Placement(const std::shared_ptr<ModelAPI_Feature>& theFeature);
29
30   /// Constructor with values.
31   FEATURESAPI_EXPORT
32   FeaturesAPI_Placement(const std::shared_ptr<ModelAPI_Feature>& theFeature,
33                         const std::list<ModelHighAPI_Selection>& theObjects,
34                         const ModelHighAPI_Selection& theStartShape,
35                         const ModelHighAPI_Selection& theEndShape,
36                         const bool theReverseDirection = false,
37                         const bool theCentering = false);
38
39   /// Destructor.
40   FEATURESAPI_EXPORT
41   virtual ~FeaturesAPI_Placement();
42
43   INTERFACE_5(FeaturesPlugin_Placement::ID(),
44               objects, FeaturesPlugin_Placement::OBJECTS_LIST_ID(), 
45               ModelAPI_AttributeSelectionList, /** Main objects */,
46               startShape, FeaturesPlugin_Placement::START_SHAPE_ID(),
47               ModelAPI_AttributeSelection, /** Start shape */,
48               endShape, FeaturesPlugin_Placement::END_SHAPE_ID(), 
49               ModelAPI_AttributeSelection, /** End shape */,
50               reverseDirection, FeaturesPlugin_Placement::REVERSE_ID(),
51               ModelAPI_AttributeBoolean, /** Reverse direction flag */,
52               centering, FeaturesPlugin_Placement::CENTERING_ID(),
53               ModelAPI_AttributeBoolean, /** Centering flag */)
54
55   /// Set objects.
56   FEATURESAPI_EXPORT
57   void setObjects(const std::list<ModelHighAPI_Selection>& theObjects);
58
59   /// Set start shape.
60   FEATURESAPI_EXPORT
61   void setStartShape(const ModelHighAPI_Selection& theStartShape);
62
63   /// Set end shape.
64   FEATURESAPI_EXPORT
65   void setEndShape(const ModelHighAPI_Selection& theEndShape);
66
67   /// Set reverse direction flag.
68   FEATURESAPI_EXPORT
69   void setReverseDirection(const bool theReverseDirection);
70
71   /// Set centering flag.
72   FEATURESAPI_EXPORT
73   void setCentering(const bool theCentering);
74
75   /// Dump wrapped feature
76   FEATURESAPI_EXPORT
77   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
78 };
79
80 /// Pointer on Placement object.
81 typedef std::shared_ptr<FeaturesAPI_Placement> PlacementPtr;
82
83 /// \ingroup CPPHighAPI
84 /// \brief Create Placement feature.
85 FEATURESAPI_EXPORT
86 PlacementPtr addPlacement(const std::shared_ptr<ModelAPI_Document>& thePart,
87                           const std::list<ModelHighAPI_Selection>& theObjects,
88                           const ModelHighAPI_Selection& theStartShape,
89                           const ModelHighAPI_Selection& theEndShape,
90                           const bool theReverseDirection = false,
91                           const bool theCentering = false);
92
93 #endif // FeaturesAPI_Placement_H_