Salome HOME
First publish of HEXABLOCKcomponant
[modules/hexablock.git] / src / HEXABLOCK_I / HexCylinder_impl.cxx
1 using namespace std;
2 #include "HEXABLOCK.hxx"
3 #include "utilities.h"
4
5 #include <string>
6
7 #include "hexa_base.hxx"
8 #include "HexCylinder_impl.hxx"
9 #include "HexVertex_impl.hxx"
10 #include "HexVector_impl.hxx"
11
12 Cylinder_impl::Cylinder_impl( HEXA_NS::Cylinder *ptrCpp ):_cylinder_cpp(ptrCpp)
13 {
14 }
15
16 HEXA_NS::Cylinder* Cylinder_impl::GetImpl()
17   throw (SALOME::SALOME_Exception)
18 {
19   return _cylinder_cpp;
20 }
21
22
23 Vertex_ptr Cylinder_impl::getBase()
24   throw (SALOME::SALOME_Exception)
25 {
26   Vertex_ptr result = Vertex::_nil();
27
28   HEXA_NS::Vertex* v = _cylinder_cpp->getBase();
29   if ( v!= NULL ){
30     Vertex_impl* servantCorba = new Vertex_impl(v);
31     result = servantCorba->_this();
32   }
33
34   return result;
35 }
36
37 Vector_ptr Cylinder_impl::getDirection()
38   throw (SALOME::SALOME_Exception)
39 {
40   Vector_ptr result = Vector::_nil();
41
42   HEXA_NS::Vector* v = _cylinder_cpp->getDirection();
43   if ( v!= NULL ){
44     Vector_impl* servantCorba = new Vector_impl(v);
45     result = servantCorba->_this();
46   }
47   return result;
48 }
49
50
51 ::CORBA::Double Cylinder_impl::getRadius()
52   throw (SALOME::SALOME_Exception)
53 {
54  ::CORBA::Double d = _cylinder_cpp->getRadius();
55   return d;
56 }
57
58
59 ::CORBA::Double Cylinder_impl::getHeight()
60   throw (SALOME::SALOME_Exception)
61 {
62  ::CORBA::Double d = _cylinder_cpp->getHeight();
63   return d;
64 }
65
66
67 void Cylinder_impl::dump() throw (SALOME::SALOME_Exception)
68 {
69   _cylinder_cpp->dump();
70 }
71
72
73 void Cylinder_impl::printName() throw (SALOME::SALOME_Exception)
74 {
75   _cylinder_cpp->printName();
76 }
77
78 // ::CORBA::Long Cylinder_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception)
79 // {
80 //   ::CORBA::Long ret = _cylinder_cpp->saveVtk( fname );
81 //   return ret;
82 // }
83
84