]> SALOME platform Git repositories - modules/hexablock.git/blob - src/HEXABLOCK_I/HexCrossElements_impl.cxx
Salome HOME
First publish of HEXABLOCKcomponant
[modules/hexablock.git] / src / HEXABLOCK_I / HexCrossElements_impl.cxx
1 using namespace std;
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"
10
11
12 CrossElements_impl::CrossElements_impl( HEXA_NS::CrossElements *ptrCpp ):_crossElements_cpp(ptrCpp)
13 {
14 }
15
16
17 HEXA_NS::CrossElements* CrossElements_impl::GetImpl()
18 {
19   return _crossElements_cpp;
20 }
21
22
23 Vertex_ptr CrossElements_impl::getVertexIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
24   throw (SALOME::SALOME_Exception)
25 {
26   Vertex_ptr result = Vertex::_nil();
27   HEXA_NS::Vertex* v = _crossElements_cpp->getVertexIJK(part, x, y, z);
28   if ( v != NULL ){
29     Vertex_impl* servantCorba = new Vertex_impl(v);
30     result = servantCorba->_this();
31   }
32   return result;
33 }
34
35
36 Edge_ptr CrossElements_impl::getEdgeI(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
37   throw (SALOME::SALOME_Exception)
38 {
39   Edge_ptr result = Edge::_nil();
40   HEXA_NS::Edge* e = _crossElements_cpp->getEdgeI(part, x, y, z);
41   if ( e != NULL ){
42     Edge_impl* servantCorba = new Edge_impl(e);
43     result = servantCorba->_this();
44   }
45   return result;
46 }
47
48
49 Edge_ptr CrossElements_impl::getEdgeJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
50   throw (SALOME::SALOME_Exception)
51 {
52   Edge_ptr result = Edge::_nil();
53   HEXA_NS::Edge* e = _crossElements_cpp->getEdgeJ(part, x, y, z);
54   if ( e != NULL ){
55     Edge_impl* servantCorba = new Edge_impl(e);
56     result = servantCorba->_this();
57   }
58   return result;
59 }
60
61
62 Edge_ptr CrossElements_impl::getEdgeK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
63   throw (SALOME::SALOME_Exception)
64 {
65   Edge_ptr result = Edge::_nil();
66   HEXA_NS::Edge* e = _crossElements_cpp->getEdgeK(part, x, y, z);
67   if ( e != NULL ){
68     Edge_impl* servantCorba = new Edge_impl(e);
69     result = servantCorba->_this();
70   }
71   return result;
72 }
73
74 Quad_ptr CrossElements_impl::getQuadIJ(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
75   throw (SALOME::SALOME_Exception)
76 {
77   Quad_ptr result = Quad::_nil();
78   HEXA_NS::Quad* q = _crossElements_cpp->getQuadIJ(part, x, y, z);
79   if ( q != NULL ){
80     Quad_impl* servantCorba = new Quad_impl(q);
81     result = servantCorba->_this();
82   }
83   return result;
84 }
85
86
87 Quad_ptr CrossElements_impl::getQuadIK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
88   throw (SALOME::SALOME_Exception)
89 {
90   Quad_ptr result = Quad::_nil();
91   HEXA_NS::Quad* q = _crossElements_cpp->getQuadIK(part, x, y, z);
92   if ( q != NULL ){
93     Quad_impl* servantCorba = new Quad_impl(q);
94     result = servantCorba->_this();
95   }
96   return result;
97 }
98
99
100 Quad_ptr CrossElements_impl::getQuadJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
101   throw (SALOME::SALOME_Exception)
102 {
103   Quad_ptr result = Quad::_nil();
104   HEXA_NS::Quad* q = _crossElements_cpp->getQuadJK(part, x, y, z);
105   if ( q != NULL ){
106     Quad_impl* servantCorba = new Quad_impl(q);
107     result = servantCorba->_this();
108   }
109   return result;
110 }
111
112
113 Hexa_ptr CrossElements_impl::getHexaIJK(::CORBA::Long part, ::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
114 {
115   Hexa_ptr result = Hexa::_nil();
116   HEXA_NS::Hexa* h = _crossElements_cpp->getHexaIJK(part, x, y, z);
117   if ( h != NULL ){
118     Hexa_impl* servantCorba = new Hexa_impl(h);
119     result = servantCorba->_this();
120   }
121   return result;
122 }
123
124 ::CORBA::Long CrossElements_impl::crossCylinders(Cylinder_ptr c1In, Cylinder_ptr  c2In)
125 throw (SALOME::SALOME_Exception)
126 {
127   ::CORBA::Long result;
128   Cylinder_impl* c1InServant = ::DownCast<Cylinder_impl*>( c1In );
129   Cylinder_impl* c2InServant = ::DownCast<Cylinder_impl*>( c2In );
130
131   ASSERT( c1InServant );
132   ASSERT( c2InServant );
133
134   if ( c1InServant &&  c2InServant ) {
135     HEXA_NS::Cylinder* c1 = c1InServant->GetImpl();
136     HEXA_NS::Cylinder* c2 = c2InServant->GetImpl();
137
138     result = _crossElements_cpp->crossCylinders(c1,c2);
139   }
140   return result;
141
142 }
143
144
145
146 ::CORBA::Long CrossElements_impl::saveVtk(const char* fname) throw (SALOME::SALOME_Exception)
147 {
148   ::CORBA::Long ret = _crossElements_cpp->saveVtk( fname );
149   return ret;
150 }
151
152
153
154 void CrossElements_impl::dump() throw (SALOME::SALOME_Exception)
155 {
156   _crossElements_cpp->dump();
157 }
158
159
160 void CrossElements_impl::printName() throw (SALOME::SALOME_Exception)
161 {
162   _crossElements_cpp->printName();
163 }
164
165
166
167
168
169 // ::CORBA::Long CrossElements_impl::countVertex() throw (SALOME::SALOME_Exception)
170 // {
171 //   ::CORBA::Long n = _crossElements_cpp->countVertex();
172 //   return n;
173 // }
174 // 
175 // ::CORBA::Long CrossElements_impl::countEdge() throw (SALOME::SALOME_Exception)
176 // {
177 //   ::CORBA::Long n = _crossElements_cpp->countEdge();
178 //   return n;
179 // }
180 // 
181 // ::CORBA::Long CrossElements_impl::countQuad() throw (SALOME::SALOME_Exception)
182 // {
183 //   ::CORBA::Long n = _crossElements_cpp->countQuad();
184 //   return n;
185 // }
186 // 
187 // ::CORBA::Long CrossElements_impl::countHexa() throw (SALOME::SALOME_Exception)
188 // {
189 //   ::CORBA::Long n = _crossElements_cpp->countHexa();
190 //   return n;
191 // }
192 // 
193 // 
194 // 
195 // Vertex_ptr CrossElements_impl::getVertex(::CORBA::Long n) throw (SALOME::SALOME_Exception)
196 // {
197 //   HEXA_NS::Vertex* v = _crossElements_cpp->getVertex(n);
198 //   Vertex_impl* servantCorba = new Vertex_impl(v);
199 //   return servantCorba->_this();
200 // }
201 // 
202 // Edge_ptr CrossElements_impl::getEdge(::CORBA::Long n) throw (SALOME::SALOME_Exception)
203 // {
204 //   HEXA_NS::Edge* e = _crossElements_cpp->getEdge(n);
205 //   Edge_impl* servantCorba = new Edge_impl(e);
206 //   return servantCorba->_this();
207 // }
208 // 
209 // Quad_ptr CrossElements_impl::getQuad(::CORBA::Long n) throw (SALOME::SALOME_Exception)
210 // {
211 //   HEXA_NS::Quad* q = _crossElements_cpp->getQuad(n);
212 //   Quad_impl* servantCorba = new Quad_impl(q);
213 //   return servantCorba->_this();
214 // }
215 // 
216 // Hexa_ptr CrossElements_impl::getHexa(::CORBA::Long n) throw (SALOME::SALOME_Exception)
217 // {
218 //   HEXA_NS::Hexa* h = _crossElements_cpp->getHexa(n);
219 //   Hexa_impl* servantCorba = new Hexa_impl(h);
220 //   return servantCorba->_this();
221 // }
222 // 
223 // 
224 // 
225 // ::CORBA::Long CrossElements_impl::saveVtk( const char* fname ) throw (SALOME::SALOME_Exception)
226 // {
227 //   ::CORBA::Long ret = _crossElements_cpp->saveVtk( fname );
228 //   return ret;
229 // }
230 // 
231 // 
232 // 
233 // Vertex_ptr CrossElements_impl::getVertexIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
234 //   throw (SALOME::SALOME_Exception)
235 // {
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();
240 //   if ( v != NULL ){
241 //     Vertex_impl* servantCorba = new Vertex_impl(v);
242 //     result = servantCorba->_this();
243 //   }
244 //   return result;
245 // }
246 // 
247 // 
248 // Edge_ptr CrossElements_impl::getEdgeI(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
249 //   throw (SALOME::SALOME_Exception)
250 // {
251 //   Edge_ptr result = Edge::_nil();
252 //   HEXA_NS::Edge* e = _crossElements_cpp->getEdgeI(x, y, z);
253 //   if ( e != NULL ){
254 //     Edge_impl* servantCorba = new Edge_impl(e);
255 //     result = servantCorba->_this();
256 //   }
257 //   return result;
258 // }
259 // 
260 // 
261 // Edge_ptr CrossElements_impl::getEdgeJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
262 //   throw (SALOME::SALOME_Exception)
263 // {
264 //   Edge_ptr result = Edge::_nil();
265 //   HEXA_NS::Edge* e = _crossElements_cpp->getEdgeJ(x, y, z);
266 //   if ( e != NULL ){
267 //     Edge_impl* servantCorba = new Edge_impl(e);
268 //     result = servantCorba->_this();
269 //   }
270 //   return result;
271 // }
272 // 
273 // 
274 // Edge_ptr CrossElements_impl::getEdgeK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
275 //   throw (SALOME::SALOME_Exception)
276 // {
277 //   Edge_ptr result = Edge::_nil();
278 //   HEXA_NS::Edge* e = _crossElements_cpp->getEdgeK(x, y, z);
279 //   if ( e != NULL ){
280 //     Edge_impl* servantCorba = new Edge_impl(e);
281 //     result = servantCorba->_this();
282 //   }
283 //   return result;
284 // }
285 // 
286 // Quad_ptr CrossElements_impl::getQuadIJ(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
287 //   throw (SALOME::SALOME_Exception)
288 // {
289 //   Quad_ptr result = Quad::_nil();
290 //   HEXA_NS::Quad* q = _crossElements_cpp->getQuadIJ(x, y, z);
291 //   if ( q != NULL ){
292 //     Quad_impl* servantCorba = new Quad_impl(q);
293 //     result = servantCorba->_this();
294 //   }
295 //   return result;
296 // }
297 // 
298 // 
299 // Quad_ptr CrossElements_impl::getQuadIK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
300 //   throw (SALOME::SALOME_Exception)
301 // {
302 //   Quad_ptr result = Quad::_nil();
303 //   HEXA_NS::Quad* q = _crossElements_cpp->getQuadIK(x, y, z);
304 //   if ( q != NULL ){
305 //     Quad_impl* servantCorba = new Quad_impl(q);
306 //     result = servantCorba->_this();
307 //   }
308 //   return result;
309 // }
310 // 
311 // 
312 // Quad_ptr CrossElements_impl::getQuadJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z)
313 //   throw (SALOME::SALOME_Exception)
314 // {
315 //   Quad_ptr result = Quad::_nil();
316 //   HEXA_NS::Quad* q = _crossElements_cpp->getQuadJK(x, y, z);
317 //   if ( q != NULL ){
318 //     Quad_impl* servantCorba = new Quad_impl(q);
319 //     result = servantCorba->_this();
320 //   }
321 //   return result;
322 // }
323 // 
324 // 
325 // Hexa_ptr CrossElements_impl::getHexaIJK(::CORBA::Long x, ::CORBA::Long y, ::CORBA::Long z) throw (SALOME::SALOME_Exception)
326 // {
327 //   Hexa_ptr result = Hexa::_nil();
328 //   HEXA_NS::Hexa* h = _crossElements_cpp->getHexaIJK(x, y, z);
329 //   if ( h != NULL ){
330 //     Hexa_impl* servantCorba = new Hexa_impl(h);
331 //     result = servantCorba->_this();
332 //   }
333 //   return result;
334 // }
335
336