1 -- Created on: 1991-03-28
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 Circ2dTanCen from GccGeo
19 TheCurveTool as any; -- as CurveTool(TheCurve) from GccInt
20 TheExtPC as any; -- as ExtPC(TheCurve,TheCurveTool) from Extrema
21 TheQualifiedCurve as any) -- as QCurve from GccInt
24 ---Purpose: This class implements the algorithms used to
25 -- create 2d circles tangent to a curve and
26 -- centered on a point.
27 -- The arguments of all construction methods are :
28 -- - The qualified element for the tangency constrains
30 -- -The center point Pcenter.
31 -- - A real Tolerance.
32 -- Tolerance is only used in the limits cases.
34 -- We want to create a circle tangent to an EnclosedCurv C1
35 -- with a tolerance Tolerance.
36 -- If we did not use Tolerance it is impossible to
37 -- find a solution in the following case : Pcenter is
39 -- With Tolerance we will give a solution if the distance
40 -- between C1 and Pcenter is lower than or equal Tolerance/2.
42 -- inherits Entity from Standard
46 Array1OfCirc2d from TColgp,
47 Array1OfPnt2d from TColgp,
48 Array1OfReal from TColStd,
49 Array1OfInteger from TColStd,
51 Array1OfPosition from GccEnt
53 raises OutOfRange from Standard,
54 BadQualifier from GccEnt,
59 Create( Qualified1 : TheQualifiedCurve ;
60 Pcenter : Pnt2d from gp ;
61 Tolerance : Real from Standard) returns Circ2dTanCen
62 ---Purpose: This method implements the algorithms used to
63 -- create 2d circles tangent to a circle and
64 -- centered on a point.
67 -- -- ....................................................................
69 IsDone(me) returns Boolean from Standard
71 ---Purpose: This method returns True if the construction
72 -- algorithm succeeded.
74 NbSolutions(me) returns Integer from Standard
75 ---Purpose: Returns the number of solutions and raises NotDone
76 -- exception if the algorithm didn't succeed.
79 ---Purpose: It raises NotDone if the construction algorithm
83 Index : Integer from Standard) returns Circ2d from gp
84 ---Purpose: Returns the solution number Index and raises OutOfRange
85 -- exception if Index is greater than the number of solutions.
86 -- Be carefull: the Index is only a way to get all the
87 -- solutions, but is not associated to theses outside the
88 -- context of the algorithm-object.
89 raises OutOfRange, NotDone
91 ---Purpose: It raises NotDone if the construction algorithm
93 -- It raises OutOfRange if Index is greater than the
94 -- number of solutions or less than zero.
97 Index : Integer from Standard;
98 Qualif1 : out Position from GccEnt )
99 raises OutOfRange, NotDone
101 -- It returns the informations about the qualifiers of the tangency
102 -- arguments concerning the solution number Index.
103 -- It returns the real qualifiers (the qualifiers given to the
104 -- constructor method in case of enclosed, enclosing and outside
105 -- and the qualifiers computedin case of unqualified).
108 Index : Integer from Standard;
109 ParSol,ParArg : out Real from Standard;
110 PntSol : out Pnt2d from gp )
111 ---Purpose: Returns informations about the tangency point between the
112 -- result number Index and the first argument.
113 -- ParSol is the intrinsic parameter of the point PntSol
114 -- on the solution curv.
115 -- ParArg is the intrinsic parameter of the point PntArg
116 -- on the argument curv.
117 raises OutOfRange, NotDone
119 ---Purpose: It raises NotDone if the construction algorithm
121 -- It raises OutOfRange if Index is greater than the
122 -- number of solutions or less than zero.
126 WellDone : Boolean from Standard;
127 -- True if the algorithm succeeded.
129 NbrSol : Integer from Standard;
130 -- The number of possible solutions. We have to decide about the
131 -- status of the multiple solutions...
133 cirsol : Array1OfCirc2d from TColgp;
134 ---Purpose : The solutions.
136 qualifier1 : Array1OfPosition from GccEnt;
137 -- The qualifiers of the first argument.
139 pnttg1sol : Array1OfPnt2d from TColgp;
140 -- The tangency point between the solution and the first argument on
143 par1sol : Array1OfReal from TColStd;
144 -- The parameter of the tangency point between the solution and the
145 -- first argument on the solution.
147 pararg1 : Array1OfReal from TColStd;
148 -- The parameter of the tangency point between the solution and the first
149 -- argument on the first argument.