]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchAPI/SketchAPI_Projection.h
Salome HOME
Porting to SALOME_8.2.0 : Debug visualization selection for AIS_Trihedron axes.
[modules/shaper.git] / src / SketchAPI / SketchAPI_Projection.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name   : SketchAPI_Projection.h
3 // Purpose:
4 //
5 // History:
6 // 16/06/16 - Sergey POKHODENKO - Creation of the file
7
8 #ifndef SRC_SKETCHAPI_SKETCHAPI_PROJECTION_H_
9 #define SRC_SKETCHAPI_SKETCHAPI_PROJECTION_H_
10
11 //--------------------------------------------------------------------------------------
12 #include "SketchAPI.h"
13
14 #include <SketchPlugin_Projection.h>
15
16 #include "SketchAPI_SketchEntity.h"
17 //--------------------------------------------------------------------------------------
18 class ModelHighAPI_Selection;
19 //--------------------------------------------------------------------------------------
20 /**\class SketchAPI_Projection
21  * \ingroup CPPHighAPI
22  * \brief Interface for Projection feature
23  */
24 class SketchAPI_Projection : public SketchAPI_SketchEntity
25 {
26 public:
27   /// Constructor without values
28   SKETCHAPI_EXPORT
29   explicit SketchAPI_Projection(const std::shared_ptr<ModelAPI_Feature> & theFeature);
30   /// Constructor with values
31   SKETCHAPI_EXPORT
32   SketchAPI_Projection(const std::shared_ptr<ModelAPI_Feature> & theFeature,
33                        const ModelHighAPI_Selection & theExternalFeature);
34   /// Constructor with values
35   SKETCHAPI_EXPORT
36   SketchAPI_Projection(const std::shared_ptr<ModelAPI_Feature> & theFeature,
37                        const std::string & theExternalName);
38   /// Destructor
39   SKETCHAPI_EXPORT
40   virtual ~SketchAPI_Projection();
41
42   INTERFACE_3(SketchPlugin_Projection::ID(),
43               externalFeature, SketchPlugin_Projection::EXTERNAL_FEATURE_ID(),
44               ModelAPI_AttributeSelection, /** External feature */,
45               projectedFeature, SketchPlugin_Projection::PROJECTED_FEATURE_ID(),
46               ModelAPI_AttributeRefAttr, /** Projected feature */,
47               external, SketchPlugin_Projection::EXTERNAL_ID(),
48               ModelAPI_AttributeSelection, /** External */
49   )
50
51   /// Set external feature
52   SKETCHAPI_EXPORT
53   void setExternalFeature(const ModelHighAPI_Selection & theExternalLine);
54
55   /// Set by external name
56   SKETCHAPI_EXPORT
57   void setByExternalName(const std::string & theExternalName);
58
59   /// Returns created feature
60   SKETCHAPI_EXPORT
61   std::shared_ptr<ModelHighAPI_Interface> createdFeature() const;
62
63   /// Dump wrapped feature
64   SKETCHAPI_EXPORT
65   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
66 };
67
68 //! Pointer on Projection object
69 typedef std::shared_ptr<SketchAPI_Projection> ProjectionPtr;
70
71 //--------------------------------------------------------------------------------------
72 //--------------------------------------------------------------------------------------
73 #endif /* SRC_SKETCHAPI_SKETCHAPI_PROJECTION_H_ */