1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name : SketchAPI_Projection.h
6 // 16/06/16 - Sergey POKHODENKO - Creation of the file
8 #ifndef SRC_SKETCHAPI_SKETCHAPI_PROJECTION_H_
9 #define SRC_SKETCHAPI_SKETCHAPI_PROJECTION_H_
11 //--------------------------------------------------------------------------------------
12 #include "SketchAPI.h"
14 #include <SketchPlugin_Projection.h>
16 #include "SketchAPI_SketchEntity.h"
17 //--------------------------------------------------------------------------------------
18 class ModelHighAPI_Selection;
19 //--------------------------------------------------------------------------------------
20 /**\class SketchAPI_Projection
22 * \brief Interface for Projection feature
24 class SketchAPI_Projection : public SketchAPI_SketchEntity
27 /// Constructor without values
29 explicit SketchAPI_Projection(const std::shared_ptr<ModelAPI_Feature> & theFeature);
30 /// Constructor with values
32 SketchAPI_Projection(const std::shared_ptr<ModelAPI_Feature> & theFeature,
33 const ModelHighAPI_Selection & theExternalFeature);
34 /// Constructor with values
36 SketchAPI_Projection(const std::shared_ptr<ModelAPI_Feature> & theFeature,
37 const std::string & theExternalName);
40 virtual ~SketchAPI_Projection();
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 */
51 /// Set external feature
53 void setExternalFeature(const ModelHighAPI_Selection & theExternalLine);
55 /// Set by external name
57 void setByExternalName(const std::string & theExternalName);
59 /// Returns created feature
61 std::shared_ptr<ModelHighAPI_Interface> createdFeature() const;
63 /// Dump wrapped feature
65 virtual void dump(ModelHighAPI_Dumper& theDumper) const;
68 //! Pointer on Projection object
69 typedef std::shared_ptr<SketchAPI_Projection> ProjectionPtr;
71 //--------------------------------------------------------------------------------------
72 //--------------------------------------------------------------------------------------
73 #endif /* SRC_SKETCHAPI_SKETCHAPI_PROJECTION_H_ */