0024510: Remove unused local variables
[occt.git] / src / GccAna / GccAna_Lin2dTanPer.cdl
CommitLineData
b311480e 1-- Created on: 1991-04-03
2-- Created by: Remi GILET
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 Lin2dTanPer
18
19from GccAna
20
21 ---Purpose: This class implements the algorithms used to
22 -- create 2d lines tangent to a circle or a point and
23 -- perpendicular to a line or a circle.
24 -- Describes functions for building a 2D line perpendicular
25 -- to a line and:
26 -- - tangential to a circle, or
27 -- - passing through a point.
28 -- A Lin2dTanPer object provides a framework for:
29 -- - defining the construction of 2D line(s),
30 -- - implementing the construction algorithm, and
31 -- - consulting the result(s).
32
33--inherits Storable from Standard
34
35uses Pnt2d from gp,
36 Lin2d from gp,
37 Circ2d from gp,
38 QualifiedCirc from GccEnt,
39 Array1OfReal from TColStd,
40 Array1OfLin2d from TColgp,
41 Array1OfPnt2d from TColgp,
42 Position from GccEnt,
43 Array1OfPosition from GccEnt
44
45raises BadQualifier from GccEnt,
46 OutOfRange from Standard,
47 ConstructionError from Standard,
48 NotDone from StdFail
49
50is
51
52Create(ThePnt : Pnt2d from gp;
53 TheLin : Lin2d from gp) returns Lin2dTanPer;
54 ---Purpose: This method implements the algorithms used to
55 -- create 2d lines passing through a point and
56 -- perpendicular to a line.
57
58Create(ThePnt : Pnt2d from gp;
59 TheCircle : Circ2d from gp) returns Lin2dTanPer
60raises ConstructionError;
61 ---Purpose: This method implements the algorithms used to
62 -- create 2d lines passing through a point and
63 -- perpendicular to a circle.
64
65Create(Qualified1 : QualifiedCirc from GccEnt;
66 TheLin : Lin2d from gp ) returns Lin2dTanPer
67raises BadQualifier;
68-- Raises BadQualifier in case of EnclosedCirc.
69 ---Purpose: This method implements the algorithms used to
70 -- create 2d lines tangent to a circle and
71 -- perpendicular to a line.
72
73Create(Qualified1 : QualifiedCirc from GccEnt;
74 TheCircle : Circ2d from gp ) returns Lin2dTanPer
75raises BadQualifier,ConstructionError;
76-- Raises BadQualifier in case of EnclosedCirc.
77 ---Purpose: This method implements the algorithms used to
78 -- create 2d lines tangent to a circle and
79 -- perpendicular to a circle.
80
81-- .........................................................................
82
83IsDone(me) returns Boolean from Standard
84is static;
85 ---Purpose : Returns True if the algorithm succeeded.
86
87NbSolutions(me) returns Integer from Standard
88 ---Purpose : Returns the number of solutions.
89 -- Raises NotDone if the construction algorithm didn't succeed.
90raises NotDone
91is static;
92
93
94WhichQualifier(me ;
95 Index : Integer from Standard;
96 Qualif1 : out Position from GccEnt )
97raises OutOfRange, NotDone
98is static;
99 ---Purpose: Returns the qualifier Qualif1 of the tangency argument
100 -- for the solution of index Index computed by this algorithm.
101 -- The returned qualifier is:
102 -- - that specified at the start of construction when the
103 -- solutions are defined as enclosing or outside with
104 -- respect to the argument, or
105 -- - that computed during construction (i.e. enclosing or
106 -- outside) when the solutions are defined as unqualified
107 -- with respect to the argument, or
108 -- - GccEnt_noqualifier if the tangency argument is a point.
109 -- Exceptions
110 -- Standard_OutOfRange if Index is less than zero or
111 -- greater than the number of solutions computed by this algorithm.
112 -- StdFail_NotDone if the construction fails.
113
114ThisSolution(me ;
115 Index : Integer from Standard) returns Lin2d from gp
116 ---Purpose : Returns the solution number Index and raises OutOfRange
117 -- exception if Index is greater than the number of solutions.
118 -- Be careful: the Index is only a way to get all the
119 -- solutions, but is not associated to those outside the
120 -- context of the algorithm-object.
121 -- Raises NotDone if the construction algorithm
122 -- didn't succeed.
123 -- It raises OutOfRange if Index is greater than the
124 -- number of solutions.
125raises OutOfRange, NotDone
126is static;
127
128Tangency1(me ;
129 Index : Integer from Standard;
130 ParSol,ParArg : out Real from Standard;
131 Pnt : out Pnt2d from gp )
132 ---Purpose : Returns informations about the tangency point between the
133 -- result number Index and the first argument.
134 -- ParSol is the intrinsic parameter of the point on the
135 -- solution curv.
136 -- ParArg is the intrinsic parameter of the point on the
137 -- argument curv.
138 -- If the first argument is a point ParArg is equal zero.
139 -- raises NotDone if the construction algorithm didn't succeed.
140 -- It raises OutOfRange if Index is greater than the
141 -- number of solutions.
142raises OutOfRange, NotDone
143is static;
144
145
146Intersection2 (me ;
147 Index : Integer from Standard;
148 ParSol,ParArg : out Real from Standard;
149 PntSol : out Pnt2d from gp )
150 ---Purpose : Returns informations about the intersection between the
151 -- solution number Index and the second argument.
152 -- It returns the first intersection in a case of
153 -- Lin2dTanPer which is perpendicular to a circle .
154 -- ParSol is the intrinsic parameter of the point on the
155 -- solution curv.
156 -- ParArg is the intrinsic parameter of the point on the
157 -- argument curv. Raises NotDone if the construction algorithm
158 -- didn't succeed.
159 -- It raises OutOfRange if Index is greater than the
160 -- number of solutions.
161
162raises OutOfRange, NotDone
163is static;
164
165
166fields
167
168 WellDone : Boolean from Standard;
169 ---Purpose: True if the algorithm succeeded.
170
171 NbrSol : Integer from Standard;
172 ---Purpose: The number of possible solutions. We have to decide
173 -- about the status of the multiple solutions...
174
175 linsol : Array1OfLin2d from TColgp;
176 ---Purpose: The solutions.
177
178 qualifier1 : Array1OfPosition from GccEnt;
179 ---Purpose: The qualifiers of the first argument.
180
181 pnttg1sol : Array1OfPnt2d from TColgp;
182 ---Purpose: The tangency point between the solution and the first
183 -- argument on the solution.
184
185 pntint2sol : Array1OfPnt2d from TColgp;
186 ---Purpose: The tangency point between the solution and the second
187 -- argument on the solution.
188
189 par1sol : Array1OfReal from TColStd;
190 ---Purpose: The parameter of the tangency point between the solution
191 -- and the first argument on the solution.
192
193 par2sol : Array1OfReal from TColStd;
194 ---Purpose: The parameter of the tangency point between the solution
195 -- and the second argument on the solution.
196
197 pararg1 : Array1OfReal from TColStd;
198 ---Purpose: The parameter of the tangency point between the solution
199 -- and the first argument on the first argument.
200
201 pararg2 : Array1OfReal from TColStd;
202 ---Purpose: The parameter of the tangency point between the solution
203 -- and the second argument on the second argument.
204
205end Lin2dTanPer;
206