1 //=============================================================================
2 // File : SMESH_Mesh.hxx
3 // Created : sam mai 18 08:07:35 CEST 2002
4 // Author : Paul RASCLE, EDF
6 // Copyright : EDF 2002
8 //=============================================================================
10 #ifndef _SMESH_MESH_HXX_
11 #define _SMESH_MESH_HXX_
13 #include "SMESHDS_Document.hxx"
14 #include "SMESHDS_Mesh.hxx"
15 #include "SMESH_Hypothesis.hxx"
16 #include "SMESH_subMesh.hxx"
17 #include "SMESHDS_ListOfCommand.hxx"
18 //#include "SMESHDS_ListOfAsciiString.hxx"
19 //#include "SMESHDS_ListIteratorOfListOfAsciiString.hxx"
22 #include "Utils_SALOME_Exception.hxx"
25 #include <TopExp_Explorer.hxx>
27 #include <TopoDS_Iterator.hxx>
28 #include <TopoDS_Compound.hxx>
29 #include <TopoDS_CompSolid.hxx>
30 #include <TopoDS_Solid.hxx>
31 #include <TopoDS_Shell.hxx>
32 #include <TopoDS_Face.hxx>
33 #include <TopoDS_Wire.hxx>
34 #include <TopoDS_Edge.hxx>
35 #include <TopoDS_Vertex.hxx>
36 #include <TopoDS_Shape.hxx>
37 #include <TopTools_IndexedMapOfShape.hxx>
49 SMESH_Mesh(int localId,
52 const Handle(SMESHDS_Document)& myDocument);
54 virtual ~SMESH_Mesh();
56 void ShapeToMesh(const TopoDS_Shape& aShape)
57 throw (SALOME_Exception);
59 bool AddHypothesis(const TopoDS_Shape& aSubShape,
61 throw (SALOME_Exception);
63 bool RemoveHypothesis(const TopoDS_Shape& aSubShape,
65 throw (SALOME_Exception);
67 const list<SMESHDS_Hypothesis*>&
68 GetHypothesisList(const TopoDS_Shape& aSubShape)
69 throw (SALOME_Exception);
71 const SMESHDS_ListOfCommand& GetLog()
72 throw (SALOME_Exception);
74 // const SMESHDS_ListOfAsciiString& GetLog()
75 // throw (SALOME_Exception);
78 throw (SALOME_Exception);
82 const Handle(SMESHDS_Mesh)& GetMeshDS();
86 SMESH_subMesh* GetSubMesh(const TopoDS_Shape & aSubShape)
87 throw (SALOME_Exception);
89 SMESH_subMesh* GetSubMeshContaining(const TopoDS_Shape & aSubShape)
90 throw (SALOME_Exception);
92 const list <SMESH_subMesh*>&
93 GetSubMeshUsingHypothesis(SMESHDS_Hypothesis* anHyp)
94 throw (SALOME_Exception);
96 void ExportDAT( const char* file )
97 throw (SALOME_Exception);
98 void ExportMED( const char* file )
99 throw (SALOME_Exception);
100 void ExportUNV( const char* file )
101 throw (SALOME_Exception);
104 throw (SALOME_Exception);
107 throw (SALOME_Exception);
110 throw (SALOME_Exception);
113 throw (SALOME_Exception);
116 throw (SALOME_Exception);
119 throw (SALOME_Exception);
122 throw (SALOME_Exception);
125 throw (SALOME_Exception);
128 throw (SALOME_Exception);
133 int _id; // id given by creator (unique within the creator instance)
135 int _idDoc; // id given by SMESHDS_Document
136 bool _isShapeToMesh; // set to true when a shape is given (only once)
137 list<SMESHDS_Hypothesis*> _subShapeHypothesisList;
138 list<SMESH_subMesh*> _subMeshesUsingHypothesisList;
139 Handle (SMESHDS_Document) _myDocument;
140 Handle (SMESHDS_Mesh) _myMeshDS;
141 TopTools_IndexedMapOfShape _subShapes;
142 map<int, SMESH_subMesh*> _mapSubMesh;