1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D -->
3 // File: FeaturesAPI_Symmetry.h
4 // Created: 07 Dec 2016
5 // Author: Clarisse Genrault (CEA)
7 #ifndef FEATURESAPI_SYMMETRY_H_
8 #define FEATURESAPI_SYMMETRY_H_
10 #include "FeaturesAPI.h"
12 #include <FeaturesPlugin_Symmetry.h>
14 #include <ModelHighAPI_Interface.h>
15 #include <ModelHighAPI_Macro.h>
17 class ModelHighAPI_Double;
18 class ModelHighAPI_Dumper;
19 class ModelHighAPI_Selection;
21 /// \class FeaturesAPI_Symmetry
22 /// \ingroup CPPHighAPI
23 /// \brief Interface for Symmetry feature.
24 class FeaturesAPI_Symmetry: public ModelHighAPI_Interface
27 /// Constructor without values.
29 explicit FeaturesAPI_Symmetry(const std::shared_ptr<ModelAPI_Feature>& theFeature);
31 /// Constructor with values.
33 explicit FeaturesAPI_Symmetry(const std::shared_ptr<ModelAPI_Feature>& theFeature,
34 const std::list<ModelHighAPI_Selection>& theMainObjects,
35 const ModelHighAPI_Selection& theObject);
39 virtual ~FeaturesAPI_Symmetry();
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 */)
55 void setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects);
57 /// Modify CreationMethod, point_object attribute of the feature.
59 void setPoint(const ModelHighAPI_Selection& thePointObject);
61 /// Modify CreationMethod, axis_object attribute of the feature.
63 void setAxis(const ModelHighAPI_Selection& theAxisObject);
65 /// Modify CreationMethod, plane_object attribute of the feature.
67 void setPlane(const ModelHighAPI_Selection& thePlaneObject);
69 /// Dump wrapped feature
71 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
74 /// Pointer on Symmetry object.
75 typedef std::shared_ptr<FeaturesAPI_Symmetry> SymmetryPtr;
77 /// \ingroup CPPHighAPI
78 /// \brief Create Symmetry feature.
80 SymmetryPtr addSymmetry(const std::shared_ptr<ModelAPI_Document>& thePart,
81 const std::list<ModelHighAPI_Selection>& theMainObjects,
82 const ModelHighAPI_Selection& theObject);
84 #endif // FEATURESAPI_SYMMETRY_H_