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.salome-platform.org/ or email : webmaster.salome@opencascade.com
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,
51 public virtual SALOME::GenericObj_i
54 // C++ object containing values
55 ::SMESH_Mesh_i * _mesh_i;
56 SMESHDS_Mesh *_meshDS;
65 std::map < SALOME_MED::medGeometryElement, int >_mapIndToSeqElts;
66 SALOME_MED::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE];
68 std::map < SALOME_MED::medEntityMesh, int >_mapNbTypes;
69 std::map < SALOME_MED::medEntityMesh, int >_mapIndToVectTypes;
70 std::vector < SALOME_MED::medGeometryElement >
71 _TypesId[MED_NBR_GEOMETRIE_MAILLE];
73 std::vector < SALOME_MED::FAMILY_ptr > _families;
76 // Constructors and associated internal methods
78 SMESH_MEDMesh_i(SMESH_Mesh_i * m);
82 void setProtocol(SALOME::TypeOfCommunication typ) {}
84 SALOME::SenderDouble_ptr getSenderForCoordinates(SALOME_MED::medModeSwitch) {return SALOME::SenderDouble::_nil();}
85 SALOME::SenderInt_ptr getSenderForConnectivity(SALOME_MED::medModeSwitch,
86 SALOME_MED::medConnectivity,
87 SALOME_MED::medEntityMesh,
88 SALOME_MED::medGeometryElement)
90 return SALOME::SenderInt::_nil();
92 SALOME::SenderInt_ptr getSenderForPolygonsConnectivity(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
93 SALOME::SenderInt_ptr getSenderForPolygonsConnectivityIndex(SALOME_MED::medConnectivity, SALOME_MED::medEntityMesh) {return SALOME::SenderInt::_nil();}
94 SALOME::SenderInt_ptr getSenderForPolyhedronConnectivity(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
95 SALOME::SenderInt_ptr getSenderForPolyhedronIndex(SALOME_MED::medConnectivity) {return SALOME::SenderInt::_nil();}
96 SALOME::SenderInt_ptr getSenderForPolyhedronFacesIndex() {return SALOME::SenderInt::_nil();}
98 char *getName() throw(SALOME::SALOME_Exception);
99 CORBA::Long getSpaceDimension() throw(SALOME::SALOME_Exception);
101 CORBA::Long getMeshDimension() throw(SALOME::SALOME_Exception);
103 CORBA::Boolean getIsAGrid() throw (SALOME::SALOME_Exception);
106 existConnectivity(SALOME_MED::medConnectivity connectivityType,
107 SALOME_MED::medEntityMesh entity)
108 throw (SALOME::SALOME_Exception);
110 char *getCoordinatesSystem() throw(SALOME::SALOME_Exception);
112 CORBA::Double getCoordinate(CORBA::Long Number, CORBA::Long Axis)
113 throw (SALOME::SALOME_Exception);
115 SALOME_MED::double_array * getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
116 throw(SALOME::SALOME_Exception);
118 SALOME_MED::string_array * getCoordinatesNames()
119 throw(SALOME::SALOME_Exception);
121 SALOME_MED::string_array * getCoordinatesUnits()
122 throw(SALOME::SALOME_Exception);
124 CORBA::Long getNumberOfNodes() throw(SALOME::SALOME_Exception);
126 CORBA::Long getNumberOfTypes(SALOME_MED::medEntityMesh entity)
127 throw(SALOME::SALOME_Exception);
129 SALOME_MED::medGeometryElement_array *
130 getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME::
133 SALOME_MED::medGeometryElement
134 getElementType(SALOME_MED::medEntityMesh entity,
136 throw (SALOME::SALOME_Exception);
138 CORBA::Long getNumberOfElements(SALOME_MED::medEntityMesh entity,
139 SALOME_MED::medGeometryElement geomElement)
140 throw(SALOME::SALOME_Exception);
142 SALOME_MED::long_array *
143 getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
144 SALOME_MED::medConnectivity mode,
145 SALOME_MED::medEntityMesh entity,
146 SALOME_MED::medGeometryElement geomElement)
147 throw(SALOME::SALOME_Exception);
149 SALOME_MED::long_array *
150 getConnectivityIndex(SALOME_MED::medConnectivity mode,
151 SALOME_MED::medEntityMesh entity)
152 throw(SALOME::SALOME_Exception);
154 SALOME_MED::long_array*
155 getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity)
156 throw (SALOME::SALOME_Exception);
158 CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode,
159 SALOME_MED::medEntityMesh entity,
160 SALOME_MED::medGeometryElement type,
161 const SALOME_MED::long_array & connectivity)
162 throw(SALOME::SALOME_Exception);
164 SALOME_MED::long_array *
165 getReverseConnectivity(SALOME_MED::medConnectivity mode)
166 throw(SALOME::SALOME_Exception);
168 SALOME_MED::long_array *
169 getReverseConnectivityIndex(SALOME_MED::medConnectivity mode)
170 throw(SALOME::SALOME_Exception);
173 CORBA::Long getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
174 throw(SALOME::SALOME_Exception);
176 CORBA::Long getNumberOfGroups(SALOME_MED::medEntityMesh entity)
177 throw(SALOME::SALOME_Exception);
179 SALOME_MED::Family_array *
180 getFamilies(SALOME_MED::medEntityMesh entity)
181 throw(SALOME::SALOME_Exception);
183 SALOME_MED::FAMILY_ptr getFamily(SALOME_MED::medEntityMesh entity,
185 throw(SALOME::SALOME_Exception);
187 SALOME_MED::Group_array * getGroups(SALOME_MED::medEntityMesh entity)
188 throw(SALOME::SALOME_Exception);
190 SALOME_MED::GROUP_ptr getGroup(SALOME_MED::medEntityMesh entity,
192 throw(SALOME::SALOME_Exception);
194 SALOME_MED::SUPPORT_ptr
195 getBoundaryElements(SALOME_MED::medEntityMesh entity)
196 throw (SALOME::SALOME_Exception);
198 SALOME_MED::SUPPORT_ptr getSkin(SALOME_MED::SUPPORT_ptr mySupport3D)
199 throw (SALOME::SALOME_Exception);
201 SALOME_MED::FIELD_ptr getVolume(SALOME_MED::SUPPORT_ptr mySupport)
202 throw(SALOME::SALOME_Exception);
204 SALOME_MED::FIELD_ptr getArea(SALOME_MED::SUPPORT_ptr mySupport)
205 throw(SALOME::SALOME_Exception);
207 SALOME_MED::FIELD_ptr getLength(SALOME_MED::SUPPORT_ptr mySupport)
208 throw(SALOME::SALOME_Exception);
210 SALOME_MED::FIELD_ptr getNormal(SALOME_MED::SUPPORT_ptr mySupport)
211 throw(SALOME::SALOME_Exception);
213 SALOME_MED::FIELD_ptr getBarycenter(SALOME_MED::SUPPORT_ptr mySupport)
214 throw(SALOME::SALOME_Exception);
216 SALOME_MED::FIELD_ptr getNeighbourhood(SALOME_MED::SUPPORT_ptr mySupport)
217 throw(SALOME::SALOME_Exception);
220 void addInStudy(SALOMEDS::Study_ptr myStudy,
221 SALOME_MED::MESH_ptr myIor)
222 throw(SALOME::SALOME_Exception);
223 CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType,
224 const char *fileName, const char *meshName)
225 throw(SALOME::SALOME_Exception);
226 void rmDriver(CORBA::Long i) throw(SALOME::SALOME_Exception);
227 void read(CORBA::Long i) throw(SALOME::SALOME_Exception);
228 void write(CORBA::Long i, const char *driverMeshName)
229 throw(SALOME::SALOME_Exception);
232 CORBA::Long getCorbaIndex()
233 throw(SALOME::SALOME_Exception);
235 SALOME_MED::MESH::meshInfos * getMeshGlobal()
236 throw (SALOME::SALOME_Exception);
238 bool areEquals(SALOME_MED::MESH_ptr other) { return false;};
240 SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
241 throw (SALOME::SALOME_Exception);
243 SALOME_MED::MESH::connectivityInfos *
244 getConnectGlobal(SALOME_MED::medEntityMesh entity)
245 throw (SALOME::SALOME_Exception);
248 void calculeNbElts() throw(SALOME::SALOME_Exception);
249 void createFamilies() throw(SALOME::SALOME_Exception);
252 #endif /* _MED_MESH_I_HXX_ */