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_Mesh_i.hxx
25 // Author : Paul RASCLE, EDF
29 #ifndef _SMESH_MESH_I_HXX_
30 #define _SMESH_MESH_I_HXX_
32 #include <SALOMEconfig.h>
33 #include CORBA_SERVER_HEADER(SMESH_Mesh)
34 #include CORBA_SERVER_HEADER(SMESH_Hypothesis)
35 #include CORBA_CLIENT_HEADER(GEOM_Gen)
36 #include CORBA_CLIENT_HEADER(GEOM_Shape)
37 #include CORBA_CLIENT_HEADER(MED)
41 #include "SMESH_Mesh.hxx"
42 #include "SMESH_Gen_i.hxx"
43 #include "SMESH_subMesh_i.hxx"
44 #include "SMESH_subMesh.hxx"
45 #include "SMESH_topo.hxx"
50 public POA_SMESH::SMESH_Mesh
54 SMESH_Mesh_i(SMESH_Gen_i* myGen_i,
55 GEOM::GEOM_Gen_ptr geomEngine,
59 virtual ~SMESH_Mesh_i();
63 CORBA::Boolean AddHypothesis(GEOM::GEOM_Shape_ptr aSubShape,
64 SMESH::SMESH_Hypothesis_ptr anHyp)
65 throw (SALOME::SALOME_Exception);
67 CORBA::Boolean RemoveHypothesis(GEOM::GEOM_Shape_ptr aSubShape,
68 SMESH::SMESH_Hypothesis_ptr anHyp)
69 throw (SALOME::SALOME_Exception);
71 SMESH::ListOfHypothesis* GetHypothesisList(GEOM::GEOM_Shape_ptr aSubShape)
72 throw (SALOME::SALOME_Exception);
74 SMESH::SMESH_subMesh_ptr GetElementsOnShape(GEOM::GEOM_Shape_ptr aSubShape)
75 throw (SALOME::SALOME_Exception);
77 // SMESH::string_array* GetLog(CORBA::Boolean clearAfterGet)
78 // throw (SALOME::SALOME_Exception);
80 SMESH::log_array* GetLog(CORBA::Boolean clearAfterGet)
81 throw (SALOME::SALOME_Exception);
83 SMESH::SMESH_MeshEditor_ptr GetMeshEditor();
86 throw (SALOME::SALOME_Exception);
89 throw (SALOME::SALOME_Exception);
91 CORBA::Long GetStudyId()
92 throw (SALOME::SALOME_Exception);
96 void SetImpl(::SMESH_Mesh* impl);
98 ::SMESH_Mesh& GetImpl(); // :: force no namespace here
99 GEOM::GEOM_Gen_ptr GetGeomEngine();
100 void SetIor(SMESH::SMESH_Mesh_ptr myIor);
101 SMESH::SMESH_Mesh_ptr GetIor();
103 void ExportMED( const char* file )
104 throw (SALOME::SALOME_Exception);
105 void ExportDAT( const char* file )
106 throw (SALOME::SALOME_Exception);
107 void ExportUNV( const char* file )
108 throw (SALOME::SALOME_Exception);
110 SALOME_MED::MESH_ptr GetMEDMesh()
111 throw (SALOME::SALOME_Exception);
113 CORBA::Long NbNodes()
114 throw (SALOME::SALOME_Exception);
116 CORBA::Long NbEdges()
117 throw (SALOME::SALOME_Exception);
119 CORBA::Long NbFaces()
120 throw (SALOME::SALOME_Exception);
122 CORBA::Long NbTriangles()
123 throw (SALOME::SALOME_Exception);
125 CORBA::Long NbQuadrangles()
126 throw (SALOME::SALOME_Exception);
128 CORBA::Long NbVolumes()
129 throw (SALOME::SALOME_Exception);
131 CORBA::Long NbTetras()
132 throw (SALOME::SALOME_Exception);
134 CORBA::Long NbHexas()
135 throw (SALOME::SALOME_Exception);
137 CORBA::Long NbSubMesh()
138 throw (SALOME::SALOME_Exception);
141 map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
142 map<int, ::SMESH_subMesh*> _mapSubMesh; //NRI
146 ::SMESH_Mesh* _impl; // :: force no namespace here
148 // CORBA::ORB_ptr _orb;
149 // SMESH_topo* _topo; // all local TopoDS_Shape of subShapes
150 int _id; // id given by creator (unique within the creator instance)
151 GEOM::GEOM_Gen_var _geom;
153 // int _localId; // id attributed to all objects created by Mesh_i
154 map<int, SMESH::SMESH_subMesh_ptr> _mapSubMeshIor;
155 SMESH::SMESH_Mesh_var _myIor;