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 "SMDS_MeshFacesIterator.hxx"
41 #include "SMDS_MeshEdgesIterator.hxx"
42 #include "SMDS_MeshNodesIterator.hxx"
43 #include "SMDS_MeshVolumesIterator.hxx"
45 #define MED_NBR_GEOMETRIE_MAILLE 15
46 #define MED_NBR_TYPE 5
51 class SMESH_MEDMesh_i:
52 public POA_SALOME_MED::MESH,
53 public PortableServer::RefCountServantBase
60 // C++ object containing values
61 ::SMESH_Mesh_i* _mesh_i;
62 Handle (SMESHDS_Mesh) _meshDS;
71 map <SALOME_MED::medGeometryElement,int> _mapIndToSeqElts;
72 Engines::long_array_var _seq_elemId[MED_NBR_GEOMETRIE_MAILLE];
74 map <SALOME_MED::medEntityMesh,int> _mapNbTypes;
75 map <SALOME_MED::medEntityMesh,int> _mapIndToVectTypes;
76 vector<SALOME_MED::medGeometryElement> _TypesId[MED_NBR_GEOMETRIE_MAILLE];
78 vector<SALOME_MED::FAMILY_ptr> _families;
81 // Constructors and associated internal methods
83 SMESH_MEDMesh_i(SMESH_Mesh_i* m);
87 char * getName() throw (SALOME::SALOME_Exception);
88 CORBA::Long getSpaceDimension() throw (SALOME::SALOME_Exception);
89 CORBA::Long getMeshDimension() throw (SALOME::SALOME_Exception);
91 char * getCoordinateSystem()
92 throw (SALOME::SALOME_Exception);
93 Engines::double_array* getCoordinates(SALOME_MED::medModeSwitch typeSwitch)
94 throw (SALOME::SALOME_Exception);
95 Engines::string_array* getCoordinatesNames()
96 throw (SALOME::SALOME_Exception);
97 Engines::string_array* getCoordinatesUnits()
98 throw (SALOME::SALOME_Exception);
99 CORBA::Long getNumberOfNodes()
100 throw (SALOME::SALOME_Exception);
102 CORBA::Long getNumberOfTypes (SALOME_MED::medEntityMesh entity)
103 throw (SALOME::SALOME_Exception);
104 SALOME_MED::medGeometryElement_array* getTypes(SALOME_MED::medEntityMesh entity)
105 throw (SALOME::SALOME_Exception);
107 CORBA::Long getNumberOfElements (SALOME_MED::medEntityMesh entity,
108 SALOME_MED::medGeometryElement geomElement)
109 throw (SALOME::SALOME_Exception);
110 Engines::long_array* getConnectivity (SALOME_MED::medModeSwitch typeSwitch,
111 SALOME_MED::medConnectivity mode,
112 SALOME_MED::medEntityMesh entity,
113 SALOME_MED::medGeometryElement geomElement)
114 throw (SALOME::SALOME_Exception);
115 Engines::long_array* getConnectivityIndex(SALOME_MED::medConnectivity mode,
116 SALOME_MED::medEntityMesh entity)
117 throw (SALOME::SALOME_Exception);
119 CORBA::Long getElementNumber(SALOME_MED::medConnectivity mode,
120 SALOME_MED::medEntityMesh entity,
121 SALOME_MED::medGeometryElement type,
122 const Engines::long_array & connectivity)
123 throw (SALOME::SALOME_Exception);
125 Engines::long_array* getReverseConnectivity(SALOME_MED::medConnectivity mode)
127 throw (SALOME::SALOME_Exception);
128 Engines::long_array* getReverseConnectivityIndex(SALOME_MED::medConnectivity mode)
129 throw (SALOME::SALOME_Exception);
132 CORBA::Long getNumberOfFamilies (SALOME_MED::medEntityMesh entity)
133 throw (SALOME::SALOME_Exception);
134 CORBA::Long getNumberOfGroups (SALOME_MED::medEntityMesh entity)
135 throw (SALOME::SALOME_Exception);
136 SALOME_MED::Family_array* getFamilies (SALOME_MED::medEntityMesh entity)
137 throw (SALOME::SALOME_Exception);
138 SALOME_MED::FAMILY_ptr getFamily (SALOME_MED::medEntityMesh entity,
140 throw (SALOME::SALOME_Exception);
141 SALOME_MED::Group_array* getGroups (SALOME_MED::medEntityMesh entity)
142 throw (SALOME::SALOME_Exception);
143 SALOME_MED::GROUP_ptr getGroup (SALOME_MED::medEntityMesh entity,
145 throw (SALOME::SALOME_Exception);
147 SALOME_MED::FIELD_ptr getVolume (SALOME_MED::SUPPORT_ptr mySupport)
148 throw (SALOME::SALOME_Exception);
149 SALOME_MED::FIELD_ptr getArea (SALOME_MED::SUPPORT_ptr mySupport)
150 throw (SALOME::SALOME_Exception);
151 SALOME_MED::FIELD_ptr getLength (SALOME_MED::SUPPORT_ptr mySupport)
152 throw (SALOME::SALOME_Exception);
153 SALOME_MED::FIELD_ptr getNormal (SALOME_MED::SUPPORT_ptr mySupport)
154 throw (SALOME::SALOME_Exception);
155 SALOME_MED::FIELD_ptr getBarycenter (SALOME_MED::SUPPORT_ptr mySupport)
156 throw (SALOME::SALOME_Exception);
157 SALOME_MED::FIELD_ptr getNeighbourhood (SALOME_MED::SUPPORT_ptr mySupport)
158 throw (SALOME::SALOME_Exception);
162 void addInStudy (SALOMEDS::Study_ptr myStudy,
163 SALOME_MED::MESH_ptr myIor)
164 throw (SALOME::SALOME_Exception);
165 CORBA::Long addDriver (SALOME_MED::medDriverTypes driverType,
166 const char* fileName, const char* meshName)
167 throw (SALOME::SALOME_Exception);
168 void rmDriver (CORBA::Long i)
169 throw (SALOME::SALOME_Exception);
170 void read (CORBA::Long i)
171 throw (SALOME::SALOME_Exception);
172 void write (CORBA::Long i, const char* driverMeshName)
173 throw (SALOME::SALOME_Exception);
176 CORBA::Long getCorbaIndex() throw (SALOME::SALOME_Exception);
179 void calculeNbElts() throw (SALOME::SALOME_Exception);
180 void createFamilies() throw (SALOME::SALOME_Exception);
183 #endif /* _MED_MESH_I_HXX_ */