Integration of OCCT 6.5.0 from SVN
[occt.git] / src / GccIter / GccIter_Circ2d3Tan.cdl
1 -- File:        Circ2d3Tan.cdl
2 -- Created:     Fri Mar 29 10:00:31 1991
3 -- Author:      Remi GILET
4 --              <reg@topsn2>
5 ---Copyright:    Matra Datavision 1991
6
7 generic class Circ2d3Tan from GccIter (
8     TheCurve          as any;
9     TheCurveTool      as any; -- as CurveTool from GccInt (TheCurve)
10     TheQualifiedCurve as any) -- as QualifiedCurve from GccEnt
11                               --                  (TheCurve)
12
13         ---Purpose: This class implements the algorithms used to 
14         --          create 2d circles tangent to 3 points/lines/circles/
15         --          curves with one curve or more.
16         --          The arguments of all construction methods are :
17         --             - The three qualifiied elements for the 
18         --             tangency constrains (QualifiedCirc, QualifiedLine,
19         --             Qualifiedcurv, Points).
20         --             - A parameter for each QualifiedCurv.
21
22 -- inherits Entity from Standard
23
24 uses Pnt2d            from gp,
25      Lin2d            from gp, 
26      Circ2d           from gp,
27      QualifiedCirc    from GccEnt,
28      QualifiedLin     from GccEnt,
29      Position         from GccEnt
30
31 raises NotDone    from StdFail
32
33 private class FuncTCuCuCu instantiates FunctionTanCuCuCu from GccIter (
34                                             TheCurve,TheCurveTool);
35 is
36
37 Create(Qualified1 : QualifiedCirc from GccEnt ;
38        Qualified2 : QualifiedCirc from GccEnt ;
39        Qualified3 : TheQualifiedCurve            ;
40        Param1     : Real                         ;
41        Param2     : Real                         ;
42        Param3     : Real                         ;
43        Tolerance  : Real                         ) 
44 returns Circ2d3Tan from GccIter;
45         ---Purpose: This method implements the algorithms used to 
46         --          create 2d circles tangent to 2 circles and a curve.
47
48 Create(Qualified1 : QualifiedCirc from GccEnt ;
49        Qualified2 : TheQualifiedCurve            ;
50        Qualified3 : TheQualifiedCurve            ;
51        Param1     : Real                         ;
52        Param2     : Real                         ;
53        Param3     : Real                         ;
54        Tolerance  : Real                         )
55 returns Circ2d3Tan from GccIter;
56         ---Purpose: This method implements the algorithms used to 
57         --          create 2d circles tangent to a circle and 2 curves.
58
59 Create(Qualified1 : QualifiedCirc from GccEnt ;
60        Qualified2 : QualifiedLin  from GccEnt ;
61        Qualified3 : TheQualifiedCurve            ;
62        Param1     : Real                         ;
63        Param2     : Real                         ;
64        Param3     : Real                         ;
65        Tolerance  : Real                         ) 
66 returns Circ2d3Tan from GccIter;
67         ---Purpose: This method implements the algorithms used to 
68         --          create 2d circles tangent to a circle and a line and
69         --          a curve.
70
71 Create(Qualified1 : QualifiedCirc     from GccEnt ;
72        Qualified2 : TheQualifiedCurve                ;
73        Point3     : Pnt2d                            ;
74        Param1     : Real                             ;
75        Param2     : Real                             ;
76        Tolerance  : Real                             ) 
77 returns Circ2d3Tan from GccIter;
78         ---Purpose: This method implements the algorithms used to 
79         --          create 2d circles tangent to a circle and a point and
80         --          a curve.
81
82 Create(Qualified1 : QualifiedLin      from GccEnt ;
83        Qualified2 : QualifiedLin      from GccEnt ;
84        Qualified3 : TheQualifiedCurve                ;
85        Param1     : Real                             ;
86        Param2     : Real                             ;
87        Param3     : Real                             ;
88        Tolerance  : Real                             ) 
89 returns Circ2d3Tan from GccIter;
90         ---Purpose: This method implements the algorithms used to 
91         --          create 2d circles tangent to 2 lines and a curve.
92
93 Create(Qualified1 : QualifiedLin      from GccEnt ;
94        Qualified2 : TheQualifiedCurve                ;
95        Qualified3 : TheQualifiedCurve                ;
96        Param1     : Real                             ;
97        Param2     : Real                             ;
98        Param3     : Real                             ;
99        Tolerance  : Real                             ) 
100 returns Circ2d3Tan from GccIter;
101         ---Purpose: This method implements the algorithms used to 
102         --          create 2d circles tangent to a line and 2 curves.
103
104 Create(Qualified1 : QualifiedLin      from GccEnt ;
105        Qualified2 : TheQualifiedCurve                ;
106        Point3     : Pnt2d                            ;
107        Param1     : Real                             ;
108        Param2     : Real                             ;
109        Tolerance  : Real                             ) 
110 returns Circ2d3Tan from GccIter;
111         ---Purpose: This method implements the algorithms used to 
112         --          create 2d circles tangent to a line and a curve 
113         --          and a point.
114
115 Create(Qualified1 : TheQualifiedCurve ;
116        Point1     : Pnt2d             ;
117        Point2     : Pnt2d             ;
118        Param1     : Real              ;
119        Tolerance  : Real              ) 
120 returns Circ2d3Tan from GccIter;
121         ---Purpose: This method implements the algorithms used to 
122         --          create 2d circles tangent to a curve and 2 points.
123
124 Create(Qualified1 : TheQualifiedCurve ;
125        Qualified2 : TheQualifiedCurve ;
126        Point2     : Pnt2d             ;
127        Param1     : Real              ;
128        Param2     : Real              ;
129        Tolerance  : Real              ) 
130 returns Circ2d3Tan from GccIter;
131         ---Purpose: This method implements the algorithms used to 
132         --          create 2d circles tangent to 2 curves and a point.
133
134 Create(Qualified1 : TheQualifiedCurve ;
135        Qualified2 : TheQualifiedCurve ;
136        Qualified3 : TheQualifiedCurve ;
137        Param1     : Real              ;
138        Param2     : Real              ;
139        Param3     : Real              ;
140        Tolerance  : Real              ) 
141 returns Circ2d3Tan from GccIter;
142         ---Purpose: This method implements the algorithms used to 
143         --          create 2d circles tangent to 3 curves.
144
145 -- -- ....................................................................
146
147 IsDone(me) returns Boolean
148 is static;
149     ---Purpose: This method returns True if the construction 
150     --          algorithm succeeded.
151
152 ThisSolution(me) returns Circ2d 
153     ---Purpose: Returns the solution.
154 raises NotDone from StdFail
155 is static;
156     ---Purpose: It raises NotDone if the construction algorithm 
157     --          didn't succeed.
158
159 WhichQualifier(me                                 ; 
160                Qualif1  : out Position from GccEnt;
161                Qualif2  : out Position from GccEnt;
162                Qualif3  : out Position from GccEnt)
163 raises NotDone from StdFail
164 is static;
165     -- It returns the informations about the qualifiers of the tangency 
166     -- arguments concerning the solution number Index.
167     -- It returns the real qualifiers (the qualifiers given to the 
168     -- constructor method in case of enclosed, enclosing and outside 
169     -- and the qualifiers computedin case of unqualified).
170
171 Tangency1(me                       ;
172           ParSol,ParArg : out Real ;
173           PntSol        : out Pnt2d)
174     ---Purpose: Returns informations about the tangency point between 
175     --          the result and the first argument.
176     --          ParSol is the intrinsic parameter of the point PntSol 
177     --          on the solution curv.
178     --          ParArg is the intrinsic parameter of the point PntSol 
179     --          on the argument curv.
180 raises NotDone from StdFail
181 is static;
182     ---Purpose: It raises NotDone if the construction algorithm 
183     --          didn't succeed.
184
185 Tangency2(me                       ;
186           ParSol,ParArg : out Real ;
187           PntSol        : out Pnt2d)
188     ---Purpose: Returns informations about the tangency point between 
189     --          the result and the second argument.
190     --          ParSol is the intrinsic parameter of the point PntSol 
191     --          on the solution curv.
192     --          ParArg is the intrinsic parameter of the point PntSol 
193     --          on the argument curv.
194 raises NotDone from StdFail
195 is static;
196     ---Purpose: It raises NotDone if the construction algorithm 
197     --          didn't succeed.
198
199 Tangency3(me                       ;
200           ParSol,ParArg : out Real ;
201           PntSol        : out Pnt2d)
202     ---Purpose: Returns informations about the tangency point between 
203     --          the result and the third argument.
204     --          ParSol is the intrinsic parameter of the point PntSol 
205     --          on the solution curv.
206     --          ParArg is the intrinsic parameter of the point PntSol 
207     --          on the argument curv.
208 raises NotDone from StdFail
209 is static;
210     ---Purpose: It raises NotDone if the construction algorithm 
211     --          didn't succeed.
212
213 IsTheSame1(me) returns Boolean
214     -- Returns True if the solution is equal to the first argument.
215 raises NotDone from StdFail
216 is static;
217     ---Purpose: It raises NotDone if the construction algorithm 
218     --          didn't succeed.
219
220 IsTheSame2(me) returns Boolean
221     -- Returns True if the solution is equal to the second argument.
222 raises NotDone from StdFail
223 is static;
224     ---Purpose: It raises NotDone if the construction algorithm 
225     --          didn't succeed.
226
227 IsTheSame3(me) returns Boolean
228     -- Returns True if the solution is equal to the third argument.
229 raises NotDone from StdFail
230 is static;
231     ---Purpose: It raises NotDone if the construction algorithm 
232     --          didn't succeed.
233
234 fields
235
236     WellDone : Boolean;
237     ---Purpose: True if the algorithm succeeded.
238
239     cirsol   : Circ2d;
240     ---Purpose: The solutions.
241
242     qualifier1 : Position from GccEnt;
243     -- The qualifiers of the first argument.
244
245     qualifier2 : Position from GccEnt;
246     -- The qualifiers of the first argument.
247
248     qualifier3 : Position from GccEnt;
249     -- The qualifiers of the first argument.
250
251     TheSame1 : Boolean;
252     ---Purpose: True if the solution and the first argument are identical.
253     --          Two circles are identical if the difference between the 
254     --          radius of one and the sum of the radius of the other and 
255     --          the distance between the centers is less than Tolerance. 
256     --          False in the other cases.
257
258     TheSame2 : Boolean;
259     ---Purpose: True if the solution and the second argument are identical.
260     --          Two circles are identical if the difference between the 
261     --          radius of one and the sum of the radius of the other and 
262     --          the distance between the centers is less than Tolerance. 
263     --          False in the other cases.
264
265     TheSame3 : Boolean;
266     ---Purpose: True if the solution and the third argument are identical.
267     --          Two circles are identical if the difference between the 
268     --          radius of one and the sum of the radius of the other and 
269     --          the distance between the centers is less than Tolerance. 
270     --          False in the other cases.
271
272     pnttg1sol   : Pnt2d;
273     ---Purpose: The tangency point between the solution and the first 
274     --          argument on the solution.
275
276     pnttg2sol   : Pnt2d;
277     ---Purpose: The tangency point between the solution and the second 
278     --          argument on the solution.
279
280     pnttg3sol   : Pnt2d;
281     ---Purpose: The tangency point between the solution and the third 
282     --          argument on the solution.
283
284     par1sol   : Real;
285     ---Purpose: The parameter of the tangency point between the solution 
286     --          and the first argument on the solution.
287
288     par2sol   : Real;
289     ---Purpose: The parameter of the tangency point between the solution 
290     --          and the second argument on the solution.
291
292     par3sol   : Real;
293     ---Purpose: The parameter of the tangency point between the solution 
294     --          and the third argument on the solution.
295
296     pararg1   : Real;
297     ---Purpose: The parameter of the tangency point between the solution 
298     --          and the first argument on the first argument.
299
300     pararg2   : Real;
301     ---Purpose: The parameter of the tangency point between the solution 
302     --          and the second argument on the second argument.
303
304     pararg3   : Real;
305     ---Purpose: The parameter of the tangency point between the solution 
306     --          and the third argument on the second argument.
307
308 end Circ2d3Tan;