1 // Copyright (C) 2009-2012 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "hexa_base.hxx"
21 #include "HexVertex_impl.hxx"
22 #include "HexEdge_impl.hxx"
23 #include "HexQuad_impl.hxx"
24 #include "HexHexa_impl.hxx"
25 #include "HexCylinder_impl.hxx"
26 #include "HexBiCylinder_impl.hxx"
27 #include "HEXABLOCK.hxx"
30 BiCylinder_impl::BiCylinder_impl( HEXA_NS::BiCylinder *ptrCpp )
32 bi_cylinder_cpp = ptrCpp;
36 HEXA_NS::BiCylinder* BiCylinder_impl::GetImpl()
38 return bi_cylinder_cpp;
42 Vertex_ptr BiCylinder_impl::getVertexIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
43 throw (SALOME::SALOME_Exception)
45 Vertex_ptr result = Vertex::_nil();
46 HEXA_NS::Vertex* v = bi_cylinder_cpp->getVertexIJK(part, x, y, z);
48 Vertex_impl* servantCorba = new Vertex_impl(v);
49 result = servantCorba->_this();
55 Edge_ptr BiCylinder_impl::getEdgeI(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
56 throw (SALOME::SALOME_Exception)
58 Edge_ptr result = Edge::_nil();
59 HEXA_NS::Edge* e = bi_cylinder_cpp->getEdgeI(part, x, y, z);
61 Edge_impl* servantCorba = new Edge_impl(e);
62 result = servantCorba->_this();
68 Edge_ptr BiCylinder_impl::getEdgeJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
69 throw (SALOME::SALOME_Exception)
71 Edge_ptr result = Edge::_nil();
72 HEXA_NS::Edge* e = bi_cylinder_cpp->getEdgeJ(part, x, y, z);
74 Edge_impl* servantCorba = new Edge_impl(e);
75 result = servantCorba->_this();
81 Edge_ptr BiCylinder_impl::getEdgeK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
82 throw (SALOME::SALOME_Exception)
84 Edge_ptr result = Edge::_nil();
85 HEXA_NS::Edge* e = bi_cylinder_cpp->getEdgeK(part, x, y, z);
87 Edge_impl* servantCorba = new Edge_impl(e);
88 result = servantCorba->_this();
93 Quad_ptr BiCylinder_impl::getQuadIJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
94 throw (SALOME::SALOME_Exception)
96 Quad_ptr result = Quad::_nil();
97 HEXA_NS::Quad* q = bi_cylinder_cpp->getQuadIJ(part, x, y, z);
99 Quad_impl* servantCorba = new Quad_impl(q);
100 result = servantCorba->_this();
106 Quad_ptr BiCylinder_impl::getQuadIK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
107 throw (SALOME::SALOME_Exception)
109 Quad_ptr result = Quad::_nil();
110 HEXA_NS::Quad* q = bi_cylinder_cpp->getQuadIK(part, x, y, z);
112 Quad_impl* servantCorba = new Quad_impl(q);
113 result = servantCorba->_this();
119 Quad_ptr BiCylinder_impl::getQuadJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
120 throw (SALOME::SALOME_Exception)
122 Quad_ptr result = Quad::_nil();
123 HEXA_NS::Quad* q = bi_cylinder_cpp->getQuadJK(part, x, y, z);
125 Quad_impl* servantCorba = new Quad_impl(q);
126 result = servantCorba->_this();
132 Hexa_ptr BiCylinder_impl::getHexaIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
134 Hexa_ptr result = Hexa::_nil();
135 HEXA_NS::Hexa* h = bi_cylinder_cpp->getHexaIJK(part, x, y, z);
137 Hexa_impl* servantCorba = new Hexa_impl(h);
138 result = servantCorba->_this();
142 ::CORBA::Long BiCylinder_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception)
144 ::CORBA::Long ret = bi_cylinder_cpp->saveVtk( fname );
148 void BiCylinder_impl::dump() throw (SALOME::SALOME_Exception)
150 bi_cylinder_cpp->dump();
154 void BiCylinder_impl::printName() throw (SALOME::SALOME_Exception)
156 bi_cylinder_cpp->printName();
159 char* BiCylinder_impl::getName() throw (SALOME::SALOME_Exception)
161 return CORBA::string_dup( bi_cylinder_cpp->getName() );
164 // ========================================================= setName
165 void BiCylinder_impl::setName(const char* name)
166 throw (SALOME::SALOME_Exception)
168 bi_cylinder_cpp->setName (name);