Salome HOME
NRI : Change lGeometryClient by lGEOMClient.
[modules/smesh.git] / src / SMESHDS / SMESHDS_Mesh.hxx
1 // File generated by CPPExt (Transient)
2 //
3 //                     Copyright (C) 1991,1995 by
4 //  
5 //                      MATRA DATAVISION, FRANCE
6 //  
7 // This software is furnished in accordance with the terms and conditions
8 // of the contract and with the inclusion of the above copyright notice.
9 // This software or any other copy thereof may not be provided or otherwise
10 // be made available to any other person. No title to an ownership of the
11 // software is hereby transferred.
12 //  
13 // At the termination of the contract, the software and all copies of this
14 // software must be deleted.
15 //
16 #ifndef _SMESHDS_Mesh_HeaderFile
17 #define _SMESHDS_Mesh_HeaderFile
18
19 #ifndef _Standard_HeaderFile
20 #include <Standard.hxx>
21 #endif
22 #ifndef _Handle_SMESHDS_Mesh_HeaderFile
23 #include "Handle_SMESHDS_Mesh.hxx"
24 #endif
25
26 #ifndef _Standard_Integer_HeaderFile
27 #include <Standard_Integer.hxx>
28 #endif
29 #ifndef _TopoDS_Shape_HeaderFile
30 #include <TopoDS_Shape.hxx>
31 #endif
32 #ifndef _TopoDS_Shell_HeaderFile
33 #include <TopoDS_Shell.hxx>
34 #endif
35 #ifndef _TopTools_IndexedMapOfShape_HeaderFile
36 #include <TopTools_IndexedMapOfShape.hxx>
37 #endif
38 #ifndef _SMESHDS_DataMapOfIntegerSubMesh_HeaderFile
39 #include "SMESHDS_DataMapOfIntegerSubMesh.hxx"
40 #endif
41 #ifndef _SMESHDS_DataMapOfShapeListOfPtrHypothesis_HeaderFile
42 #include "SMESHDS_DataMapOfShapeListOfPtrHypothesis.hxx"
43 #endif
44 #ifndef _Handle_SMESHDS_Script_HeaderFile
45 #include "Handle_SMESHDS_Script.hxx"
46 #endif
47 #ifndef _SMDS_Mesh_HeaderFile
48 #include "SMDS_Mesh.hxx"
49 #endif
50 #ifndef _Standard_Boolean_HeaderFile
51 #include <Standard_Boolean.hxx>
52 #endif
53 #ifndef _SMESHDS_PtrHypothesis_HeaderFile
54 #include "SMESHDS_PtrHypothesis.hxx"
55 #endif
56 #ifndef _Standard_Real_HeaderFile
57 #include <Standard_Real.hxx>
58 #endif
59 #ifndef _Handle_SMDS_MeshNode_HeaderFile
60 #include "Handle_SMDS_MeshNode.hxx"
61 #endif
62 #ifndef _Handle_SMDS_MeshElement_HeaderFile
63 #include "Handle_SMDS_MeshElement.hxx"
64 #endif
65 #ifndef _Handle_SMESHDS_SubMesh_HeaderFile
66 #include "Handle_SMESHDS_SubMesh.hxx"
67 #endif
68 class SMESHDS_Script;
69 class TopoDS_Shape;
70 class SMDS_MeshNode;
71 class TopoDS_Shell;
72 class TopoDS_Face;
73 class TopoDS_Edge;
74 class TopoDS_Vertex;
75 class SMDS_MeshElement;
76 class SMESHDS_SubMesh;
77 class SMESHDS_ListOfPtrHypothesis;
78
79
80 class SMESHDS_Mesh : public SMDS_Mesh {
81
82 public:
83
84     inline void* operator new(size_t,void* anAddress) 
85       {
86         return anAddress;
87       }
88     inline void* operator new(size_t size) 
89       { 
90         return Standard::Allocate(size); 
91       }
92     inline void  operator delete(void *anAddress) 
93       { 
94         if (anAddress) Standard::Free((Standard_Address&)anAddress); 
95       }
96 //    inline void  operator delete(void *anAddress, size_t size) 
97 //      { 
98 //        if (anAddress) Standard::Free((Standard_Address&)anAddress,size); 
99 //      }
100  // Methods PUBLIC
101  // 
102 Standard_EXPORT SMESHDS_Mesh(const Standard_Integer MeshID);
103 Standard_EXPORT   void ShapeToMesh(const TopoDS_Shape& S) ;
104 Standard_EXPORT   Standard_Boolean AddHypothesis(const TopoDS_Shape& SS,const SMESHDS_PtrHypothesis& H) ;
105 Standard_EXPORT   Standard_Boolean RemoveHypothesis(const TopoDS_Shape& S,const SMESHDS_PtrHypothesis& H) ;
106 Standard_EXPORT virtual  Standard_Integer AddNode(const Standard_Real x,const Standard_Real y,const Standard_Real z) ;
107 Standard_EXPORT virtual  void RemoveNode(const Standard_Integer ID) ;
108 Standard_EXPORT   void MoveNode(const Standard_Integer ID,const Standard_Real x,const Standard_Real y,const Standard_Real z) ;
109 Standard_EXPORT virtual  Standard_Integer AddEdge(const Standard_Integer idnode1,const Standard_Integer idnode2) ;
110 Standard_EXPORT virtual  Standard_Integer AddFace(const Standard_Integer idnode1,const Standard_Integer idnode2,const Standard_Integer idnode3) ;
111 Standard_EXPORT virtual  Standard_Integer AddFace(const Standard_Integer idnode1,const Standard_Integer idnode2,const Standard_Integer idnode3,const Standard_Integer idnode4) ;
112 Standard_EXPORT virtual  Standard_Integer AddVolume(const Standard_Integer idnode1,const Standard_Integer idnode2,const Standard_Integer idnode3,const Standard_Integer idnode4) ;
113 Standard_EXPORT virtual  Standard_Integer AddVolume(const Standard_Integer idnode1,const Standard_Integer idnode2,const Standard_Integer idnode3,const Standard_Integer idnode4,const Standard_Integer idnode5) ;
114 Standard_EXPORT virtual  Standard_Integer AddVolume(const Standard_Integer idnode1,const Standard_Integer idnode2,const Standard_Integer idnode3,const Standard_Integer idnode4,const Standard_Integer idnode5,const Standard_Integer idnode6) ;
115 Standard_EXPORT virtual  Standard_Integer AddVolume(const Standard_Integer idnode1,const Standard_Integer idnode2,const Standard_Integer idnode3,const Standard_Integer idnode4,const Standard_Integer idnode5,const Standard_Integer idnode6,const Standard_Integer idnode7,const Standard_Integer idnode8) ;
116 Standard_EXPORT virtual  void RemoveElement(const Standard_Integer IDelem) ;
117 Standard_EXPORT   void SetNodeInVolume(const Handle(SMDS_MeshNode)& aNode,const TopoDS_Shell& S) ;
118 Standard_EXPORT   void SetNodeOnFace(const Handle(SMDS_MeshNode)& aNode,const TopoDS_Face& S) ;
119 Standard_EXPORT   void SetNodeOnEdge(const Handle(SMDS_MeshNode)& aNode,const TopoDS_Edge& S) ;
120 Standard_EXPORT   void SetNodeOnVertex(const Handle(SMDS_MeshNode)& aNode,const TopoDS_Vertex& S) ;
121 Standard_EXPORT   void UnSetNodeOnShape(const Handle(SMDS_MeshNode)& aNode) ;
122 Standard_EXPORT   void SetMeshElementOnShape(const Handle(SMDS_MeshElement)& anElt,const TopoDS_Shape& S) ;
123 Standard_EXPORT   void UnSetMeshElementOnShape(const Handle(SMDS_MeshElement)& anElt,const TopoDS_Shape& S) ;
124 Standard_EXPORT   TopoDS_Shape ShapeToMesh() ;
125 Standard_EXPORT   Standard_Boolean HasMeshElements(const TopoDS_Shape& S) ;
126 Standard_EXPORT   Handle_SMESHDS_SubMesh MeshElements(const TopoDS_Shape& S) ;
127 Standard_EXPORT   Standard_Boolean HasHypothesis(const TopoDS_Shape& S) ;
128 Standard_EXPORT  const SMESHDS_ListOfPtrHypothesis& GetHypothesis(const TopoDS_Shape& S) ;
129 Standard_EXPORT  const Handle_SMESHDS_Script& GetScript() ;
130 Standard_EXPORT   void ClearScript() ;
131 Standard_EXPORT   Standard_Integer ShapeToIndex(const TopoDS_Shape& aShape) ;
132 Standard_EXPORT   TopoDS_Shape IndexToShape(const Standard_Integer ShapeIndex) ;
133 Standard_EXPORT   void NewSubMesh(const Standard_Integer Index) ;
134 Standard_EXPORT   void SetNodeInVolume(const Handle(SMDS_MeshNode)& aNode,const Standard_Integer Index) ;
135 Standard_EXPORT   void SetNodeOnFace(const Handle(SMDS_MeshNode)& aNode,const Standard_Integer Index) ;
136 Standard_EXPORT   void SetNodeOnEdge(const Handle(SMDS_MeshNode)& aNode,const Standard_Integer Index) ;
137 Standard_EXPORT   void SetNodeOnVertex(const Handle(SMDS_MeshNode)& aNode,const Standard_Integer Index) ;
138 Standard_EXPORT   void SetMeshElementOnShape(const Handle(SMDS_MeshElement)& anElt,const Standard_Integer Index) ;
139 Standard_EXPORT ~SMESHDS_Mesh();
140
141
142
143
144  // Type management
145  //
146  Standard_EXPORT friend Handle_Standard_Type& SMESHDS_Mesh_Type_();
147  Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
148  Standard_EXPORT Standard_Boolean              IsKind(const Handle(Standard_Type)&) const;
149
150 protected:
151
152  // Methods PROTECTED
153  // 
154
155
156  // Fields PROTECTED
157  //
158
159
160 private: 
161
162  // Methods PRIVATE
163  // 
164
165
166  // Fields PRIVATE
167  //
168 Standard_Integer myMeshID;
169 TopoDS_Shape myShape;
170 TopTools_IndexedMapOfShape myIndexToShape;
171 SMESHDS_DataMapOfIntegerSubMesh myShapeIndexToSubMesh;
172 SMESHDS_DataMapOfShapeListOfPtrHypothesis myShapeToHypothesis;
173 Handle_SMESHDS_Script myScript;
174
175
176 };
177
178
179
180
181
182 // other inline functions and methods (like "C++: function call" methods)
183 //
184
185
186 #endif