1 // Copyright (C) 2009-2013 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 "HexCrossElements_impl.hxx"
27 #include "HEXABLOCK.hxx"
30 CrossElements_impl::CrossElements_impl( HEXA_NS::CrossElements *ptrCpp ):_crossElements_cpp(ptrCpp)
35 HEXA_NS::CrossElements* CrossElements_impl::GetImpl()
37 return _crossElements_cpp;
41 Vertex_ptr CrossElements_impl::getVertexIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
42 throw (SALOME::SALOME_Exception)
44 Vertex_ptr result = Vertex::_nil();
45 HEXA_NS::Vertex* v = _crossElements_cpp->getVertexIJK(part, x, y, z);
47 Vertex_impl* servantCorba = new Vertex_impl(v);
48 result = servantCorba->_this();
54 Edge_ptr CrossElements_impl::getEdgeI(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
55 throw (SALOME::SALOME_Exception)
57 Edge_ptr result = Edge::_nil();
58 HEXA_NS::Edge* e = _crossElements_cpp->getEdgeI(part, x, y, z);
60 Edge_impl* servantCorba = new Edge_impl(e);
61 result = servantCorba->_this();
67 Edge_ptr CrossElements_impl::getEdgeJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
68 throw (SALOME::SALOME_Exception)
70 Edge_ptr result = Edge::_nil();
71 HEXA_NS::Edge* e = _crossElements_cpp->getEdgeJ(part, x, y, z);
73 Edge_impl* servantCorba = new Edge_impl(e);
74 result = servantCorba->_this();
80 Edge_ptr CrossElements_impl::getEdgeK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
81 throw (SALOME::SALOME_Exception)
83 Edge_ptr result = Edge::_nil();
84 HEXA_NS::Edge* e = _crossElements_cpp->getEdgeK(part, x, y, z);
86 Edge_impl* servantCorba = new Edge_impl(e);
87 result = servantCorba->_this();
92 Quad_ptr CrossElements_impl::getQuadIJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
93 throw (SALOME::SALOME_Exception)
95 Quad_ptr result = Quad::_nil();
96 HEXA_NS::Quad* q = _crossElements_cpp->getQuadIJ(part, x, y, z);
98 Quad_impl* servantCorba = new Quad_impl(q);
99 result = servantCorba->_this();
105 Quad_ptr CrossElements_impl::getQuadIK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
106 throw (SALOME::SALOME_Exception)
108 Quad_ptr result = Quad::_nil();
109 HEXA_NS::Quad* q = _crossElements_cpp->getQuadIK(part, x, y, z);
111 Quad_impl* servantCorba = new Quad_impl(q);
112 result = servantCorba->_this();
118 Quad_ptr CrossElements_impl::getQuadJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
119 throw (SALOME::SALOME_Exception)
121 Quad_ptr result = Quad::_nil();
122 HEXA_NS::Quad* q = _crossElements_cpp->getQuadJK(part, x, y, z);
124 Quad_impl* servantCorba = new Quad_impl(q);
125 result = servantCorba->_this();
131 Hexa_ptr CrossElements_impl::getHexaIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
133 Hexa_ptr result = Hexa::_nil();
134 HEXA_NS::Hexa* h = _crossElements_cpp->getHexaIJK(part, x, y, z);
136 Hexa_impl* servantCorba = new Hexa_impl(h);
137 result = servantCorba->_this();
142 ::CORBA::Long CrossElements_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception)
144 ::CORBA::Long ret = _crossElements_cpp->saveVtk( fname );
148 void CrossElements_impl::dump() throw (SALOME::SALOME_Exception)
150 _crossElements_cpp->dump();
154 void CrossElements_impl::printName() throw (SALOME::SALOME_Exception)
156 _crossElements_cpp->printName();
159 char* CrossElements_impl::getName() throw (SALOME::SALOME_Exception)
161 return CORBA::string_dup( _crossElements_cpp->getName() );
164 // ========================================================= setName
165 void CrossElements_impl::setName(const char* name)
166 throw (SALOME::SALOME_Exception)
168 _crossElements_cpp->setName (name);
171 // ::CORBA::Long CrossElements_impl::countVertex() throw (SALOME::SALOME_Exception)
173 // ::CORBA::Long n = _crossElements_cpp->countVertex();
177 // ::CORBA::Long CrossElements_impl::countEdge() throw (SALOME::SALOME_Exception)
179 // ::CORBA::Long n = _crossElements_cpp->countEdge();
183 // ::CORBA::Long CrossElements_impl::countQuad() throw (SALOME::SALOME_Exception)
185 // ::CORBA::Long n = _crossElements_cpp->countQuad();
189 // ::CORBA::Long CrossElements_impl::countHexa() throw (SALOME::SALOME_Exception)
191 // ::CORBA::Long n = _crossElements_cpp->countHexa();
197 // Vertex_ptr CrossElements_impl::getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception)
199 // HEXA_NS::Vertex* v = _crossElements_cpp->getVertex(n);
200 // Vertex_impl* servantCorba = new Vertex_impl(v);
201 // return servantCorba->_this();
204 // Edge_ptr CrossElements_impl::getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception)
206 // HEXA_NS::Edge* e = _crossElements_cpp->getEdge(n);
207 // Edge_impl* servantCorba = new Edge_impl(e);
208 // return servantCorba->_this();
211 // Quad_ptr CrossElements_impl::getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception)
213 // HEXA_NS::Quad* q = _crossElements_cpp->getQuad(n);
214 // Quad_impl* servantCorba = new Quad_impl(q);
215 // return servantCorba->_this();
218 // Hexa_ptr CrossElements_impl::getHexa(::CORBA::Long n) throw (SALOME::SALOME_Exception)
220 // HEXA_NS::Hexa* h = _crossElements_cpp->getHexa(n);
221 // Hexa_impl* servantCorba = new Hexa_impl(h);
222 // return servantCorba->_this();
227 // ::CORBA::Long CrossElements_impl::saveVtk( const char* fname ) throw (SALOME::SALOME_Exception)
229 // ::CORBA::Long ret = _crossElements_cpp->saveVtk( fname );
235 // Vertex_ptr CrossElements_impl::getVertexIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
236 // throw (SALOME::SALOME_Exception)
238 // Vertex_ptr result = Vertex::_nil();
239 // // HEXA_NS::Vertex* v = _crossElements_cpp->getVertexIJK(x, y,z);
240 // HEXA_NS::Vertex* v = NULL;
241 // _crossElements_cpp->toto();
243 // Vertex_impl* servantCorba = new Vertex_impl(v);
244 // result = servantCorba->_this();
250 // Edge_ptr CrossElements_impl::getEdgeI(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
251 // throw (SALOME::SALOME_Exception)
253 // Edge_ptr result = Edge::_nil();
254 // HEXA_NS::Edge* e = _crossElements_cpp->getEdgeI(x, y, z);
256 // Edge_impl* servantCorba = new Edge_impl(e);
257 // result = servantCorba->_this();
263 // Edge_ptr CrossElements_impl::getEdgeJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
264 // throw (SALOME::SALOME_Exception)
266 // Edge_ptr result = Edge::_nil();
267 // HEXA_NS::Edge* e = _crossElements_cpp->getEdgeJ(x, y, z);
269 // Edge_impl* servantCorba = new Edge_impl(e);
270 // result = servantCorba->_this();
276 // Edge_ptr CrossElements_impl::getEdgeK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
277 // throw (SALOME::SALOME_Exception)
279 // Edge_ptr result = Edge::_nil();
280 // HEXA_NS::Edge* e = _crossElements_cpp->getEdgeK(x, y, z);
282 // Edge_impl* servantCorba = new Edge_impl(e);
283 // result = servantCorba->_this();
288 // Quad_ptr CrossElements_impl::getQuadIJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
289 // throw (SALOME::SALOME_Exception)
291 // Quad_ptr result = Quad::_nil();
292 // HEXA_NS::Quad* q = _crossElements_cpp->getQuadIJ(x, y, z);
294 // Quad_impl* servantCorba = new Quad_impl(q);
295 // result = servantCorba->_this();
301 // Quad_ptr CrossElements_impl::getQuadIK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
302 // throw (SALOME::SALOME_Exception)
304 // Quad_ptr result = Quad::_nil();
305 // HEXA_NS::Quad* q = _crossElements_cpp->getQuadIK(x, y, z);
307 // Quad_impl* servantCorba = new Quad_impl(q);
308 // result = servantCorba->_this();
314 // Quad_ptr CrossElements_impl::getQuadJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
315 // throw (SALOME::SALOME_Exception)
317 // Quad_ptr result = Quad::_nil();
318 // HEXA_NS::Quad* q = _crossElements_cpp->getQuadJK(x, y, z);
320 // Quad_impl* servantCorba = new Quad_impl(q);
321 // result = servantCorba->_this();
327 // Hexa_ptr CrossElements_impl::getHexaIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
329 // Hexa_ptr result = Hexa::_nil();
330 // HEXA_NS::Hexa* h = _crossElements_cpp->getHexaIJK(x, y, z);
332 // Hexa_impl* servantCorba = new Hexa_impl(h);
333 // result = servantCorba->_this();