1 -- SMESH SMDS : implementaion of Salome mesh data structure
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 : SMDS_MeshElement.cdl
25 -- Author : Jean-Michel BOULCOURT
28 deferred class MeshElement from SMDS inherits MeshObject from SMDS
30 ---Purpose: MeshElement is the base class for all mesh --
31 -- elements that constitutes a mesh. The children
32 -- classes will include elements like Node, Edge,
36 ListOfMeshElement from SMDS,
37 HArray1OfDir from TColgp,
40 ElementType from SMDSAbs
43 OutOfRange from Standard
47 Initialize(ID: Integer; NbConnections : Integer;
48 Type: ElementType from SMDSAbs)
49 returns mutable MeshElement;
51 HashCode (me; Upper : Integer) returns Integer is redefined static;
52 ---Purpose: Returns a hashed value denoting <me>. This value is in
53 -- the range 1..<Upper>.
56 IsSame(me; other : MeshElement) returns Boolean;
57 ---Purpose: Returns True if two mesh elements are same but not
58 -- necessary the same orientation
62 IsEqual(me; other : MeshElement) returns Boolean;
63 ---Purpose: Returns True if two mesh elements are same and
64 -- havesame orientation
68 IsNodeInElement(me; idnode: Integer) returns Boolean;
69 ---Purpose: returns true or false if idnode is in the list of the
73 GetEdgeDefinedByNodes(me; rank: Integer; idnode1, idnode2 : out Integer) is virtual;
74 ---Purpose: returns the idnodes of the ith edge (rank) of the face
75 -- rank must be comprised between 1 and myNbConnections included.
77 GetFaceDefinedByNodes(me; rank: Integer; idnode : Address;nb: out Integer) is virtual;
78 ---Purpose: returns the idnodes of the ith edge (rank) of the face
79 -- rank must be comprised between 1 and myNbConnections included.
81 GetConnections(me) returns Address
84 GetConnection(me; rank: Integer) returns Integer is virtual;
86 AddInverseElement(me:mutable; ME: MeshElement from SMDS) is virtual;
88 InverseElements(me) returns ListOfMeshElement is virtual;
89 ---C++: return const &
91 ClearInverseElements(me: mutable) is virtual;
93 NbNodes(me) returns Integer;
96 NbEdges(me) returns Integer
99 NbFaces(me) returns Integer
102 GetID(me) returns Integer;
103 ---Purpose: returns identifier of node
106 GetKey(me) returns Integer is deferred;
107 ---Purpose: returns key for hashcode
110 SetNormal(me: mutable; rank: Integer; vx,vy,vz : Real) is virtual;
111 ---Purpose: set the rank th normal of the element
113 SetNormal(me: mutable; rank: Integer; v : Vec from gp) is virtual;
114 ---Purpose: set the rank th normal of the element
116 GetNormal(me:mutable; rank: Integer) returns Dir from gp is virtual;
117 ---Purpose: get the rank th normal of the element
119 Print(me; OS: in out OStream) is virtual;
121 ---C++: alias "friend Standard_EXPORT Standard_OStream& operator << (Standard_OStream& OS, const Handle(SMDS_MeshElement)& );"
123 GetType(me) returns ElementType from SMDSAbs;
124 ---Purpose: return the mesh element type
129 myID : Integer is protected;
130 myType : ElementType from SMDSAbs;
131 myNbNodes : Integer is protected;
132 myNormals : HArray1OfDir from TColgp is protected;