Salome HOME
Remove OCC_LIBS from LDFLAGS
[modules/smesh.git] / src / SMESHDS / SMESHDS_Mesh.cdl
1 --  SMESH SMESHDS : management of mesh data and SMESH document
2 --
3 --  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 --  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 -- 
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. 
10 -- 
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. 
15 -- 
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 
19 -- 
20 --  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 --
22 --
23 --
24 --  File   : SMESHDS_Mesh.cdl
25 --  Author : Yves FRICAUD, OCC
26 --  Module : SMESH
27
28 class Mesh from SMESHDS inherits Mesh from SMDS
29
30 uses 
31         Mesh                              from SMDS,
32         MeshNode                          from SMDS,    
33         MeshEdge                          from SMDS,    
34         MeshFace                          from SMDS,    
35         MeshElement                       from SMDS,    
36         Shell                             from TopoDS,
37         Shape                             from TopoDS,
38         Face                              from TopoDS,
39         Edge                              from TopoDS,
40         Vertex                            from TopoDS,
41         SubMesh                           from SMESHDS,
42         PtrHypothesis                     from SMESHDS,
43         ListOfPtrHypothesis               from SMESHDS,
44         Script                            from SMESHDS,
45         IndexedMapOfShape                 from TopTools,
46         DataMapOfIntegerSubMesh           from SMESHDS,
47         DataMapOfShapeListOfPtrHypothesis from SMESHDS
48
49         
50 is
51
52         Create (MeshID : Integer from Standard) returns mutable Mesh from SMESHDS;
53         
54 -- Building
55
56         ShapeToMesh (me: mutable; S : Shape from TopoDS);
57
58         AddHypothesis(me: mutable; SS : in Shape from TopoDS; H : PtrHypothesis from SMESHDS)
59         returns Boolean;        
60
61         RemoveHypothesis(me: mutable; S : in Shape from TopoDS; H : PtrHypothesis from SMESHDS)
62         returns Boolean;        
63
64         
65         -- Building Node
66         
67         AddNode(me: mutable; x,y,z : Real) returns Integer from Standard
68         is redefined;
69
70         RemoveNode (me: mutable; ID: Integer) is redefined;
71         
72         MoveNode (me: mutable; ID: Integer; x,y,z: Real);
73         
74         
75         -- Building Edge
76         AddEdge(me: mutable; idnode1, idnode2 : Integer) returns Integer from Standard
77         is redefined;
78
79         -- Building Face
80         AddFace(me: mutable; idnode1, idnode2, idnode3 : Integer) returns Integer from Standard
81         -- To build a Triangle
82         is redefined;
83
84
85         AddFace(me: mutable; idnode1, idnode2, idnode3 , idnode4 : Integer) returns Integer from Standard
86         -- To build a quadrangle
87         is redefined;
88
89         -- Building Volume
90         
91         AddVolume(me: mutable; idnode1, idnode2, idnode3, idnode4 : Integer) returns Integer
92         -- To build a Tetrahedron
93         is redefined;
94
95         AddVolume(me: mutable; idnode1, idnode2, idnode3, idnode4, idnode5 : Integer) returns Integer
96         -- To build a Pyramid
97         is redefined;
98
99         AddVolume(me: mutable; idnode1, idnode2, idnode3, idnode4, idnode5, idnode6 : Integer) returns Integer
100         -- To build a Prism
101         is redefined;
102
103         AddVolume(me: mutable; idnode1, idnode2, idnode3, idnode4, idnode5, idnode6, idnode7, idnode8 : Integer) returns Integer
104         -- To build a Hexahedron
105         is redefined;
106
107
108         RemoveElement(me: mutable; IDelem : Integer)
109         is redefined;
110
111         -- Binding  BRep and MeshElements
112
113         SetNodeInVolume (me: mutable; aNode : MeshNode from SMDS ; S : Shell  from TopoDS);
114
115         SetNodeOnFace  (me: mutable; aNode : MeshNode from SMDS ; S : Face  from TopoDS);
116
117         SetNodeOnEdge  (me: mutable; aNode : MeshNode from SMDS ; S : Edge   from TopoDS);
118
119         SetNodeOnVertex(me: mutable; aNode : MeshNode from SMDS ; S : Vertex from TopoDS);
120
121         UnSetNodeOnShape (me: mutable; aNode : MeshNode from SMDS);
122
123         SetMeshElementOnShape (me: mutable; anElt : MeshElement from SMDS ; S : Shape from TopoDS);
124
125         UnSetMeshElementOnShape (me: mutable; anElt : MeshElement from SMDS ; S : Shape from TopoDS) ;
126
127 -- Exploration 
128
129         ShapeToMesh (me: mutable) returns Shape from TopoDS;
130
131         HasMeshElements (me: mutable; S : Shape from TopoDS)  returns Boolean from Standard;
132
133         MeshElements (me: mutable; S : Shape from TopoDS)  returns SubMesh from SMESHDS;
134
135         HasHypothesis (me: mutable; S : Shape from TopoDS)  returns Boolean from Standard;
136
137         GetHypothesis (me: mutable; S : Shape from TopoDS) 
138         ---C++ : return const & 
139         returns ListOfPtrHypothesis from SMESHDS;       
140
141 -- Historic of commands
142         
143         GetScript(me: mutable) returns Script from SMESHDS;
144         ---C++ : return const &
145
146
147         ClearScript(me: mutable);
148
149 -- Methods for persitance
150
151         ShapeToIndex (me : mutable; aShape : Shape from TopoDS) returns Integer from Standard;
152
153         IndexToShape (me : mutable; ShapeIndex : Integer from Standard) returns Shape from TopoDS;
154
155         NewSubMesh (me : mutable; Index : Integer from Standard);
156
157         SetNodeInVolume (me: mutable; aNode : MeshNode from SMDS ; Index : Integer from Standard);
158
159         SetNodeOnFace  (me: mutable; aNode : MeshNode from SMDS ;  Index : Integer from Standard);
160
161         SetNodeOnEdge  (me: mutable; aNode : MeshNode from SMDS ;  Index : Integer from Standard);
162
163         SetNodeOnVertex(me: mutable; aNode : MeshNode from SMDS ;  Index : Integer from Standard);
164
165         SetMeshElementOnShape (me: mutable; anElt : MeshElement from SMDS ; Index : Integer from Standard);
166
167
168 fields
169
170         myMeshID              : Integer                           from Standard;        
171         myShape               : Shape                             from TopoDS;
172         myIndexToShape        : IndexedMapOfShape                 from TopTools; -- Gives Index from Shape and Shape from Index
173         myShapeIndexToSubMesh : DataMapOfIntegerSubMesh           from SMESHDS ;
174         myShapeToHypothesis   : DataMapOfShapeListOfPtrHypothesis from SMESHDS; 
175         myScript              : Script                            from SMESHDS;
176
177 end Mesh;