0024510: Remove unused local variables
[occt.git] / src / GccAna / GccAna_Circ2dTanOnRad.cdl
CommitLineData
b311480e 1-- Created on: 1991-03-22
2-- Created by: Philippe DAUTRY
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--
973c2be1 8-- This library is free software; you can redistribute it and / or modify it
9-- under the terms of the GNU Lesser General Public 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class Circ2dTanOnRad
18
19from GccAna
20
21 ---Purpose: This class implements the algorithms used to
22 -- create a 2d circle tangent to a 2d entity,
23 -- centered on a curv and with a given radius.
24 -- The arguments of all construction methods are :
25 -- - The qualified element for the tangency constrains
26 -- (QualifiedCirc, QualifiedLin, Points).
27 -- - The Center element (circle, line).
28 -- - A real Tolerance.
29 -- Tolerance is only used in the limits cases.
30 -- For example :
31 -- We want to create a circle tangent to an OutsideCirc C1
32 -- centered on a line OnLine with a radius Radius and with
33 -- a tolerance Tolerance.
34 -- If we did not use Tolerance it is impossible to
35 -- find a solution in the the following case : OnLine is
36 -- outside C1. There is no intersection point between C1
37 -- and OnLine. The distance between the line and the
38 -- circle is greater than Radius.
39 -- With Tolerance we will give a solution if the
40 -- distance between C1 and OnLine is lower than or
41 -- equal Tolerance.
42
43--inherits Storable from Standard
44
45uses Pnt2d from gp,
46 Lin2d from gp,
47 Circ2d from gp,
48 QualifiedCirc from GccEnt,
49 QualifiedLin from GccEnt,
50 Array1OfReal from TColStd,
51 Array1OfInteger from TColStd,
52 Array1OfCirc2d from TColgp,
53 Array1OfPnt2d from TColgp,
54 Position from GccEnt,
55 Array1OfPosition from GccEnt
56
57raises NegativeValue from Standard,
58 OutOfRange from Standard,
59 NotDone from StdFail,
60 BadQualifier from GccEnt
61
62is
63
64---Category: On a line ................................................
65
66Create(Qualified1 : QualifiedCirc from GccEnt ;
67 OnLine : Lin2d from gp ;
68 Radius : Real from Standard;
69 Tolerance : Real from Standard) returns Circ2dTanOnRad
70 ---Purpose: This methods implements the algorithms used to create
71 -- 2d Circles tangent to a circle and centered on a 2d Line
72 -- with a given radius.
73 -- Tolerance is used to find solution in every limit cases.
74 -- For example Tolerance is used in the case of EnclosedCirc when
75 -- Radius-R1+dist is greater Tolerance (dist is the distance
76 -- between the line and the location of the circ, R1 is the
77 -- radius of the circ) because there is no solution.
78raises NegativeValue, BadQualifier;
79 ---Purpose: raises NegativeValue in case of NegativeRadius.
80
81Create(Qualified1 : QualifiedLin from GccEnt ;
82 OnLine : Lin2d from gp ;
83 Radius : Real from Standard;
84 Tolerance : Real from Standard) returns Circ2dTanOnRad
85 ---Purpose: This methods implements the algorithms used to create
86 -- 2d Circles tangent to a 2d Line and centered on a 2d Line
87 -- with a given radius.
88 -- Tolerance is used to find solution in every limit cases.
89raises NegativeValue, BadQualifier;
90 ---Purpose: raises NegativeValue in case of NegativeRadius.
91
92Create(Point1 : Pnt2d from gp ;
93 OnLine : Lin2d from gp ;
94 Radius : Real from Standard;
95 Tolerance : Real from Standard) returns Circ2dTanOnRad
96 ---Purpose: This methods implements the algorithms used to create
97 -- 2d Circles passing through a 2d Point and centered on a
98 -- 2d Line with a given radius.
99 -- Tolerance is used to find solution in every limit cases.
100raises NegativeValue;
101 -- raises NegativeValue in case of NegativeRadius.
102
103---Category: On a circle ................................................
104
105Create(Qualified1 : QualifiedCirc from GccEnt ;
106 OnCirc : Circ2d from gp ;
107 Radius : Real from Standard;
108 Tolerance : Real from Standard) returns Circ2dTanOnRad
109 ---Purpose: This methods implements the algorithms used to create
110 -- 2d Circles tangent to a circle and centered on a 2d Circle
111 -- with a given radius.
112 -- Tolerance is used to find solution in every limit cases.
113raises NegativeValue, BadQualifier;
114 ---Purpose: raises NegativeValue in case of NegativeRadius.
115
116Create(Qualified1 : QualifiedLin from GccEnt ;
117 OnCirc : Circ2d from gp ;
118 Radius : Real from Standard;
119 Tolerance : Real from Standard) returns Circ2dTanOnRad
120 ---Purpose: This methods implements the algorithms used to create
121 -- 2d Circles tangent to a 2d Line and centered on a 2d Line
122 -- with a given radius.
123 -- Tolerance is used to find solution in every limit cases.
124raises NegativeValue, BadQualifier;
125 ---Purpose: raises NegativeValue in case of NegativeRadius.
126
127Create(Point1 : Pnt2d from gp ;
128 OnCirc : Circ2d from gp ;
129 Radius : Real from Standard;
130 Tolerance : Real from Standard) returns Circ2dTanOnRad
131 ---Purpose: This methods implements the algorithms used to create
132 -- 2d Circles passing through a 2d Point and centered on a
133 -- 2d Line with a given radius.
134 -- Tolerance is used to find solution in every limit cases.
135raises NegativeValue;
136 ---Purpose: raises NegativeValue in case of NegativeRadius.
137
138-- -- ....................................................................
139
140IsDone(me) returns Boolean from Standard
141is static;
142 ---Purpose: Returns true if the construction algorithm does not fail
143 -- (even if it finds no solution).
144 -- Note: IsDone protects against a failure arising from a
145 -- more internal intersection algorithm, which has
146 -- reached its numeric limits.
147
148NbSolutions(me) returns Integer from Standard
149 ---Purpose: This method returns the number of circles, representing solutions.
150 -- Raises NotDone if the construction algorithm didn't succeed.
151raises NotDone
152is static;
153
154ThisSolution(me ;
155 Index : Integer from Standard) returns Circ2d from gp
156 ---Purpose: Returns the solution number Index and raises OutOfRange
157 -- exception if Index is greater than the number of solutions.
158 -- Be careful: the Index is only a way to get all the
159 -- solutions, but is not associated to theses outside the
160 -- context of the algorithm-object.
161 -- Raises NotDone if the construction algorithm didn't succeed.
162 -- It raises OutOfRange if Index is greater than the
163 -- number of solutions
164raises OutOfRange, NotDone
165is static;
166
167
168WhichQualifier(me ;
169 Index : Integer from Standard;
170 Qualif1 : out Position from GccEnt )
171raises OutOfRange, NotDone
172is static;
173 ---Purpose: Returns the qualifier Qualif1 of the tangency argument
174 -- for the solution of index Index computed by this algorithm.
175 -- The returned qualifier is:
176 -- - that specified at the start of construction when the
177 -- solutions are defined as enclosed, enclosing or
178 -- outside with respect to the argument, or
179 -- - that computed during construction (i.e. enclosed,
180 -- enclosing or outside) when the solutions are defined
181 -- as unqualified with respect to the argument, or
182 -- - GccEnt_noqualifier if the tangency argument is a point.
183 -- Exceptions
184 -- Standard_OutOfRange if Index is less than zero or
185 -- greater than the number of solutions computed by this algorithm.
186 -- StdFail_NotDone if the construction fails.
187
188Tangency1(me ;
189 Index : Integer from Standard;
190 ParSol,ParArg : out Real from Standard;
191 PntSol : out Pnt2d from gp )
192 ---Purpose: Returns informations about the tangency point between the
193 -- result number Index and the first argument.
194 -- ParSol is the intrinsic parameter of the point on the
195 -- solution curv.
196 -- ParArg is the intrinsic parameter of the point on the
197 -- argument curv.
198 -- PntSol is the tangency point on the solution curv.
199 -- PntArg is the tangency point on the argument curv.
200 -- Raises NotDone if the construction algorithm didn't succeed.
201 -- It raises OutOfRange if Index is greater than the
202 -- number of solutions.
203raises OutOfRange, NotDone
204is static;
205
206CenterOn3 (me ;
207 Index : Integer from Standard;
208 ParArg : out Real from Standard;
209 PntSol : out Pnt2d from gp )
210 ---Purpose: Returns informations about the center (on the curv)
211 -- of the result.
212 -- ParArg is the intrinsic parameter of the point on
213 -- the argument curv.
214 -- PntSol is the center point of the solution curv.
215-- Raises NotDone if the construction algorithm didn't succeed.
216 -- It raises OutOfRange if Index is greater than the
217 -- number of solutions.
218raises OutOfRange, NotDone
219is static;
220
221
222IsTheSame1(me ;
223 Index : Integer from Standard) returns Boolean from Standard
224 ---Purpose: Returns True if the solution number Index is equal to
225 -- the first argument and False in the other cases.
226-- Raises NotDone if the construction algorithm didn't succeed.
227 -- It raises OutOfRange if Index is greater than the
228 -- number of solutions.
229raises OutOfRange, NotDone
230is static;
231
232
233fields
234
235 WellDone : Boolean from Standard;
236 ---Purpose: True if the algorithm succeeded.
237
238 NbrSol : Integer from Standard;
239 ---Purpose: The number of possible solutions. We have to decide about the
240 -- status of the multiple solutions...
241
242 cirsol : Array1OfCirc2d from TColgp;
243 ---Purpose : The solutions.
244
245 qualifier1 : Array1OfPosition from GccEnt;
246 -- The qualifiers of the first argument.
247
248 TheSame1 : Array1OfInteger from TColStd;
249 ---Purpose: 1 if the solution and the first argument are the same in the
250 -- tolerance of Tolerance.
251 -- 0 in the other cases.
252
253 pnttg1sol : Array1OfPnt2d from TColgp;
254 ---Purpose: The tangency point between the solution and the first
255 -- argument on the solution.
256
257 pntcen3 : Array1OfPnt2d from TColgp;
258 ---Purpose: The center point of the solution on the first argument.
259
260 par1sol : Array1OfReal from TColStd;
261 ---Purpose: The parameter of the tangency point between the solution
262 -- and the first argument on thesolution.
263
264 pararg1 : Array1OfReal from TColStd;
265 ---Purpose: The parameter of the tangency point between the solution
266 -- and the first argument on the first argument.
267
268 parcen3 : Array1OfReal from TColStd;
269 ---Purpose: The parameter of the center point of the solution on the
270 -- second argument.
271
272end Circ2dTanOnRad;
273