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 class Circ2dTanCenGeo from Geom2dGcc
19 ---Purpose: This class implements the algorithms used to
20 -- create 2d circles tangent to a curve and
21 -- centered on a point.
22 -- The arguments of all construction methods are :
23 -- - The qualified element for the tangency constrains
25 -- -The center point Pcenter.
26 -- - A real Tolerance.
27 -- Tolerance is only used in the limits cases.
29 -- We want to create a circle tangent to an EnclosedCurv C1
30 -- with a tolerance Tolerance.
31 -- If we did not use Tolerance it is impossible to
32 -- find a solution in the following case : Pcenter is
34 -- With Tolerance we will give a solution if the distance
35 -- between C1 and Pcenter is lower than or equal Tolerance/2.
37 -- inherits Entity from Standard
41 Array1OfCirc2d from TColgp,
42 Array1OfPnt2d from TColgp,
43 Array1OfReal from TColStd,
44 Array1OfInteger from TColStd,
46 Array1OfPosition from GccEnt,
47 Curve from Geom2dAdaptor,
48 CurveTool from Geom2dGcc,
52 raises OutOfRange from Standard,
53 BadQualifier from GccEnt,
58 Create( Qualified1 : QCurve from Geom2dGcc;
59 Pcenter : Pnt2d from gp;
60 Tolerance : Real from Standard) returns Circ2dTanCenGeo
61 ---Purpose: This method implements the algorithms used to
62 -- create 2d circles tangent to a circle and
63 -- centered on a point.
66 -- -- ....................................................................
68 IsDone(me) returns Boolean from Standard
70 ---Purpose: This method returns True if the construction
71 -- algorithm succeeded.
73 NbSolutions(me) returns Integer from Standard
74 ---Purpose: Returns the number of solutions and raises NotDone
75 -- exception if the algorithm didn't succeed.
78 ---Purpose: It raises NotDone if the construction algorithm
82 Index : Integer from Standard) returns Circ2d from gp
83 ---Purpose: Returns the solution number Index and raises OutOfRange
84 -- exception if Index is greater than the number of solutions.
85 -- Be carefull: the Index is only a way to get all the
86 -- solutions, but is not associated to theses outside the
87 -- context of the algorithm-object.
88 raises OutOfRange, NotDone
90 ---Purpose: It raises NotDone if the construction algorithm
92 -- It raises OutOfRange if Index is greater than the
93 -- number of solutions or less than zero.
96 Index : Integer from Standard;
97 Qualif1 : out Position from GccEnt )
98 raises OutOfRange, NotDone
100 -- It returns the informations about the qualifiers of the tangency
101 -- arguments concerning the solution number Index.
102 -- It returns the real qualifiers (the qualifiers given to the
103 -- constructor method in case of enclosed, enclosing and outside
104 -- and the qualifiers computedin case of unqualified).
107 Index : Integer from Standard;
108 ParSol,ParArg : out Real from Standard;
109 PntSol : out Pnt2d from gp )
110 ---Purpose: Returns informations about the tangency point between the
111 -- result number Index and the first argument.
112 -- ParSol is the intrinsic parameter of the point PntSol
113 -- on the solution curv.
114 -- ParArg is the intrinsic parameter of the point PntArg
115 -- on the argument curv.
116 raises OutOfRange, NotDone
118 ---Purpose: It raises NotDone if the construction algorithm
120 -- It raises OutOfRange if Index is greater than the
121 -- number of solutions or less than zero.
125 WellDone : Boolean from Standard;
126 -- True if the algorithm succeeded.
128 NbrSol : Integer from Standard;
129 -- The number of possible solutions. We have to decide about the
130 -- status of the multiple solutions...
132 cirsol : Array1OfCirc2d from TColgp;
133 ---Purpose : The solutions.
135 qualifier1 : Array1OfPosition from GccEnt;
136 -- The qualifiers of the first argument.
138 pnttg1sol : Array1OfPnt2d from TColgp;
139 -- The tangency point between the solution and the first argument on
142 par1sol : Array1OfReal from TColStd;
143 -- The parameter of the tangency point between the solution and the
144 -- first argument on the solution.
146 pararg1 : Array1OfReal from TColStd;
147 -- The parameter of the tangency point between the solution and the first
148 -- argument on the first argument.