7fd59977 |
1 | -- File: IntPatch_GLine.cdl |
2 | -- Created: Mon Apr 6 11:17:45 1992 |
3 | -- Author: Jacques GOUSSARD |
4 | ---Copyright: OPEN CASCADE 1992 |
5 | |
6 | |
7 | class GLine from IntPatch |
8 | |
9 | |
10 | inherits Line from IntPatch |
11 | |
12 | ---Purpose: Implementation of an intersection line represented |
13 | -- by a conic. |
14 | |
15 | uses |
16 | Point from IntPatch, |
17 | SequenceOfPoint from IntPatch, |
18 | Lin from gp, |
19 | Circ from gp, |
20 | Elips from gp, |
21 | Parab from gp, |
22 | Hypr from gp, |
23 | Ax2 from gp, |
24 | TypeTrans from IntSurf, |
25 | Situation from IntSurf |
26 | |
27 | |
28 | raises DomainError from Standard, |
29 | OutOfRange from Standard |
30 | |
31 | is |
32 | |
33 | Create(L: Lin from gp; Tang: Boolean from Standard; |
34 | Trans1,Trans2: TypeTrans from IntSurf) |
35 | |
36 | ---Purpose: Creates a Line as intersection line |
37 | -- when the transitions are In or Out. |
38 | |
39 | returns mutable GLine from IntPatch; |
40 | |
41 | |
42 | Create(L: Lin from gp; Tang: Boolean from Standard; |
43 | Situ1,Situ2: Situation from IntSurf) |
44 | |
45 | ---Purpose: Creates a Line as intersection line |
46 | -- when the transitions are Touch. |
47 | |
48 | returns mutable GLine from IntPatch; |
49 | |
50 | |
51 | Create(L: Lin from gp; Tang: Boolean from Standard) |
52 | |
53 | ---Purpose: Creates a Line as intersection line |
54 | -- when the transitions are Undecided. |
55 | |
56 | returns mutable GLine from IntPatch; |
57 | |
58 | |
59 | Create(C: Circ from gp; Tang: Boolean from Standard; |
60 | Trans1,Trans2: TypeTrans from IntSurf) |
61 | |
62 | ---Purpose: Creates a circle as intersection line |
63 | -- when the transitions are In or Out. |
64 | |
65 | returns mutable GLine from IntPatch; |
66 | |
67 | |
68 | Create(C: Circ from gp; Tang: Boolean from Standard; |
69 | Situ1,Situ2: Situation from IntSurf) |
70 | |
71 | ---Purpose: Creates a circle as intersection line |
72 | -- when the transitions are Touch. |
73 | |
74 | returns mutable GLine from IntPatch; |
75 | |
76 | |
77 | Create(C: Circ from gp; Tang: Boolean from Standard) |
78 | |
79 | ---Purpose: Creates a circle as intersection line |
80 | -- when the transitions are Undecided. |
81 | |
82 | returns mutable GLine from IntPatch; |
83 | |
84 | |
85 | Create(E: Elips from gp; Tang: Boolean from Standard; |
86 | Trans1,Trans2: TypeTrans from IntSurf) |
87 | |
88 | ---Purpose: Creates an ellipse as intersection line |
89 | -- when the transitions are In or Out. |
90 | |
91 | returns mutable GLine from IntPatch; |
92 | |
93 | |
94 | Create(E: Elips from gp; Tang: Boolean from Standard; |
95 | Situ1,Situ2: Situation from IntSurf) |
96 | |
97 | ---Purpose: Creates an ellispe as intersection line |
98 | -- when the transitions are Touch. |
99 | |
100 | returns mutable GLine from IntPatch; |
101 | |
102 | |
103 | Create(E: Elips from gp; Tang: Boolean from Standard) |
104 | |
105 | ---Purpose: Creates an ellipse as intersection line |
106 | -- when the transitions are Undecided. |
107 | |
108 | returns mutable GLine from IntPatch; |
109 | |
110 | |
111 | Create(P: Parab from gp; Tang: Boolean from Standard; |
112 | Trans1,Trans2: TypeTrans from IntSurf) |
113 | |
114 | ---Purpose: Creates a parabola as intersection line |
115 | -- when the transitions are In or Out. |
116 | |
117 | returns mutable GLine from IntPatch; |
118 | |
119 | |
120 | Create(P: Parab from gp; Tang: Boolean from Standard; |
121 | Situ1,Situ2: Situation from IntSurf) |
122 | |
123 | ---Purpose: Creates a parabola as intersection line |
124 | -- when the transitions are Touch. |
125 | |
126 | returns mutable GLine from IntPatch; |
127 | |
128 | |
129 | Create(P: Parab from gp; Tang: Boolean from Standard) |
130 | |
131 | ---Purpose: Creates a parabola as intersection line |
132 | -- when the transitions are Undecided. |
133 | |
134 | returns mutable GLine from IntPatch; |
135 | |
136 | |
137 | Create(H: Hypr from gp; Tang: Boolean from Standard; |
138 | Trans1,Trans2: TypeTrans from IntSurf) |
139 | |
140 | ---Purpose: Creates an hyperbola as intersection line |
141 | -- when the transitions are In or Out. |
142 | |
143 | returns mutable GLine from IntPatch; |
144 | |
145 | |
146 | Create(H: Hypr from gp; Tang: Boolean from Standard; |
147 | Situ1,Situ2: Situation from IntSurf) |
148 | |
149 | ---Purpose: Creates an hyperbola as intersection line |
150 | -- when the transitions are Touch. |
151 | |
152 | returns mutable GLine from IntPatch; |
153 | |
154 | |
155 | Create(H: Hypr from gp; Tang: Boolean from Standard) |
156 | |
157 | ---Purpose: Creates an hyperbola as intersection line |
158 | -- when the transitions are Undecided. |
159 | |
160 | returns mutable GLine from IntPatch; |
161 | |
162 | |
163 | AddVertex(me: mutable; Pnt: Point from IntPatch) |
164 | |
165 | ---Purpose: To add a vertex in the list. |
166 | |
167 | is static; |
168 | |
169 | |
170 | Replace(me: mutable; Index: Integer from Standard; Pnt: Point from IntPatch) |
171 | |
172 | ---Purpose: To replace the element of range Index in the list |
173 | -- of points. |
174 | |
175 | raises OutOfRange from Standard |
176 | --- The exception OutOfRange is raised when Index <= 0 |
177 | -- or Index > NbVertex. |
178 | |
179 | is static; |
180 | |
181 | |
182 | SetFirstPoint(me: mutable; IndFirst: Integer from Standard) is static; |
183 | |
184 | ---C++: inline |
185 | |
186 | |
187 | SetLastPoint(me: mutable; IndLast: Integer from Standard) is static; |
188 | |
189 | ---C++: inline |
190 | |
191 | |
192 | Line(me) |
193 | |
194 | ---Purpose: Returns the Lin from gp corresponding to the intersection |
195 | -- when ArcType returns IntPatch_Line. |
196 | |
197 | |
198 | returns Lin from gp |
199 | ---C++: inline |
200 | |
201 | raises DomainError from Standard |
202 | --- The exception DomainError is raised when ArcType does not return |
203 | -- IntPatch_Line. |
204 | |
205 | is static; |
206 | |
207 | |
208 | Circle(me) |
209 | |
210 | ---Purpose: Returns the Circ from gp corrsponding to the intersection |
211 | -- when ArcType returns IntPatch_Circle. |
212 | |
213 | returns Circ from gp |
214 | ---C++: inline |
215 | |
216 | raises DomainError from Standard |
217 | --- The exception DomainError is raised when ArcType does not return |
218 | -- IntPatch_Circle. |
219 | |
220 | is static; |
221 | |
222 | |
223 | Ellipse(me) |
224 | |
225 | ---Purpose: Returns the Elips from gp corrsponding to the intersection |
226 | -- when ArcType returns IntPatch_Ellipse. |
227 | |
228 | returns Elips from gp |
229 | ---C++: inline |
230 | |
231 | raises DomainError from Standard |
232 | --- The exception DomainError is raised when ArcType does not return |
233 | -- IntPatch_Ellipse. |
234 | |
235 | is static; |
236 | |
237 | |
238 | Parabola(me) |
239 | |
240 | ---Purpose: Returns the Parab from gp corrsponding to the intersection |
241 | -- when ArcType returns IntPatch_Parabola. |
242 | |
243 | returns Parab from gp |
244 | ---C++: inline |
245 | |
246 | raises DomainError from Standard |
247 | --- The exception DomainError is raised when ArcType does not return |
248 | -- IntPatch_Parabola. |
249 | |
250 | is static; |
251 | |
252 | |
253 | Hyperbola(me) |
254 | |
255 | ---Purpose: Returns the Hypr from gp corrsponding to the intersection |
256 | -- when ArcType returns IntPatch_Hyperbola. |
257 | |
258 | returns Hypr from gp |
259 | ---C++: inline |
260 | |
261 | raises DomainError from Standard |
262 | --- The exception DomainError is raised when ArcType does not return |
263 | -- IntPatch_Hyperbola. |
264 | |
265 | is static; |
266 | |
267 | |
268 | HasFirstPoint(me) |
269 | |
270 | ---Purpose: Returns True if the line has a known First point. |
271 | -- This point is given by the method FirstPoint(). |
272 | |
273 | returns Boolean from Standard |
274 | ---C++: inline |
275 | |
276 | is static; |
277 | |
278 | |
279 | HasLastPoint(me) |
280 | |
281 | ---Purpose: Returns True if the line has a known Last point. |
282 | -- This point is given by the method LastPoint(). |
283 | |
284 | returns Boolean from Standard |
285 | ---C++: inline |
286 | |
287 | is static; |
288 | |
289 | |
290 | FirstPoint(me) |
291 | |
292 | ---Purpose: Returns the IntPoint corresponding to the FirstPoint. |
293 | -- An exception is raised when HasFirstPoint returns False. |
294 | |
295 | returns Point from IntPatch |
296 | ---C++: inline |
297 | ---C++: return const& |
298 | |
299 | raises DomainError from Standard |
300 | |
301 | is static; |
302 | |
303 | |
304 | LastPoint(me) |
305 | |
306 | ---Purpose: Returns the IntPoint corresponding to the LastPoint. |
307 | -- An exception is raised when HasLastPoint returns False. |
308 | |
309 | returns Point from IntPatch |
310 | ---C++: inline |
311 | ---C++: return const& |
312 | |
313 | raises DomainError from Standard |
314 | |
315 | is static; |
316 | |
317 | |
318 | NbVertex(me) |
319 | |
320 | returns Integer from Standard |
321 | ---C++: inline |
322 | |
323 | is static; |
324 | |
325 | |
326 | Vertex(me; Index: Integer from Standard) |
327 | |
328 | ---Purpose: Returns the vertex of range Index on the line. |
329 | |
330 | returns Point from IntPatch |
331 | ---C++: inline |
332 | ---C++: return const& |
333 | |
334 | raises OutOfRange from Standard |
335 | --- The exception OutOfRange is raised if Index <= 0 or |
336 | -- Index > NbVertex. |
337 | |
338 | is static; |
339 | |
340 | ComputeVertexParameters(me: mutable; Tol: Real from Standard) |
341 | |
342 | ---Purpose: Set the parameters of all the vertex on the line. |
343 | -- if a vertex is already in the line, |
344 | -- its parameter is modified |
345 | -- else a new point in the line is inserted. |
346 | is static; |
347 | |
348 | fields |
349 | |
350 | pos : Ax2 from gp; |
351 | par1 : Real from Standard; |
352 | par2 : Real from Standard; |
353 | fipt : Boolean from Standard; |
354 | lapt : Boolean from Standard; |
355 | indf : Integer from Standard; |
356 | indl : Integer from Standard; |
357 | svtx : SequenceOfPoint from IntPatch; |
358 | |
359 | end GLine; |