Salome HOME
Add Projection to SketchAPI_Sketch
[modules/shaper.git] / src / SketchAPI / SketchAPI_Projection.cpp
1 // Name   : SketchAPI_Projection.cpp
2 // Purpose: 
3 //
4 // History:
5 // 16/06/16 - Sergey POKHODENKO - Creation of the file
6
7 //--------------------------------------------------------------------------------------
8 #include "SketchAPI_Projection.h"
9 //--------------------------------------------------------------------------------------
10 #include <ModelHighAPI_Tools.h>
11 //--------------------------------------------------------------------------------------
12 SketchAPI_Projection::SketchAPI_Projection(
13     const std::shared_ptr<ModelAPI_Feature> & theFeature)
14 : SketchAPI_SketchEntity(theFeature)
15 {
16   initialize();
17 }
18
19 SketchAPI_Projection::SketchAPI_Projection(
20     const std::shared_ptr<ModelAPI_Feature> & theFeature,
21     const ModelHighAPI_Selection & theExternalFeature )
22 : SketchAPI_SketchEntity(theFeature)
23 {
24   if (initialize()) {
25     setExternalFeature(theExternalFeature);
26   }
27 }
28
29 SketchAPI_Projection::~SketchAPI_Projection()
30 {
31
32 }
33
34 //--------------------------------------------------------------------------------------
35 void SketchAPI_Projection::setExternalFeature(const ModelHighAPI_Selection & theExternalFeature)
36 {
37   fillAttribute(theExternalFeature, externalFeature());
38
39   execute();
40 }
41
42 //--------------------------------------------------------------------------------------