0024761: Convertation of the generic classes to the non-generic. Part 5
[occt.git] / src / GccGeo / GccGeo_Circ2d2TanRad.cdl
CommitLineData
b311480e 1-- Created on: 1991-03-29
2-- Created by: Remi GILET
3-- Copyright (c) 1991-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17generic class Circ2d2TanRad from GccGeo (
18 TheCurve as any;
19 TheTool as any;
20 TheQCurve as any; -- as QualifiedCurve from GccEnt
21 -- (TheCurve)
22 TheParGenCurve as any; -- as ParGenCurve from GccGeo
23 -- (TheCurve)
24 TheHParGenCurve as Transient;
25 TheCurvePGTool as any; -- as CurvePGTool from GccGeo
26 -- (Thecurve,
27 -- TheTool,
28 -- TheParGenCurve)
29 TheIntConicCurve as any; -- as IntConicCurveOfGOffsetInter
30 TheIntCurveCurve as any) -- as GOffsetInter from Geom2dInt
31 -- (TheParGenCurve,
32 -- TheCurvePGTool)
33
34 ---Purpose: This class implements the algorithms used to
35 -- create 2d circles tangent to one curve and a
36 -- point/line/circle/curv and with a given radius.
37 -- For each construction methods arguments are:
38 -- - Two Qualified elements for tangency constrains.
39 -- (for example EnclosedCirc if we want the
40 -- solution inside the argument EnclosedCirc).
41 -- - Two Reals. One (Radius) for the radius and the
42 -- other (Tolerance) for the tolerance.
43 -- Tolerance is only used for the limit cases.
44 -- For example :
45 -- We want to create a circle inside a circle C1 and
46 -- inside a curve Cu2 with a radius Radius and a
47 -- tolerance Tolerance.
48 -- If we did not used Tolerance it is impossible to
49 -- find a solution in the following case : Cu2 is
50 -- inside C1 and there is no intersection point
51 -- between the two elements.
52 -- With Tolerance we will get a solution if the
53 -- lowest distance between C1 and Cu2 is lower than or
54 -- equal Tolerance.
55
56-- inherits Entity from Standard
57
58uses Pnt2d from gp,
59 Circ2d from gp,
60 Array1OfCirc2d from TColgp,
61 Array1OfPnt2d from TColgp,
62 QualifiedCirc from GccEnt,
63 QualifiedLin from GccEnt,
64 Array1OfReal from TColStd,
65 Array1OfInteger from TColStd,
66 Position from GccEnt,
67 Array1OfPosition from GccEnt
68
69raises OutOfRange from Standard,
70 BadQualifier from GccEnt,
71 NotDone from StdFail,
72 NegativeValue from Standard
73
74is
75
76Create(Qualified1 : QualifiedCirc from GccEnt ;
77 Qualified2 : TheQCurve ;
78 Radius : Real from Standard;
79 Tolerance : Real from Standard) returns Circ2d2TanRad
80 ---Purpose: This method implements the algorithms used to
81 -- create 2d circles TANgent to a 2d circle and a curve
82 -- with a radius of Radius.
83raises NegativeValue, BadQualifier;
84 ---Purpose: It raises NegativeValue if Radius is lower than zero.
85
86Create(Qualified1 : QualifiedLin from GccEnt ;
87 Qualified2 : TheQCurve ;
88 Radius : Real from Standard;
89 Tolerance : Real from Standard) returns Circ2d2TanRad
90 ---Purpose: This method implements the algorithms used to
91 -- create 2d circles TANgent to a 2d line and a curve
92 -- with a radius of Radius.
93raises NegativeValue, BadQualifier;
94 ---Purpose: It raises NegativeValue if Radius is lower than zero.
95
96Create(Qualified1 : TheQCurve ;
97 Qualified2 : TheQCurve ;
98 Radius : Real from Standard;
99 Tolerance : Real from Standard) returns Circ2d2TanRad
100 ---Purpose: This method implements the algorithms used to
101 -- create 2d circles TANgent to two curves with
102 -- a radius of Radius.
103raises NegativeValue, BadQualifier;
104 ---Purpose: It raises NegativeValue if Radius is lower than zero.
105
106Create(Qualified1 : TheQCurve ;
107 Point2 : Pnt2d from gp ;
108 Radius : Real from Standard;
109 Tolerance : Real from Standard) returns Circ2d2TanRad
110 ---Purpose: This method implements the algorithms used to
111 -- create 2d circles TANgent to a curve and a point
112 -- with a radius of Radius.
113raises NegativeValue, BadQualifier;
114 ---Purpose: It raises NegativeValue if Radius is lower than zero.
115
116-- -- ....................................................................
117
118IsDone(me) returns Boolean from Standard
119is static;
120 ---Purpose: This method returns True if the algorithm succeeded.
121
122NbSolutions(me) returns Integer from Standard
123 ---Purpose: This method returns the number of solutions.
124raises NotDone
125is static;
126 ---Purpose: It raises NotDone if the algorithm failed.
127
128ThisSolution(me ;
129 Index : Integer from Standard) returns Circ2d from gp
130 ---Purpose: Returns the solution number Index.
131 -- Be careful: the Index is only a way to get all the
132 -- solutions, but is not associated to those outside the context
133 -- of the algorithm-object.
134raises OutOfRange, NotDone
135is static;
136 ---Purpose: It raises OutOfRange exception if Index is greater
137 -- than the number of solutions.
138 -- It raises NotDone if the construction algorithm did not
139 -- succeed.
140
141WhichQualifier(me ;
142 Index : Integer from Standard;
143 Qualif1 : out Position from GccEnt ;
144 Qualif2 : out Position from GccEnt )
145raises OutOfRange, NotDone
146is static;
147 ---Purpose: It returns the information about the qualifiers of
148 -- the tangency arguments concerning the solution number Index.
149 -- It returns the real qualifiers (the qualifiers given to the
150 -- constructor method in case of enclosed, enclosing and outside
151 -- and the qualifiers computedin case of unqualified).
152
153Tangency1(me ;
154 Index : Integer from Standard;
155 ParSol,ParArg : out Real from Standard;
156 PntSol : out Pnt2d from gp )
157 ---Purpose: Returns information about the tangency point between the
158 -- result number Index and the first argument.
159 -- ParSol is the intrinsic parameter of the point PntSol on the solution.
160 -- ParArg is the intrinsic parameter of the point PntSol on the first
161 -- argument.
162raises OutOfRange, NotDone
163is static;
164 ---Purpose: It raises OutOfRange if Index is greater than the number
165 -- of solutions.
166 -- It raises NotDone if the construction algorithm did not
167 -- succeed.
168
169Tangency2(me ;
170 Index : Integer from Standard;
171 ParSol,ParArg : out Real from Standard;
172 PntSol : out Pnt2d from gp )
173 ---Purpose: Returns information about the tangency point between the
174 -- result number Index and the second argument.
175 -- ParSol is the intrinsic parameter of the point PntSol on
176 -- the solution.
177 -- ParArg is the intrinsic parameter of the point PntArg on
178 -- the second argument.
179raises OutOfRange, NotDone
180is static;
181 ---Purpose: It raises OutOfRange if Index is greater than the number
182 -- of solutions.
183 -- It raises NotDone if the construction algorithm did not
184 -- succeed.
185
186IsTheSame1(me ;
187 Index : Integer from Standard) returns Boolean from Standard
188 ---Purpose: Returns True if the solution number Index is equal to
189 -- the first argument.
190raises OutOfRange, NotDone
191is static;
192 ---Purpose: It raises OutOfRange if Index is greater than the number
193 -- of solutions.
194 -- It raises NotDone if the construction algorithm did not
195 -- succeed.
196
197IsTheSame2(me ;
198 Index : Integer from Standard) returns Boolean from Standard
199 ---Purpose: Returns True if the solution number Index is equal to
200 -- the second argument.
201raises OutOfRange, NotDone
202is static;
203 ---Purpose: It raises OutOfRange if Index is greater than the number
204 -- of solutions.
205 -- It raises NotDone if the construction algorithm did not
206 -- succeed.
207
208fields
209
210 WellDone : Boolean from Standard;
211 ---Purpose: True if the algorithm succeeded.
212
213 NbrSol : Integer from Standard;
214 ---Purpose: The number of possible solutions. We have to decide about
215 -- the status of the multiple solutions...
216
217 cirsol : Array1OfCirc2d from TColgp;
218 -- The solutions.
219
220 qualifier1 : Array1OfPosition from GccEnt;
221 -- The qualifiers of the first argument.
222
223 qualifier2 : Array1OfPosition from GccEnt;
224 -- The qualifiers of the second argument.
225
226 TheSame1 : Array1OfInteger from TColStd;
227 ---Purpose: 1 if the solution and the first argument are the same
228 -- (2 circles).
229 -- If R1 is the radius of the first argument and Rsol the radius
230 -- of the solution and dist the distance between the two centers,
231 -- we consider the two circles are identical if R1+dist-Rsol is
232 -- less than Tolerance.
233 -- 0 in the other cases.
234
235 TheSame2 : Array1OfInteger from TColStd;
236 ---Purpose: 1 if the solution and the second argument are the same
237 -- (2 circles).
238 -- If R2 is the radius of the second argument and Rsol the radius
239 -- of the solution and dist the distance between the two centers,
240 -- we consider the two circles are identical if R2+dist-Rsol is
241 -- less than Tolerance.
242 -- 0 in the other cases.
243
244 pnttg1sol : Array1OfPnt2d from TColgp;
245 ---Purpose: The tangency point between the solution and the first
246 -- argument on the solution.
247
248 pnttg2sol : Array1OfPnt2d from TColgp;
249 ---Purpose: The tangency point between the solution and the second
250 -- argument on the solution.
251
252 par1sol : Array1OfReal from TColStd;
253 ---Purpose: The parameter of the tangency point between the solution
254 -- and the first argument on the solution.
255
256 par2sol : Array1OfReal from TColStd;
257 ---Purpose: The parameter of the tangency point between the solution
258 -- and the second argument on the solution.
259
260 pararg1 : Array1OfReal from TColStd;
261 ---Purpose: The parameter of the tangency point between the solution
262 -- and the first argument on the first argument.
263
264 pararg2 : Array1OfReal from TColStd;
265 ---Purpose: The parameter of the tangency point between the solution
266 -- and the second argument on the second argument.
267
268end Circ2d2TanRad;