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