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_
32 #include <SALOMEconfig.h>
33 #include CORBA_SERVER_HEADER(MED)
38 #include "SMESHDS_Mesh.hxx"
40 #include "SMDS_MeshElement.hxx"
41 #include "SMDS_MeshNode.hxx"
42 #include "SALOME_GenericObj_i.hh"
44 #define MED_NBR_GEOMETRIE_MAILLE 15
45 #define MED_NBR_TYPE 5
49 class SMESH_I_EXPORT SMESH_MEDMesh_i:
50 public virtual POA_SALOME_MED::MESH, public virtual SALOME::GenericObj_i
52 public: private: protected:
53 // C++ object containing values
54 ::SMESH_Mesh_i * _mesh_i;
55 SMESHDS_Mesh *_meshDS;
64 map < SALOME_MED::medGeometryElement, int >_mapIndToSeqElts;
65 SALOME_MED::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE];
67 map < SALOME_MED::medEntityMesh, int >_mapNbTypes;
68 map < SALOME_MED::medEntityMesh, int >_mapIndToVectTypes;
69 vector < SALOME_MED::medGeometryElement >
70 _TypesId[MED_NBR_GEOMETRIE_MAILLE];
72 vector < SALOME_MED::FAMILY_ptr > _families;
75 // Constructors and associated internal methods
77 SMESH_MEDMesh_i(SMESH_Mesh_i * m);
81 void setProtocol(SALOME::TypeOfCommunication typ) {}
83 SALOME::SenderDouble_ptr getSenderForCoordinates(long int) {return SALOME::SenderDouble::_nil();}
84 SALOME::SenderInt_ptr getSenderForConnectivity(long int, long int, long int, long int) {return SALOME::SenderInt::_nil();}
85 SALOME::SenderInt_ptr getSenderForPolygonsConnectivity(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
86 SALOME::SenderInt_ptr getSenderForPolygonsConnectivityIndex(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
87 SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
88 SALOME::SenderInt_ptr getSenderForPolyhedronIndex(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
89 SALOME::SenderInt_ptr getSenderForPolyhedronFacesIndex() {return SALOME::SenderInt::_nil();}
91 char *getName() throw(SALOME::SALOME_Exception);
92 CORBA::Long getSpaceDimension() throw(SALOME::SALOME_Exception);
94 CORBA::Long getMeshDimension() throw(SALOME::SALOME_Exception);
96 CORBA::Boolean getIsAGrid() throw (SALOME::SALOME_Exception);
99 existConnectivity(SALOME_MED::medConnectivity connectivityType,
100 SALOME_MED::medEntityMesh entity)
101 throw (SALOME::SALOME_Exception);
103 char *getCoordinatesSystem() throw(SALOME::SALOME_Exception);
105 CORBA::Double getCoordinate(CORBA::Long Number, CORBA::Long Axis)
106 throw (SALOME::SALOME_Exception);
108 SALOME_MED::double_array * getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
109 throw(SALOME::SALOME_Exception);
111 SALOME_MED::string_array * getCoordinatesNames()
112 throw(SALOME::SALOME_Exception);
114 SALOME_MED::string_array * getCoordinatesUnits()
115 throw(SALOME::SALOME_Exception);
117 CORBA::Long getNumberOfNodes() throw(SALOME::SALOME_Exception);
119 CORBA::Long getNumberOfTypes(SALOME_MED::medEntityMesh entity)
120 throw(SALOME::SALOME_Exception);
122 SALOME_MED::medGeometryElement_array *
123 getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME::
126 SALOME_MED::medGeometryElement
127 getElementType(SALOME_MED::medEntityMesh entity,
129 throw (SALOME::SALOME_Exception);
131 CORBA::Long getNumberOfElements(SALOME_MED::medEntityMesh entity,
132 SALOME_MED::medGeometryElement geomElement)
133 throw(SALOME::SALOME_Exception);
135 SALOME_MED::long_array *
136 getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
137 SALOME_MED::medConnectivity mode,
138 SALOME_MED::medEntityMesh entity,
139 SALOME_MED::medGeometryElement geomElement)
140 throw(SALOME::SALOME_Exception);
142 SALOME_MED::long_array *
143 getConnectivityIndex(SALOME_MED::medConnectivity mode,
144 SALOME_MED::medEntityMesh entity)
145 throw(SALOME::SALOME_Exception);
147 SALOME_MED::long_array*
148 getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity)
149 throw (SALOME::SALOME_Exception);
151 CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode,
152 SALOME_MED::medEntityMesh entity,
153 SALOME_MED::medGeometryElement type,
154 const SALOME_MED::long_array & connectivity)
155 throw(SALOME::SALOME_Exception);
157 SALOME_MED::long_array *
158 getReverseConnectivity(SALOME_MED::medConnectivity mode)
159 throw(SALOME::SALOME_Exception);
161 SALOME_MED::long_array *
162 getReverseConnectivityIndex(SALOME_MED::
163 medConnectivity mode) throw(SALOME::SALOME_Exception);
166 CORBA::Long getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
167 throw(SALOME::SALOME_Exception);
169 CORBA::Long getNumberOfGroups(SALOME_MED::medEntityMesh entity)
170 throw(SALOME::SALOME_Exception);
172 SALOME_MED::Family_array *
173 getFamilies(SALOME_MED::medEntityMesh entity)
174 throw(SALOME::SALOME_Exception);
176 SALOME_MED::FAMILY_ptr getFamily(SALOME_MED::medEntityMesh entity,
177 CORBA::Long i) throw(SALOME::SALOME_Exception);
179 SALOME_MED::Group_array * getGroups(SALOME_MED::medEntityMesh entity)
180 throw(SALOME::SALOME_Exception);
182 SALOME_MED::GROUP_ptr getGroup(SALOME_MED::medEntityMesh entity,
183 CORBA::Long i) throw(SALOME::SALOME_Exception);
185 SALOME_MED::SUPPORT_ptr
186 getBoundaryElements(SALOME_MED::medEntityMesh entity)
187 throw (SALOME::SALOME_Exception);
189 SALOME_MED::SUPPORT_ptr getSkin(SALOME_MED::SUPPORT_ptr mySupport3D)
190 throw (SALOME::SALOME_Exception);
192 SALOME_MED::FIELD_ptr getVolume(SALOME_MED::SUPPORT_ptr mySupport)
193 throw(SALOME::SALOME_Exception);
195 SALOME_MED::FIELD_ptr getArea(SALOME_MED::SUPPORT_ptr mySupport)
196 throw(SALOME::SALOME_Exception);
198 SALOME_MED::FIELD_ptr getLength(SALOME_MED::SUPPORT_ptr mySupport)
199 throw(SALOME::SALOME_Exception);
201 SALOME_MED::FIELD_ptr getNormal(SALOME_MED::SUPPORT_ptr mySupport)
202 throw(SALOME::SALOME_Exception);
204 SALOME_MED::FIELD_ptr getBarycenter(SALOME_MED::SUPPORT_ptr mySupport)
205 throw(SALOME::SALOME_Exception);
207 SALOME_MED::FIELD_ptr getNeighbourhood(SALOME_MED::SUPPORT_ptr mySupport)
208 throw(SALOME::SALOME_Exception);
211 void addInStudy(SALOMEDS::Study_ptr myStudy,
212 SALOME_MED::MESH_ptr myIor) throw(SALOME::SALOME_Exception);
213 CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType,
214 const char *fileName, const char *meshName)
215 throw(SALOME::SALOME_Exception);
216 void rmDriver(CORBA::Long i) throw(SALOME::SALOME_Exception);
217 void read(CORBA::Long i) throw(SALOME::SALOME_Exception);
218 void write(CORBA::Long i, const char *driverMeshName)
219 throw(SALOME::SALOME_Exception);
222 CORBA::Long getCorbaIndex() throw(SALOME::SALOME_Exception);
224 SALOME_MED::MESH::meshInfos * getMeshGlobal()
225 throw (SALOME::SALOME_Exception);
227 bool areEquals(SALOME_MED::MESH_ptr other) { return false;};
229 SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
230 throw (SALOME::SALOME_Exception);
232 SALOME_MED::MESH::connectivityInfos *
233 getConnectGlobal(SALOME_MED::medEntityMesh entity)
234 throw (SALOME::SALOME_Exception);
237 void calculeNbElts() throw(SALOME::SALOME_Exception);
238 void createFamilies() throw(SALOME::SALOME_Exception);
241 #endif /* _MED_MESH_I_HXX_ */