Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Extrusion.cpp
1 // File:        ConstructionPlugin_Extrusion.cpp
2 // Created:     30 May 2014
3 // Author:      Vitaly SMETANNIKOV
4
5 #include "ConstructionPlugin_Extrusion.h"
6 #include <ModelAPI_PluginManager.h>
7 #include <ModelAPI_Document.h>
8 #include <ModelAPI_Data.h>
9 #include <ModelAPI_AttributeDouble.h>
10 #include <ModelAPI_AttributeReference.h>
11 #include <ModelAPI_AttributeBoolean.h>
12
13 using namespace std;
14
15 ConstructionPlugin_Extrusion::ConstructionPlugin_Extrusion()
16 {
17 }
18
19 void ConstructionPlugin_Extrusion::initAttributes()
20 {
21   data()->addAttribute(EXTRUSION_FACE, ModelAPI_AttributeReference::type());
22   data()->addAttribute(EXTRUSION_SIZE, ModelAPI_AttributeDouble::type());
23   data()->addAttribute(EXTRUSION_REVERCE, ModelAPI_AttributeBoolean::type());
24 }
25
26 // this is for debug only
27 #include <iostream>
28 void ConstructionPlugin_Extrusion::execute() 
29 {
30   // TODO: create a real shape for the point using OCC layer
31   //cout<<"X="<<data()->real(POINT_ATTR_X)->value()<<" Y="<<data()->real(POINT_ATTR_Y)->value()
32   //    <<" Z="<<data()->real(POINT_ATTR_Z)->value()<<endl;
33 }