Salome HOME
This commit was generated by cvs2git to create branch 'IMPORT'.
[modules/smesh.git] / src / SMDS / SMDS_MeshElement.cdl
1
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
7
8
9 deferred class MeshElement from SMDS inherits MeshObject from SMDS
10
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,
14         --          Face, and Volume.
15
16 uses
17    ListOfMeshElement from SMDS,
18    HArray1OfDir from TColgp,
19    Dir from gp,
20    Vec from gp,
21    ElementType from SMDSAbs
22
23 raises
24    OutOfRange from Standard
25    
26 is
27     
28     Initialize(ID: Integer; NbConnections : Integer;
29                Type: ElementType from SMDSAbs) 
30     returns mutable MeshElement;
31
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>.
35             ---C++: inline
36
37     IsSame(me; other : MeshElement) returns Boolean;
38         ---Purpose: Returns True if two mesh elements are same but not
39         --          necessary the same orientation
40         ---C++: inline
41
42
43     IsEqual(me; other : MeshElement) returns Boolean;
44         ---Purpose:  Returns True if  two mesh  elements are  same and
45         --          havesame orientation
46         ---C++: inline
47
48
49     IsNodeInElement(me; idnode: Integer) returns Boolean;
50     ---Purpose: returns true or false if idnode is in the list of the
51     --          direct connections
52     ---C++: inline
53     
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.
57     
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.
61     
62     GetConnections(me) returns Address 
63     is virtual protected;
64
65     GetConnection(me; rank: Integer) returns Integer is virtual;
66
67     AddInverseElement(me:mutable; ME: MeshElement from SMDS) is virtual;
68
69     InverseElements(me) returns ListOfMeshElement is virtual;
70     ---C++: return const &
71     
72     ClearInverseElements(me: mutable) is virtual;
73     
74     NbNodes(me) returns Integer;
75     ---C++: inline
76
77     NbEdges(me) returns Integer
78     is virtual;
79
80     NbFaces(me) returns Integer
81     is virtual;
82
83     GetID(me) returns Integer;
84     ---Purpose: returns identifier of node
85     ---C++: inline
86
87     GetKey(me) returns Integer is deferred;
88     ---Purpose: returns key for hashcode
89
90
91     SetNormal(me: mutable; rank: Integer; vx,vy,vz : Real) is virtual;
92     ---Purpose: set the rank th normal of the element
93
94     SetNormal(me: mutable; rank: Integer; v : Vec from gp) is virtual;
95     ---Purpose: set the rank th normal of the element
96
97     GetNormal(me:mutable; rank: Integer) returns Dir from gp is virtual;
98     ---Purpose: get the rank th normal of the element
99
100     Print(me; OS: in out OStream) is virtual;
101    ---Purpose: 
102     ---C++:  alias  "friend Standard_EXPORT Standard_OStream& operator << (Standard_OStream& OS, const Handle(SMDS_MeshElement)& );"
103
104     GetType(me) returns ElementType from SMDSAbs;
105     ---Purpose: return the mesh element type
106     ---C++: inline
107
108 fields
109
110     myID      : Integer is protected;
111     myType    : ElementType from SMDSAbs;
112     myNbNodes : Integer is protected;
113     myNormals : HArray1OfDir from TColgp is protected; 
114
115 end MeshElement;