7fd59977 |
1 | -- File: HLRBRep_EdgeBuilder.cdl |
2 | -- Created: Thu Apr 17 20:11:57 1997 |
3 | -- Author: Christophe MARION |
4 | -- <cma@partox.paris1.matra-dtv.fr> |
5 | ---Copyright: Matra Datavision 1997 |
6 | |
7 | class EdgeBuilder from HLRBRep |
8 | |
9 | uses |
10 | Integer from Standard, |
11 | State from TopAbs, |
12 | Orientation from TopAbs, |
13 | Intersection from HLRAlgo, |
14 | AreaLimit from HLRBRep, |
15 | VertexList from HLRBRep |
16 | |
17 | raises |
18 | NoMoreObject from Standard, |
19 | NoSuchObject from Standard, |
20 | DomainError from Standard |
21 | |
22 | is |
23 | Create (VList : in out VertexList from HLRBRep) |
24 | returns EdgeBuilder from HLRBRep |
25 | ---Purpose: Creates an EdgeBuilder algorithm. <VList> |
26 | -- describes the edge and the interferences. |
27 | -- AreaLimits are created from the vertices. |
28 | -- Builds(IN) is automatically called. |
29 | raises |
30 | DomainError from Standard; -- when the VertexList is incoherent |
31 | |
32 | InitAreas(me : in out) |
33 | ---Purpose: Initialize an iteration on the areas. |
34 | ---Category: Area |
35 | is static; |
36 | |
37 | NextArea(me : in out) |
38 | ---Purpose: Set the current area to the next area. |
39 | ---Category: Area |
40 | raises |
41 | NoSuchObject from Standard -- when there is no next area |
42 | is static; |
43 | |
44 | PreviousArea(me : in out) |
45 | ---Purpose: Set the current area to the previous area. |
46 | ---Category: Area |
47 | raises |
48 | NoSuchObject from Standard -- when there is no previous area |
49 | is static; |
50 | |
51 | HasArea(me) returns Boolean from Standard |
52 | ---Purpose: Returns True if there is a current area. |
53 | ---Category: Area |
54 | is static; |
55 | |
56 | AreaState(me) returns State from TopAbs |
57 | ---Purpose: Returns the state of the current area. |
58 | ---Category: Area |
59 | is static; |
60 | |
61 | AreaEdgeState(me) returns State from TopAbs |
62 | ---Purpose: Returns the edge state of the current area. |
63 | ---Category: Area |
64 | is static; |
65 | |
66 | LeftLimit(me) returns AreaLimit from HLRBRep |
67 | ---Purpose: Returns the AreaLimit beginning the current area. |
68 | -- This is a NULL handle when the area is infinite on |
69 | -- the left. |
70 | -- |
71 | ---Category: Area |
72 | is static; |
73 | |
74 | RightLimit(me) returns AreaLimit from HLRBRep |
75 | ---Purpose: Returns the AreaLimit ending the current area. |
76 | -- This is a NULL handle when the area is infinite on |
77 | -- the right. |
78 | -- |
79 | ---Category: Area |
80 | is static; |
81 | |
82 | Builds(me : in out; ToBuild : State from TopAbs) |
83 | ---Purpose: Reinitialize the results iteration to the parts |
84 | -- with State <ToBuild>. If this method is not called |
85 | -- after construction the default is <ToBuild> = IN. |
86 | -- |
87 | ---Category: Edge |
88 | raises |
89 | DomainError from Standard -- when <ToBuild> is UNKNOWN |
90 | is static; |
91 | |
92 | MoreEdges(me) returns Boolean from Standard |
93 | ---Purpose: Returns True if there are more new edges to build. |
94 | is static; |
95 | |
96 | NextEdge(me : in out) |
97 | ---Purpose: Proceeds to the next edge to build. Skip all |
98 | -- remaining vertices on the current edge. |
99 | -- |
100 | ---Category: Edge |
101 | raises |
102 | NoMoreObject from Standard -- when MoreEdges would return False. |
103 | is static; |
104 | |
105 | MoreVertices(me) returns Boolean from Standard |
106 | ---Purpose: True if there are more vertices in the current new |
107 | -- edge. |
108 | -- |
109 | ---Category: Vertex |
110 | raises |
111 | NoSuchObject from Standard -- when there is no current Edge |
112 | is static; |
113 | |
114 | NextVertex(me : in out) |
115 | ---Purpose: Proceeds to the next vertex of the current edge. |
116 | -- |
117 | ---Category: Vertex |
118 | raises |
119 | NoSuchObject from Standard -- when there is no current edge |
120 | is static; |
121 | |
122 | Current(me) returns Intersection from HLRAlgo |
123 | ---Purpose: Returns the current vertex of the current edge. |
124 | ---Category: Vertex |
125 | ---C++: return const & |
126 | raises |
127 | NoSuchObject from Standard -- when there is no current vertex |
128 | is static; |
129 | |
130 | IsBoundary(me) returns Boolean from Standard |
131 | ---Purpose: Returns True if the current vertex comes from the |
132 | -- boundary of the edge. |
133 | -- |
134 | ---Category: Vertex |
135 | raises |
136 | NoSuchObject from Standard -- when there is no current vertex |
137 | is static; |
138 | |
139 | IsInterference(me) returns Boolean from Standard |
140 | ---Purpose: Returns True if the current vertex was an |
141 | -- interference. |
142 | -- |
143 | ---Category: Vertex |
144 | raises |
145 | NoSuchObject from Standard -- when there is no current vertex |
146 | is static; |
147 | |
148 | Orientation(me) returns Orientation from TopAbs |
149 | ---Purpose: Returns the new orientation of the current vertex. |
150 | -- |
151 | ---Category: Vertex |
152 | raises |
153 | NoSuchObject from Standard -- when there is no current vertex |
154 | is static; |
155 | |
156 | Destroy(me : in out); |
157 | ---C++: alias ~ |
158 | |
159 | fields |
160 | |
161 | toBuild : State from TopAbs; |
162 | myLimits : AreaLimit from HLRBRep; |
163 | left : AreaLimit from HLRBRep; |
164 | right : AreaLimit from HLRBRep; |
165 | current : Integer from Standard; |
166 | |
167 | end EdgeBuilder; |