1 -- Created on: 1991-03-29
2 -- Created by: Remi GILET
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 generic class Circ2d2TanOn from GccIter (
20 TheQualifiedCurve as any) -- as QualifiedCurve from GccEnt
23 ---Purpose: This class implements the algorithms used to
24 -- create 2d circles TANgent to 2 entities and
25 -- having the center ON a curv.
26 -- The order of the tangency argument is always
27 -- QualifiedCirc, QualifiedLin, QualifiedCurv, Pnt2d.
28 -- the arguments are :
29 -- - The two tangency arguments.
31 -- - The parameter for each tangency argument which
35 -- inherits Entity from Standard
40 QualifiedCirc from GccEnt,
41 QualifiedLin from GccEnt,
44 raises NotDone from StdFail
46 private class FuncTCuCuOnCu instantiates FunctionTanCuCuOnCu from GccIter (
47 TheCurve,TheCurveTool);
50 -- On a 2d line ..........................................................
52 Create(Qualified1 : QualifiedCirc ;
53 Qualified2 : TheQualifiedCurve ;
58 Tolerance : Real ) returns Circ2d2TanOn from GccIter ;
59 ---Purpose: This method implements the algorithms used to
60 -- create 2d circles TANgent to a 2d circle and a curve and
61 -- having the center ON a 2d line.
62 -- Param2 is the initial guess on the curve QualifiedCurv.
63 -- Tolerance is used for the limit cases.
65 Create(Qualified1 : QualifiedLin ;
66 Qualified2 : TheQualifiedCurve ;
71 Tolerance : Real ) returns Circ2d2TanOn from GccIter ;
72 ---Purpose: This method implements the algorithms used to
73 -- create 2d circles TANgent to a 2d line and a curve and
74 -- having the center ON a 2d line.
75 -- Param2 is the initial guess on the curve QualifiedCurv.
76 -- Tolerance is used for the limit cases.
78 Create(Qualified1 : TheQualifiedCurve ;
79 Qualified2 : TheQualifiedCurve ;
84 Tolerance : Real ) returns Circ2d2TanOn from GccIter ;
85 ---Purpose: This method implements the algorithms used to
86 -- create 2d circles TANgent to two curves and
87 -- having the center ON a 2d line.
88 -- Param1 is the initial guess on the first QualifiedCurv.
89 -- Param2 is the initial guess on the first QualifiedCurv.
90 -- Tolerance is used for the limit cases.
92 Create(Qualified1 : TheQualifiedCurve ;
97 Tolerance : Real ) returns Circ2d2TanOn from GccIter ;
98 ---Purpose: This method implements the algorithms used to
99 -- create 2d circles TANgent to a 2d point and a curve and
100 -- having the center ON a 2d line.
101 -- Param2 is the initial guess on the curve QualifiedCurv.
102 -- Tolerance is used for the limit cases.
105 -- -- On a 2d Circle .....................................................
107 Create(Qualified1 : QualifiedCirc ;
108 Qualified2 : TheQualifiedCurve ;
113 Tolerance : Real ) returns Circ2d2TanOn from GccIter ;
114 ---Purpose: This method implements the algorithms used to
115 -- create 2d circles TANgent to a 2d circle and a curve and
116 -- having the center ON a 2d circle.
117 -- Param2 is the initial guess on the curve QualifiedCurv.
118 -- Tolerance is used for the limit cases.
120 Create(Qualified1 : QualifiedLin ;
121 Qualified2 : TheQualifiedCurve ;
126 Tolerance : Real ) returns Circ2d2TanOn from GccIter ;
127 ---Purpose: This method implements the algorithms used to
128 -- create 2d circles TANgent to a 2d line and a curve and
129 -- having the center ON a 2d circle.
130 -- Param2 is the initial guess on the curve QualifiedCurv.
131 -- Tolerance is used for the limit cases.
133 Create(Qualified1 : TheQualifiedCurve ;
134 Qualified2 : TheQualifiedCurve ;
139 Tolerance : Real ) returns Circ2d2TanOn from GccIter ;
140 ---Purpose: This method implements the algorithms used to
141 -- create 2d circles TANgent to two curves and
142 -- having the center ON a 2d circle.
143 -- Param1 is the initial guess on the first QualifiedCurv.
144 -- Param2 is the initial guess on the first QualifiedCurv.
145 -- Tolerance is used for the limit cases.
147 Create(Qualified1 : TheQualifiedCurve ;
152 Tolerance : Real ) returns Circ2d2TanOn from GccIter ;
153 ---Purpose: This method implements the algorithms used to
154 -- create 2d circles TANgent to a 2d point and a curve and
155 -- having the center ON a 2d circle.
156 -- Param2 is the initial guess on the curve QualifiedCurv.
157 -- Tolerance is used for the limit cases.
159 -- -- On a curve .....................................................
161 Create(Qualified1 : QualifiedCirc ;
162 Qualified2 : TheQualifiedCurve ;
167 Tolerance : Real ) returns Circ2d2TanOn from GccIter ;
168 ---Purpose: This method implements the algorithms used to
169 -- create 2d circles TANgent to a 2d circle and a curve and
170 -- having the center ON a 2d curve.
171 -- Param2 is the initial guess on the curve QualifiedCurv.
172 -- ParamOn is the initial guess on the center curve OnCurv.
173 -- Tolerance is used for the limit cases.
175 Create(Qualified1 : QualifiedLin ;
176 Qualified2 : TheQualifiedCurve ;
181 Tolerance : Real ) returns Circ2d2TanOn from GccIter ;
182 ---Purpose: This method implements the algorithms used to
183 -- create 2d circles TANgent to a 2d line and a curve and
184 -- having the center ON a 2d curve.
185 -- Param2 is the initial guess on the curve QualifiedCurv.
186 -- ParamOn is the initial guess on the center curve OnCurv.
187 -- Tolerance is used for the limit cases.
189 Create(Qualified1 : TheQualifiedCurve ;
194 Tolerance : Real ) returns Circ2d2TanOn from GccIter ;
195 ---Purpose: This method implements the algorithms used to
196 -- create 2d circles TANgent to a 2d Point and a curve and
197 -- having the center ON a 2d curve.
198 -- Param1 is the initial guess on the curve QualifiedCurv.
199 -- ParamOn is the initial guess on the center curve OnCurv.
200 -- Tolerance is used for the limit cases.
202 Create(Qualified1 : TheQualifiedCurve ;
203 Qualified2 : TheQualifiedCurve ;
208 Tolerance : Real ) returns Circ2d2TanOn from GccIter ;
209 ---Purpose: This method implements the algorithms used to
210 -- create 2d circles TANgent to two curves and
211 -- having the center ON a 2d curve.
212 -- Param1 is the initial guess on the first curve QualifiedCurv.
213 -- Param1 is the initial guess on the second curve QualifiedCurv.
214 -- ParamOn is the initial guess on the center curve OnCurv.
215 -- Tolerance is used for the limit cases.
217 -- -- ....................................................................
219 IsDone(me) returns Boolean
221 ---Purpose: This method returns True if the construction
222 -- algorithm succeeded.
224 ThisSolution(me) returns Circ2d
225 ---Purpose: Returns the solution.
226 raises NotDone from StdFail
228 ---Purpose: It raises NotDone if the construction algorithm
232 Qualif1 : out Position from GccEnt;
233 Qualif2 : out Position from GccEnt)
234 raises NotDone from StdFail
236 -- It returns the informations about the qualifiers of the tangency
237 -- arguments concerning the solution number Index.
238 -- It returns the real qualifiers (the qualifiers given to the
239 -- constructor method in case of enclosed, enclosing and outside
240 -- and the qualifiers computedin case of unqualified).
243 ParSol,ParArg : out Real ;
245 ---Purpose: Returns information about the tangency point between
246 -- the result and the first argument.
247 -- ParSol is the intrinsic parameter of the point PntSol
248 -- on the solution curv.
249 -- ParArg is the intrinsic parameter of the point PntSol
250 -- on the argument curv.
251 raises NotDone from StdFail
253 ---Purpose: It raises NotDone if the construction algorithm
257 ParSol,ParArg : out Real ;
259 ---Purpose: Returns information about the tangency point between
260 -- the result and the second argument.
261 -- ParSol is the intrinsic parameter of the point PntSol
262 -- on the solution curv.
263 -- ParArg is the intrinsic parameter of the point PntSol
264 -- on the argument curv.
265 raises NotDone from StdFail
267 ---Purpose: It raises NotDone if the construction algorithm
273 ---Purpose: Returns information about the center (on the curv) of the
274 -- result and the third argument.
275 raises NotDone from StdFail
277 ---Purpose: It raises NotDone if the construction algorithm
280 IsTheSame1(me) returns Boolean
281 -- Returns True if the solution is equal to the first argument.
282 raises NotDone from StdFail
284 ---Purpose: It raises NotDone if the construction algorithm
287 IsTheSame2(me) returns Boolean
288 -- Returns True if the solution is equal to the second argument.
289 raises NotDone from StdFail
291 ---Purpose: It raises NotDone if the construction algorithm
297 ---Purpose: True if the algorithm succeeded.
299 cirsol : Circ2d from gp;
302 qualifier1 : Position from GccEnt;
303 -- The qualifiers of the first argument.
305 qualifier2 : Position from GccEnt;
306 -- The qualifiers of the first argument.
309 ---Purpose: True if the solution and the first argument are the
310 -- same in the tolerance of Tolerance.
311 -- False in the other cases.
314 ---Purpose: True if the solution and the second argument are the
315 -- same in the tolerance of Tolerance.
316 -- False in the other cases.
319 ---Purpose: The tangency point between the solution and the first
320 -- argument on the solution.
323 ---Purpose: The tangency point between the solution and the second
324 -- argument on the solution.
327 ---Purpose: The center point of the solution on the third argument.
330 ---Purpose: The parameter of the tangency point between the
331 -- solution and the first argument on the solution.
334 ---Purpose: The parameter of the tangency point between the
335 -- solution and the second argument on the solution.
338 ---Purpose: The parameter of the tangency point between the
339 -- solution and the first argument on the first argument.
342 ---Purpose: The parameter of the tangency point between the
343 -- solution and the second argument on the second argument.
346 ---Purpose: The parameter of the center point of the solution
347 -- on the second argument.