1 -- SMESH SMESHDS : management of mesh data and SMESH document
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 : SMESHDS_Mesh.cdl
25 -- Author : Yves FRICAUD, OCC
28 class Mesh from SMESHDS inherits Mesh from SMDS
35 MeshElement from SMDS,
42 PtrHypothesis from SMESHDS,
43 ListOfPtrHypothesis from SMESHDS,
45 IndexedMapOfShape from TopTools,
46 DataMapOfIntegerSubMesh from SMESHDS,
47 DataMapOfShapeListOfPtrHypothesis from SMESHDS
52 Create (MeshID : Integer from Standard) returns mutable Mesh from SMESHDS;
56 ShapeToMesh (me: mutable; S : Shape from TopoDS);
58 AddHypothesis(me: mutable; SS : in Shape from TopoDS; H : PtrHypothesis from SMESHDS)
61 RemoveHypothesis(me: mutable; S : in Shape from TopoDS; H : PtrHypothesis from SMESHDS)
67 AddNode(me: mutable; x,y,z : Real) returns Integer from Standard
70 RemoveNode (me: mutable; ID: Integer) is redefined;
72 MoveNode (me: mutable; ID: Integer; x,y,z: Real);
76 AddEdge(me: mutable; idnode1, idnode2 : Integer) returns Integer from Standard
80 AddFace(me: mutable; idnode1, idnode2, idnode3 : Integer) returns Integer from Standard
81 -- To build a Triangle
85 AddFace(me: mutable; idnode1, idnode2, idnode3 , idnode4 : Integer) returns Integer from Standard
86 -- To build a quadrangle
91 AddVolume(me: mutable; idnode1, idnode2, idnode3, idnode4 : Integer) returns Integer
92 -- To build a Tetrahedron
95 AddVolume(me: mutable; idnode1, idnode2, idnode3, idnode4, idnode5 : Integer) returns Integer
99 AddVolume(me: mutable; idnode1, idnode2, idnode3, idnode4, idnode5, idnode6 : Integer) returns Integer
103 AddVolume(me: mutable; idnode1, idnode2, idnode3, idnode4, idnode5, idnode6, idnode7, idnode8 : Integer) returns Integer
104 -- To build a Hexahedron
108 RemoveElement(me: mutable; IDelem : Integer)
111 -- Binding BRep and MeshElements
113 SetNodeInVolume (me: mutable; aNode : MeshNode from SMDS ; S : Shell from TopoDS);
115 SetNodeOnFace (me: mutable; aNode : MeshNode from SMDS ; S : Face from TopoDS);
117 SetNodeOnEdge (me: mutable; aNode : MeshNode from SMDS ; S : Edge from TopoDS);
119 SetNodeOnVertex(me: mutable; aNode : MeshNode from SMDS ; S : Vertex from TopoDS);
121 UnSetNodeOnShape (me: mutable; aNode : MeshNode from SMDS);
123 SetMeshElementOnShape (me: mutable; anElt : MeshElement from SMDS ; S : Shape from TopoDS);
125 UnSetMeshElementOnShape (me: mutable; anElt : MeshElement from SMDS ; S : Shape from TopoDS) ;
129 ShapeToMesh (me: mutable) returns Shape from TopoDS;
131 HasMeshElements (me: mutable; S : Shape from TopoDS) returns Boolean from Standard;
133 MeshElements (me: mutable; S : Shape from TopoDS) returns SubMesh from SMESHDS;
135 HasHypothesis (me: mutable; S : Shape from TopoDS) returns Boolean from Standard;
137 GetHypothesis (me: mutable; S : Shape from TopoDS)
138 ---C++ : return const &
139 returns ListOfPtrHypothesis from SMESHDS;
141 -- Historic of commands
143 GetScript(me: mutable) returns Script from SMESHDS;
144 ---C++ : return const &
147 ClearScript(me: mutable);
149 -- Methods for persitance
151 ShapeToIndex (me : mutable; aShape : Shape from TopoDS) returns Integer from Standard;
153 IndexToShape (me : mutable; ShapeIndex : Integer from Standard) returns Shape from TopoDS;
155 NewSubMesh (me : mutable; Index : Integer from Standard);
157 SetNodeInVolume (me: mutable; aNode : MeshNode from SMDS ; Index : Integer from Standard);
159 SetNodeOnFace (me: mutable; aNode : MeshNode from SMDS ; Index : Integer from Standard);
161 SetNodeOnEdge (me: mutable; aNode : MeshNode from SMDS ; Index : Integer from Standard);
163 SetNodeOnVertex(me: mutable; aNode : MeshNode from SMDS ; Index : Integer from Standard);
165 SetMeshElementOnShape (me: mutable; anElt : MeshElement from SMDS ; Index : Integer from Standard);
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;