2 #include "hexa_base.hxx"
3 #include "HexVertex_impl.hxx"
4 #include "HexEdge_impl.hxx"
5 #include "HexQuad_impl.hxx"
6 #include "HexHexa_impl.hxx"
7 #include "HexCylinder_impl.hxx"
8 #include "HexCrossElements_impl.hxx"
9 #include "HEXABLOCK.hxx"
12 CrossElements_impl::CrossElements_impl( HEXA_NS::CrossElements *ptrCpp ):_crossElements_cpp(ptrCpp)
17 HEXA_NS::CrossElements* CrossElements_impl::GetImpl()
19 return _crossElements_cpp;
23 Vertex_ptr CrossElements_impl::getVertexIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
24 throw (SALOME::SALOME_Exception)
26 Vertex_ptr result = Vertex::_nil();
27 HEXA_NS::Vertex* v = _crossElements_cpp->getVertexIJK(part, x, y, z);
29 Vertex_impl* servantCorba = new Vertex_impl(v);
30 result = servantCorba->_this();
36 Edge_ptr CrossElements_impl::getEdgeI(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
37 throw (SALOME::SALOME_Exception)
39 Edge_ptr result = Edge::_nil();
40 HEXA_NS::Edge* e = _crossElements_cpp->getEdgeI(part, x, y, z);
42 Edge_impl* servantCorba = new Edge_impl(e);
43 result = servantCorba->_this();
49 Edge_ptr CrossElements_impl::getEdgeJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
50 throw (SALOME::SALOME_Exception)
52 Edge_ptr result = Edge::_nil();
53 HEXA_NS::Edge* e = _crossElements_cpp->getEdgeJ(part, x, y, z);
55 Edge_impl* servantCorba = new Edge_impl(e);
56 result = servantCorba->_this();
62 Edge_ptr CrossElements_impl::getEdgeK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
63 throw (SALOME::SALOME_Exception)
65 Edge_ptr result = Edge::_nil();
66 HEXA_NS::Edge* e = _crossElements_cpp->getEdgeK(part, x, y, z);
68 Edge_impl* servantCorba = new Edge_impl(e);
69 result = servantCorba->_this();
74 Quad_ptr CrossElements_impl::getQuadIJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
75 throw (SALOME::SALOME_Exception)
77 Quad_ptr result = Quad::_nil();
78 HEXA_NS::Quad* q = _crossElements_cpp->getQuadIJ(part, x, y, z);
80 Quad_impl* servantCorba = new Quad_impl(q);
81 result = servantCorba->_this();
87 Quad_ptr CrossElements_impl::getQuadIK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
88 throw (SALOME::SALOME_Exception)
90 Quad_ptr result = Quad::_nil();
91 HEXA_NS::Quad* q = _crossElements_cpp->getQuadIK(part, x, y, z);
93 Quad_impl* servantCorba = new Quad_impl(q);
94 result = servantCorba->_this();
100 Quad_ptr CrossElements_impl::getQuadJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
101 throw (SALOME::SALOME_Exception)
103 Quad_ptr result = Quad::_nil();
104 HEXA_NS::Quad* q = _crossElements_cpp->getQuadJK(part, x, y, z);
106 Quad_impl* servantCorba = new Quad_impl(q);
107 result = servantCorba->_this();
113 Hexa_ptr CrossElements_impl::getHexaIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
115 Hexa_ptr result = Hexa::_nil();
116 HEXA_NS::Hexa* h = _crossElements_cpp->getHexaIJK(part, x, y, z);
118 Hexa_impl* servantCorba = new Hexa_impl(h);
119 result = servantCorba->_this();
124 ::CORBA::Long CrossElements_impl::crossCylinders(Cylinder_ptr c1In, Cylinder_ptr c2In)
125 throw (SALOME::SALOME_Exception)
127 ::CORBA::Long result;
128 Cylinder_impl* c1InServant = ::DownCast<Cylinder_impl*>( c1In );
129 Cylinder_impl* c2InServant = ::DownCast<Cylinder_impl*>( c2In );
131 ASSERT( c1InServant );
132 ASSERT( c2InServant );
134 if ( c1InServant && c2InServant ) {
135 HEXA_NS::Cylinder* c1 = c1InServant->GetImpl();
136 HEXA_NS::Cylinder* c2 = c2InServant->GetImpl();
138 result = _crossElements_cpp->crossCylinders(c1,c2);
146 ::CORBA::Long CrossElements_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception)
148 ::CORBA::Long ret = _crossElements_cpp->saveVtk( fname );
154 void CrossElements_impl::dump() throw (SALOME::SALOME_Exception)
156 _crossElements_cpp->dump();
160 void CrossElements_impl::printName() throw (SALOME::SALOME_Exception)
162 _crossElements_cpp->printName();
169 // ::CORBA::Long CrossElements_impl::countVertex() throw (SALOME::SALOME_Exception)
171 // ::CORBA::Long n = _crossElements_cpp->countVertex();
175 // ::CORBA::Long CrossElements_impl::countEdge() throw (SALOME::SALOME_Exception)
177 // ::CORBA::Long n = _crossElements_cpp->countEdge();
181 // ::CORBA::Long CrossElements_impl::countQuad() throw (SALOME::SALOME_Exception)
183 // ::CORBA::Long n = _crossElements_cpp->countQuad();
187 // ::CORBA::Long CrossElements_impl::countHexa() throw (SALOME::SALOME_Exception)
189 // ::CORBA::Long n = _crossElements_cpp->countHexa();
195 // Vertex_ptr CrossElements_impl::getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception)
197 // HEXA_NS::Vertex* v = _crossElements_cpp->getVertex(n);
198 // Vertex_impl* servantCorba = new Vertex_impl(v);
199 // return servantCorba->_this();
202 // Edge_ptr CrossElements_impl::getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception)
204 // HEXA_NS::Edge* e = _crossElements_cpp->getEdge(n);
205 // Edge_impl* servantCorba = new Edge_impl(e);
206 // return servantCorba->_this();
209 // Quad_ptr CrossElements_impl::getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception)
211 // HEXA_NS::Quad* q = _crossElements_cpp->getQuad(n);
212 // Quad_impl* servantCorba = new Quad_impl(q);
213 // return servantCorba->_this();
216 // Hexa_ptr CrossElements_impl::getHexa(::CORBA::Long n) throw (SALOME::SALOME_Exception)
218 // HEXA_NS::Hexa* h = _crossElements_cpp->getHexa(n);
219 // Hexa_impl* servantCorba = new Hexa_impl(h);
220 // return servantCorba->_this();
225 // ::CORBA::Long CrossElements_impl::saveVtk( const char* fname ) throw (SALOME::SALOME_Exception)
227 // ::CORBA::Long ret = _crossElements_cpp->saveVtk( fname );
233 // Vertex_ptr CrossElements_impl::getVertexIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
234 // throw (SALOME::SALOME_Exception)
236 // Vertex_ptr result = Vertex::_nil();
237 // // HEXA_NS::Vertex* v = _crossElements_cpp->getVertexIJK(x, y,z);
238 // HEXA_NS::Vertex* v = NULL;
239 // _crossElements_cpp->toto();
241 // Vertex_impl* servantCorba = new Vertex_impl(v);
242 // result = servantCorba->_this();
248 // Edge_ptr CrossElements_impl::getEdgeI(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
249 // throw (SALOME::SALOME_Exception)
251 // Edge_ptr result = Edge::_nil();
252 // HEXA_NS::Edge* e = _crossElements_cpp->getEdgeI(x, y, z);
254 // Edge_impl* servantCorba = new Edge_impl(e);
255 // result = servantCorba->_this();
261 // Edge_ptr CrossElements_impl::getEdgeJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
262 // throw (SALOME::SALOME_Exception)
264 // Edge_ptr result = Edge::_nil();
265 // HEXA_NS::Edge* e = _crossElements_cpp->getEdgeJ(x, y, z);
267 // Edge_impl* servantCorba = new Edge_impl(e);
268 // result = servantCorba->_this();
274 // Edge_ptr CrossElements_impl::getEdgeK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
275 // throw (SALOME::SALOME_Exception)
277 // Edge_ptr result = Edge::_nil();
278 // HEXA_NS::Edge* e = _crossElements_cpp->getEdgeK(x, y, z);
280 // Edge_impl* servantCorba = new Edge_impl(e);
281 // result = servantCorba->_this();
286 // Quad_ptr CrossElements_impl::getQuadIJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
287 // throw (SALOME::SALOME_Exception)
289 // Quad_ptr result = Quad::_nil();
290 // HEXA_NS::Quad* q = _crossElements_cpp->getQuadIJ(x, y, z);
292 // Quad_impl* servantCorba = new Quad_impl(q);
293 // result = servantCorba->_this();
299 // Quad_ptr CrossElements_impl::getQuadIK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
300 // throw (SALOME::SALOME_Exception)
302 // Quad_ptr result = Quad::_nil();
303 // HEXA_NS::Quad* q = _crossElements_cpp->getQuadIK(x, y, z);
305 // Quad_impl* servantCorba = new Quad_impl(q);
306 // result = servantCorba->_this();
312 // Quad_ptr CrossElements_impl::getQuadJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
313 // throw (SALOME::SALOME_Exception)
315 // Quad_ptr result = Quad::_nil();
316 // HEXA_NS::Quad* q = _crossElements_cpp->getQuadJK(x, y, z);
318 // Quad_impl* servantCorba = new Quad_impl(q);
319 // result = servantCorba->_this();
325 // Hexa_ptr CrossElements_impl::getHexaIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
327 // Hexa_ptr result = Hexa::_nil();
328 // HEXA_NS::Hexa* h = _crossElements_cpp->getHexaIJK(x, y, z);
330 // Hexa_impl* servantCorba = new Hexa_impl(h);
331 // result = servantCorba->_this();