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, public virtual SALOME::GenericObj_i
50 public: private: protected:
51 // C++ object containing values
52 ::SMESH_Mesh_i * _mesh_i;
53 SMESHDS_Mesh *_meshDS;
62 map < SALOME_MED::medGeometryElement, int >_mapIndToSeqElts;
63 SALOME_MED::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE];
65 map < SALOME_MED::medEntityMesh, int >_mapNbTypes;
66 map < SALOME_MED::medEntityMesh, int >_mapIndToVectTypes;
67 vector < SALOME_MED::medGeometryElement >
68 _TypesId[MED_NBR_GEOMETRIE_MAILLE];
70 vector < SALOME_MED::FAMILY_ptr > _families;
73 // Constructors and associated internal methods
75 SMESH_MEDMesh_i(SMESH_Mesh_i * m);
79 void setProtocol(SALOME::TypeOfCommunication typ) {}
81 SALOME::SenderDouble_ptr getSenderForCoordinates(long int) {return SALOME::SenderDouble::_nil();}
82 SALOME::SenderInt_ptr getSenderForConnectivity(long int, long int, long int, long int) {return SALOME::SenderInt::_nil();}
84 char *getName() throw(SALOME::SALOME_Exception);
85 CORBA::Long getSpaceDimension() throw(SALOME::SALOME_Exception);
87 CORBA::Long getMeshDimension() throw(SALOME::SALOME_Exception);
89 CORBA::Boolean getIsAGrid() throw (SALOME::SALOME_Exception);
92 existConnectivity(SALOME_MED::medConnectivity connectivityType,
93 SALOME_MED::medEntityMesh entity)
94 throw (SALOME::SALOME_Exception);
96 char *getCoordinatesSystem() throw(SALOME::SALOME_Exception);
98 CORBA::Double getCoordinate(CORBA::Long Number, CORBA::Long Axis)
99 throw (SALOME::SALOME_Exception);
101 SALOME_MED::double_array * getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
102 throw(SALOME::SALOME_Exception);
104 SALOME_MED::string_array * getCoordinatesNames()
105 throw(SALOME::SALOME_Exception);
107 SALOME_MED::string_array * getCoordinatesUnits()
108 throw(SALOME::SALOME_Exception);
110 CORBA::Long getNumberOfNodes() throw(SALOME::SALOME_Exception);
112 CORBA::Long getNumberOfTypes(SALOME_MED::medEntityMesh entity)
113 throw(SALOME::SALOME_Exception);
115 SALOME_MED::medGeometryElement_array *
116 getTypes(SALOME_MED::medEntityMesh entity) throw(SALOME::
119 SALOME_MED::medGeometryElement
120 getElementType(SALOME_MED::medEntityMesh entity,
122 throw (SALOME::SALOME_Exception);
124 CORBA::Long getNumberOfElements(SALOME_MED::medEntityMesh entity,
125 SALOME_MED::medGeometryElement geomElement)
126 throw(SALOME::SALOME_Exception);
128 SALOME_MED::long_array *
129 getConnectivity(SALOME_MED::medModeSwitch typeSwitch,
130 SALOME_MED::medConnectivity mode,
131 SALOME_MED::medEntityMesh entity,
132 SALOME_MED::medGeometryElement geomElement)
133 throw(SALOME::SALOME_Exception);
135 SALOME_MED::long_array *
136 getConnectivityIndex(SALOME_MED::medConnectivity mode,
137 SALOME_MED::medEntityMesh entity)
138 throw(SALOME::SALOME_Exception);
140 SALOME_MED::long_array*
141 getGlobalNumberingIndex(SALOME_MED::medEntityMesh entity)
142 throw (SALOME::SALOME_Exception);
144 CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode,
145 SALOME_MED::medEntityMesh entity,
146 SALOME_MED::medGeometryElement type,
147 const SALOME_MED::long_array & connectivity)
148 throw(SALOME::SALOME_Exception);
150 SALOME_MED::long_array *
151 getReverseConnectivity(SALOME_MED::medConnectivity mode)
152 throw(SALOME::SALOME_Exception);
154 SALOME_MED::long_array *
155 getReverseConnectivityIndex(SALOME_MED::
156 medConnectivity mode) throw(SALOME::SALOME_Exception);
159 CORBA::Long getNumberOfFamilies(SALOME_MED::medEntityMesh entity)
160 throw(SALOME::SALOME_Exception);
162 CORBA::Long getNumberOfGroups(SALOME_MED::medEntityMesh entity)
163 throw(SALOME::SALOME_Exception);
165 SALOME_MED::Family_array *
166 getFamilies(SALOME_MED::medEntityMesh entity)
167 throw(SALOME::SALOME_Exception);
169 SALOME_MED::FAMILY_ptr getFamily(SALOME_MED::medEntityMesh entity,
170 CORBA::Long i) throw(SALOME::SALOME_Exception);
172 SALOME_MED::Group_array * getGroups(SALOME_MED::medEntityMesh entity)
173 throw(SALOME::SALOME_Exception);
175 SALOME_MED::GROUP_ptr getGroup(SALOME_MED::medEntityMesh entity,
176 CORBA::Long i) throw(SALOME::SALOME_Exception);
178 SALOME_MED::SUPPORT_ptr
179 getBoundaryElements(SALOME_MED::medEntityMesh entity)
180 throw (SALOME::SALOME_Exception);
182 SALOME_MED::SUPPORT_ptr getSkin(SALOME_MED::SUPPORT_ptr mySupport3D)
183 throw (SALOME::SALOME_Exception);
185 SALOME_MED::FIELD_ptr getVolume(SALOME_MED::SUPPORT_ptr mySupport)
186 throw(SALOME::SALOME_Exception);
188 SALOME_MED::FIELD_ptr getArea(SALOME_MED::SUPPORT_ptr mySupport)
189 throw(SALOME::SALOME_Exception);
191 SALOME_MED::FIELD_ptr getLength(SALOME_MED::SUPPORT_ptr mySupport)
192 throw(SALOME::SALOME_Exception);
194 SALOME_MED::FIELD_ptr getNormal(SALOME_MED::SUPPORT_ptr mySupport)
195 throw(SALOME::SALOME_Exception);
197 SALOME_MED::FIELD_ptr getBarycenter(SALOME_MED::SUPPORT_ptr mySupport)
198 throw(SALOME::SALOME_Exception);
200 SALOME_MED::FIELD_ptr getNeighbourhood(SALOME_MED::SUPPORT_ptr mySupport)
201 throw(SALOME::SALOME_Exception);
204 void addInStudy(SALOMEDS::Study_ptr myStudy,
205 SALOME_MED::MESH_ptr myIor) throw(SALOME::SALOME_Exception);
206 CORBA::Long addDriver(SALOME_MED::medDriverTypes driverType,
207 const char *fileName, const char *meshName)
208 throw(SALOME::SALOME_Exception);
209 void rmDriver(CORBA::Long i) throw(SALOME::SALOME_Exception);
210 void read(CORBA::Long i) throw(SALOME::SALOME_Exception);
211 void write(CORBA::Long i, const char *driverMeshName)
212 throw(SALOME::SALOME_Exception);
215 CORBA::Long getCorbaIndex() throw(SALOME::SALOME_Exception);
217 SALOME_MED::MESH::meshInfos * getMeshGlobal()
218 throw (SALOME::SALOME_Exception);
220 bool areEquals(SALOME_MED::MESH_ptr other) { return false;};
222 SALOME_MED::MESH::coordinateInfos * getCoordGlobal()
223 throw (SALOME::SALOME_Exception);
225 SALOME_MED::MESH::connectivityInfos *
226 getConnectGlobal(SALOME_MED::medEntityMesh entity)
227 throw (SALOME::SALOME_Exception);
230 void calculeNbElts() throw(SALOME::SALOME_Exception);
231 void createFamilies() throw(SALOME::SALOME_Exception);
234 #endif /* _MED_MESH_I_HXX_ */