2 -- -- File: SMDS_MeshElement.cdl
3 -- Created: Wed Jan 23 12:09:23 2002
4 -- Author: Jean-Michel BOULCOURT
5 -- <jmb@coulox.paris1.matra-dtv.fr>
6 ---Copyright: Matra Datavision 2002
9 deferred class MeshElement from SMDS inherits MeshObject from SMDS
11 ---Purpose: MeshElement is the base class for all mesh --
12 -- elements that constitutes a mesh. The children
13 -- classes will include elements like Node, Edge,
17 ListOfMeshElement from SMDS,
18 HArray1OfDir from TColgp,
21 ElementType from SMDSAbs
24 OutOfRange from Standard
28 Initialize(ID: Integer; NbConnections : Integer;
29 Type: ElementType from SMDSAbs)
30 returns mutable MeshElement;
32 HashCode (me; Upper : Integer) returns Integer is redefined static;
33 ---Purpose: Returns a hashed value denoting <me>. This value is in
34 -- the range 1..<Upper>.
37 IsSame(me; other : MeshElement) returns Boolean;
38 ---Purpose: Returns True if two mesh elements are same but not
39 -- necessary the same orientation
43 IsEqual(me; other : MeshElement) returns Boolean;
44 ---Purpose: Returns True if two mesh elements are same and
45 -- havesame orientation
49 IsNodeInElement(me; idnode: Integer) returns Boolean;
50 ---Purpose: returns true or false if idnode is in the list of the
54 GetEdgeDefinedByNodes(me; rank: Integer; idnode1, idnode2 : out Integer) is virtual;
55 ---Purpose: returns the idnodes of the ith edge (rank) of the face
56 -- rank must be comprised between 1 and myNbConnections included.
58 GetFaceDefinedByNodes(me; rank: Integer; idnode : Address;nb: out Integer) is virtual;
59 ---Purpose: returns the idnodes of the ith edge (rank) of the face
60 -- rank must be comprised between 1 and myNbConnections included.
62 GetConnections(me) returns Address
65 GetConnection(me; rank: Integer) returns Integer is virtual;
67 AddInverseElement(me:mutable; ME: MeshElement from SMDS) is virtual;
69 InverseElements(me) returns ListOfMeshElement is virtual;
70 ---C++: return const &
72 ClearInverseElements(me: mutable) is virtual;
74 NbNodes(me) returns Integer;
77 NbEdges(me) returns Integer
80 NbFaces(me) returns Integer
83 GetID(me) returns Integer;
84 ---Purpose: returns identifier of node
87 GetKey(me) returns Integer is deferred;
88 ---Purpose: returns key for hashcode
91 SetNormal(me: mutable; rank: Integer; vx,vy,vz : Real) is virtual;
92 ---Purpose: set the rank th normal of the element
94 SetNormal(me: mutable; rank: Integer; v : Vec from gp) is virtual;
95 ---Purpose: set the rank th normal of the element
97 GetNormal(me:mutable; rank: Integer) returns Dir from gp is virtual;
98 ---Purpose: get the rank th normal of the element
100 Print(me; OS: in out OStream) is virtual;
102 ---C++: alias "friend Standard_EXPORT Standard_OStream& operator << (Standard_OStream& OS, const Handle(SMDS_MeshElement)& );"
104 GetType(me) returns ElementType from SMDSAbs;
105 ---Purpose: return the mesh element type
110 myID : Integer is protected;
111 myType : ElementType from SMDSAbs;
112 myNbNodes : Integer is protected;
113 myNormals : HArray1OfDir from TColgp is protected;