Salome HOME
Transfer of tests (Primitives, Transfotmation and GDML).
[modules/shaper.git] / src / FeaturesAPI / FeaturesAPI_Symmetry.h
1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D -->
2
3 // File:        FeaturesAPI_Symmetry.h
4 // Created:     07 Dec 2016
5 // Author:      Clarisse Genrault (CEA)
6
7 #ifndef FEATURESAPI_SYMMETRY_H_
8 #define FEATURESAPI_SYMMETRY_H_
9
10 #include "FeaturesAPI.h"
11
12 #include <FeaturesPlugin_Symmetry.h>
13
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
16
17 class ModelHighAPI_Double;
18 class ModelHighAPI_Dumper;
19 class ModelHighAPI_Selection;
20
21 /// \class FeaturesAPI_Symmetry
22 /// \ingroup CPPHighAPI
23 /// \brief Interface for Symmetry feature.
24 class FeaturesAPI_Symmetry: public ModelHighAPI_Interface
25 {
26 public:
27   /// Constructor without values.
28   FEATURESAPI_EXPORT
29   explicit FeaturesAPI_Symmetry(const std::shared_ptr<ModelAPI_Feature>& theFeature);
30
31   /// Constructor with values.
32   FEATURESAPI_EXPORT
33   explicit FeaturesAPI_Symmetry(const std::shared_ptr<ModelAPI_Feature>& theFeature,
34                                    const std::list<ModelHighAPI_Selection>& theMainObjects,
35                                    const ModelHighAPI_Selection& theObject);
36
37   /// Destructor.
38   FEATURESAPI_EXPORT
39   virtual ~FeaturesAPI_Symmetry();
40
41   INTERFACE_5(FeaturesPlugin_Symmetry::ID(),
42               creationMethod, FeaturesPlugin_Symmetry::CREATION_METHOD(),
43               ModelAPI_AttributeString, /** Creation method */,
44               mainObjects, FeaturesPlugin_Symmetry::OBJECTS_LIST_ID(),
45               ModelAPI_AttributeSelectionList, /** Main objects */,
46               pointObject, FeaturesPlugin_Symmetry::POINT_OBJECT_ID(),
47               ModelAPI_AttributeSelection, /** Point object */,
48               axisObject, FeaturesPlugin_Symmetry::AXIS_OBJECT_ID(),
49               ModelAPI_AttributeSelection, /** Axis object */,
50               planeObject, FeaturesPlugin_Symmetry::PLANE_OBJECT_ID(),
51               ModelAPI_AttributeSelection, /** Plane object */)
52
53   /// Set main objects.
54   FEATURESAPI_EXPORT
55   void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
56
57   /// Modify CreationMethod, point_object attribute of the feature.
58   FEATURESAPI_EXPORT
59   void setPoint(const ModelHighAPI_Selection& thePointObject);
60
61   /// Modify CreationMethod, axis_object attribute of the feature.
62   FEATURESAPI_EXPORT
63   void setAxis(const ModelHighAPI_Selection& theAxisObject);
64
65   /// Modify CreationMethod, plane_object attribute of the feature.
66   FEATURESAPI_EXPORT
67   void setPlane(const ModelHighAPI_Selection& thePlaneObject);
68
69   /// Dump wrapped feature
70   FEATURESAPI_EXPORT
71   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
72 };
73
74 /// Pointer on Symmetry object.
75 typedef std::shared_ptr<FeaturesAPI_Symmetry> SymmetryPtr;
76
77 /// \ingroup CPPHighAPI
78 /// \brief Create Symmetry feature.
79 FEATURESAPI_EXPORT
80 SymmetryPtr addSymmetry(const std::shared_ptr<ModelAPI_Document>& thePart,
81                     const std::list<ModelHighAPI_Selection>& theMainObjects,
82                     const ModelHighAPI_Selection& theObject);
83
84 #endif // FEATURESAPI_SYMMETRY_H_