1 // SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SMESH_MEDMesh_i.hxx
27 #ifndef _MED_SMESH_MESH_I_HXX_
28 #define _MED_SMESH_MESH_I_HXX_
30 #include <SALOMEconfig.h>
31 #include CORBA_SERVER_HEADER(MED)
36 #include "SMESHDS_Mesh.hxx"
38 #include "SMDS_MeshElement.hxx"
39 #include "SMDS_MeshNode.hxx"
40 #include "SALOME_GenericObj_i.hh"
42 #define MED_NBR_GEOMETRIE_MAILLE 15
43 #define MED_NBR_TYPE 5
47 class SMESH_MEDMesh_i:
48 public virtual POA_SALOME_MED::MESH,
49 public virtual SALOME::GenericObj_i
52 // C++ object containing values
53 ::SMESH_Mesh_i * _mesh_i;
54 SMESHDS_Mesh *_meshDS;
63 map < SALOME_MED::medGeometryElement, int >_mapIndToSeqElts;
64 SALOME_MED::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE];
66 map < SALOME_MED::medEntityMesh, int >_mapNbTypes;
67 map < SALOME_MED::medEntityMesh, int >_mapIndToVectTypes;
68 vector < SALOME_MED::medGeometryElement >
69 _TypesId[MED_NBR_GEOMETRIE_MAILLE];
71 vector < SALOME_MED::FAMILY_ptr > _families;
74 // Constructors and associated internal methods
76 SMESH_MEDMesh_i(SMESH_Mesh_i * m);
80 void setProtocol(SALOME::TypeOfCommunication typ) {}
82 SALOME::SenderDouble_ptr getSenderForCoordinates(SALOME_MED::medModeSwitch) {return SALOME::SenderDouble::_nil();}
83 SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medModeSwitch,
84 SALOME_MED::medConnectivity,
85 SALOME_MED::medEntityMesh,
86 SALOME_MED::medGeometryElement)
88 return SALOME::SenderInt::_nil();
90 SALOME::SenderInt_ptr getSenderForPolygonsConnectivity(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
91 SALOME::SenderInt_ptr getSenderForPolygonsConnectivityIndex(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
92 SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
93 SALOME::SenderInt_ptr getSenderForPolyhedronIndex(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
94 SALOME::SenderInt_ptr getSenderForPolyhedronFacesIndex() {return SALOME::SenderInt::_nil();}
96 char *getName() throw(SALOME::SALOME_Exception);
97 CORBA::Long getSpaceDimension() throw(SALOME::SALOME_Exception);
99 CORBA::Long getMeshDimension() throw(SALOME::SALOME_Exception);
101 CORBA::Boolean getIsAGrid() throw (SALOME::SALOME_Exception);
104 existConnectivity(SALOME_MED::medConnectivity connectivityType,
105 SALOME_MED::medEntityMesh entity)
106 throw (SALOME::SALOME_Exception);
108 char *getCoordinatesSystem() throw(SALOME::SALOME_Exception);
110 CORBA::Double getCoordinate(CORBA::Long Number, CORBA::Long Axis)
111 throw (SALOME::SALOME_Exception);
113 SALOME_MED::double_array * getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
114 throw(SALOME::SALOME_Exception);
116 SALOME_MED::string_array * getCoordinatesNames()
117 throw(SALOME::SALOME_Exception);
119 SALOME_MED::string_array * getCoordinatesUnits()
120 throw(SALOME::SALOME_Exception);
122 CORBA::Long getNumberOfNodes() throw(SALOME::SALOME_Exception);
124 CORBA::Long getNumberOfTypes(SALOME_MED::medEntityMesh entity)
125 throw(SALOME::SALOME_Exception);
127 SALOME_MED::medGeometryElement_array *
128 getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME::
131 SALOME_MED::medGeometryElement
132 getElementType(SALOME_MED::medEntityMesh entity,
134 throw (SALOME::SALOME_Exception);
136 CORBA::Long getNumberOfElements(SALOME_MED::medEntityMesh entity,
137 SALOME_MED::medGeometryElement geomElement)
138 throw(SALOME::SALOME_Exception);
140 SALOME_MED::long_array *
141 getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
142 SALOME_MED::medConnectivity mode,
143 SALOME_MED::medEntityMesh entity,
144 SALOME_MED::medGeometryElement geomElement)
145 throw(SALOME::SALOME_Exception);
147 SALOME_MED::long_array *
148 getConnectivityIndex(SALOME_MED::medConnectivity mode,
149 SALOME_MED::medEntityMesh entity)
150 throw(SALOME::SALOME_Exception);
152 SALOME_MED::long_array*
153 getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity)
154 throw (SALOME::SALOME_Exception);
156 CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode,
157 SALOME_MED::medEntityMesh entity,
158 SALOME_MED::medGeometryElement type,
159 const SALOME_MED::long_array & connectivity)
160 throw(SALOME::SALOME_Exception);
162 SALOME_MED::long_array *
163 getReverseConnectivity(SALOME_MED::medConnectivity mode)
164 throw(SALOME::SALOME_Exception);
166 SALOME_MED::long_array *
167 getReverseConnectivityIndex(SALOME_MED::medConnectivity mode)
168 throw(SALOME::SALOME_Exception);
171 CORBA::Long getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
172 throw(SALOME::SALOME_Exception);
174 CORBA::Long getNumberOfGroups(SALOME_MED::medEntityMesh entity)
175 throw(SALOME::SALOME_Exception);
177 SALOME_MED::Family_array *
178 getFamilies(SALOME_MED::medEntityMesh entity)
179 throw(SALOME::SALOME_Exception);
181 SALOME_MED::FAMILY_ptr getFamily(SALOME_MED::medEntityMesh entity,
183 throw(SALOME::SALOME_Exception);
185 SALOME_MED::Group_array * getGroups(SALOME_MED::medEntityMesh entity)
186 throw(SALOME::SALOME_Exception);
188 SALOME_MED::GROUP_ptr getGroup(SALOME_MED::medEntityMesh entity,
190 throw(SALOME::SALOME_Exception);
192 SALOME_MED::SUPPORT_ptr
193 getBoundaryElements(SALOME_MED::medEntityMesh entity)
194 throw (SALOME::SALOME_Exception);
196 SALOME_MED::SUPPORT_ptr getSkin(SALOME_MED::SUPPORT_ptr mySupport3D)
197 throw (SALOME::SALOME_Exception);
199 SALOME_MED::FIELD_ptr getVolume(SALOME_MED::SUPPORT_ptr mySupport)
200 throw(SALOME::SALOME_Exception);
202 SALOME_MED::FIELD_ptr getArea(SALOME_MED::SUPPORT_ptr mySupport)
203 throw(SALOME::SALOME_Exception);
205 SALOME_MED::FIELD_ptr getLength(SALOME_MED::SUPPORT_ptr mySupport)
206 throw(SALOME::SALOME_Exception);
208 SALOME_MED::FIELD_ptr getNormal(SALOME_MED::SUPPORT_ptr mySupport)
209 throw(SALOME::SALOME_Exception);
211 SALOME_MED::FIELD_ptr getBarycenter(SALOME_MED::SUPPORT_ptr mySupport)
212 throw(SALOME::SALOME_Exception);
214 SALOME_MED::FIELD_ptr getNeighbourhood(SALOME_MED::SUPPORT_ptr mySupport)
215 throw(SALOME::SALOME_Exception);
218 void addInStudy(SALOMEDS::Study_ptr myStudy,
219 SALOME_MED::MESH_ptr myIor)
220 throw(SALOME::SALOME_Exception);
221 CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType,
222 const char *fileName, const char *meshName)
223 throw(SALOME::SALOME_Exception);
224 void rmDriver(CORBA::Long i) throw(SALOME::SALOME_Exception);
225 void read(CORBA::Long i) throw(SALOME::SALOME_Exception);
226 void write(CORBA::Long i, const char *driverMeshName)
227 throw(SALOME::SALOME_Exception);
230 CORBA::Long getCorbaIndex()
231 throw(SALOME::SALOME_Exception);
233 SALOME_MED::MESH::meshInfos * getMeshGlobal()
234 throw (SALOME::SALOME_Exception);
236 bool areEquals(SALOME_MED::MESH_ptr other) { return false;};
238 SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
239 throw (SALOME::SALOME_Exception);
241 SALOME_MED::MESH::connectivityInfos *
242 getConnectGlobal(SALOME_MED::medEntityMesh entity)
243 throw (SALOME::SALOME_Exception);
246 void calculeNbElts() throw(SALOME::SALOME_Exception);
247 void createFamilies() throw(SALOME::SALOME_Exception);
250 #endif /* _MED_MESH_I_HXX_ */