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