Salome HOME
Add Rotation
[modules/shaper.git] / src / SketchAPI / SketchAPI_Rotation.cpp
1 // Name   : SketchAPI_Rotation.cpp
2 // Purpose: 
3 //
4 // History:
5 // 16/06/16 - Sergey POKHODENKO - Creation of the file
6
7 //--------------------------------------------------------------------------------------
8 #include "SketchAPI_Rotation.h"
9 //--------------------------------------------------------------------------------------
10 #include <ModelHighAPI_Tools.h>
11 //--------------------------------------------------------------------------------------
12 SketchAPI_Rotation::SketchAPI_Rotation(
13     const std::shared_ptr<ModelAPI_Feature> & theFeature)
14 : SketchAPI_SketchEntity(theFeature)
15 {
16   initialize();
17 }
18
19 SketchAPI_Rotation::SketchAPI_Rotation(
20     const std::shared_ptr<ModelAPI_Feature> & theFeature,
21     const std::list<std::shared_ptr<ModelAPI_Object> > & theObjects,
22     const ModelHighAPI_RefAttr & theCenter,
23     const ModelHighAPI_Double & theAngle,
24     const ModelHighAPI_Integer & theNumberOfObjects,
25     bool theFullValue)
26 : SketchAPI_SketchEntity(theFeature)
27 {
28   if (initialize()) {
29     fillAttribute(theObjects, rotationList());
30     fillAttribute(theCenter, center());
31     fillAttribute(theAngle, angle());
32     fillAttribute(theNumberOfObjects, numberOfObjects());
33     if (theFullValue)
34       fillAttribute("SingleAngle", valueType());
35
36     execute();
37   }
38 }
39
40 SketchAPI_Rotation::~SketchAPI_Rotation()
41 {
42
43 }
44
45 //--------------------------------------------------------------------------------------