Test for 0022778: Bug in BRepMesh
[occt.git] / src / GccAna / GccAna_Lin2dTanObl.cdl
1 -- Created on: 1991-04-03
2 -- Created by: Remi GILET
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
21
22
23 class Lin2dTanObl
24
25 from GccAna
26
27         ---Purpose: This class implements the algorithms used to 
28         --          create 2d line tangent to a circle or a point and 
29         --          making an angle with a line.
30         --          The angle is in radians.
31         --          The origin of the solution is the tangency point
32         --          with the first argument.
33         --          Its direction is making an angle Angle with the 
34         --          second argument.
35
36 --inherits Storable from Standard
37
38 uses Lin2d            from gp, 
39      Pnt2d            from gp, 
40      QualifiedCirc    from GccEnt,
41      Array1OfReal     from TColStd,
42      Array1OfLin2d    from TColgp,
43      Array1OfPnt2d    from TColgp,
44      Position         from GccEnt,
45      Array1OfPosition from GccEnt
46
47 raises OutOfRange        from Standard,
48        BadQualifier      from GccEnt,
49        NotDone           from StdFail
50
51 is
52
53 ---------------------------------------------------------------------------
54
55 Create (ThePoint  : Pnt2d from gp      ;
56         TheLine   : Lin2d from gp      ;
57         TheAngle  : Real  from Standard) returns Lin2dTanObl;
58         ---Purpose: This class implements the algorithms used to 
59         --          create 2d line passing through a point and 
60         --          making an angle with a line.
61
62 Create (Qualified1 : QualifiedCirc from GccEnt  ;
63         TheLine    : Lin2d         from gp      ;
64         TheAngle   : Real          from Standard) returns Lin2dTanObl 
65 raises BadQualifier;
66         ---Purpose: This class implements the algorithms used to 
67         --          create 2d line tangent to a circle and 
68         --          making an angle with a line.
69         --          Exceptions
70         --          GccEnt_BadQualifier if a qualifier is inconsistent with
71         --          the argument it qualifies (for example, enclosed for a circle).
72
73 IsDone(me) returns Boolean from Standard
74 is static;
75         ---Purpose : Returns True if the algorithm succeeded.
76         --           Note: IsDone protects against a failure arising from a
77         --           more internal intersection algorithm, which has reached
78         --           its numeric limits.
79     
80 NbSolutions(me) returns Integer from Standard
81         ---Purpose : Returns the number of  of lines, representing solutions computed by this algorithm.
82         --           Raises NotDone if the construction algorithm didn't succeed.
83
84 raises NotDone
85 is static;
86   
87 ThisSolution(me                           ;
88              Index : Integer from Standard) returns Lin2d 
89         ---Purpose: Returns the solution number Index.
90         --          Be careful: the Index is only a way to get all the 
91         --          solutions, but is not associated to theses outside the 
92         --          context of the algorithm-object.
93         -- raises NotDone if the construction algorithm didn't succeed.
94         --          It raises OutOfRange if Index is greater than the   number of solutions.
95 raises OutOfRange, NotDone
96 is static;
97  
98 WhichQualifier(me                                  ;
99                Index   :     Integer  from Standard;
100                Qualif1 : out Position from GccEnt  )
101 raises OutOfRange, NotDone
102 is static;
103         ---Purpose: Returns the qualifier Qualif1 of the tangency argument
104         -- for the solution of index Index computed by this algorithm.
105         -- The returned qualifier is:
106         -- -   that specified at the start of construction when the
107         --   solutions are defined as enclosing or outside with
108         --   respect to the argument, or
109         -- -   that computed during construction (i.e. enclosing or
110         --   outside) when the solutions are defined as unqualified
111         --   with respect to the argument, or
112         -- -   GccEnt_noqualifier if the tangency argument is a point.
113         --  Exceptions
114         -- Standard_OutOfRange if Index is less than zero or
115         -- greater than the number of solutions computed by this algorithm.
116         -- StdFail_NotDone if the construction fails. 
117
118 Tangency1(me                                     ;
119           Index         : Integer   from Standard;
120           ParSol,ParArg : out Real  from Standard;
121           PntSol        : out Pnt2d from gp      )
122         ---Purpose : Returns informations about the tangency point between the 
123         --           result number Index and the first argument.
124         --           ParSol is the intrinsic parameter of the point ParSol on 
125         --           the solution curv.
126         --           ParArg is the intrinsic parameter of the point ParArg on 
127         --           the argument curv. Raises NotDone if the construction algorithm 
128         --          didn't succeed.
129         --          It raises OutOfRange if Index is greater than the  number of solutions.
130 raises OutOfRange, NotDone
131 is static;
132   
133
134 Intersection2 (me                                     ;
135                Index         : Integer   from Standard;
136                ParSol,ParArg : out Real  from Standard;
137                PntSol        : out Pnt2d from gp      )
138         ---Purpose : Returns informations about the intersection between the
139         --           result number Index and the third argument.
140         -- Raises NotDone if the construction algorithm  didn't succeed.
141         --          It raises OutOfRange if Index is greater than the number of solutions.
142 raises OutOfRange, NotDone
143 is static;
144   
145 fields
146
147     WellDone : Boolean from Standard;
148         ---Purpose : True if the algorithm succeeded.
149
150     NbrSol   : Integer from Standard;
151         ---Purpose : The number of possible solutions. We have to decide about the
152         --           status of the multiple solutions...
153
154     linsol   : Array1OfLin2d from TColgp;
155         ---Purpose : The solutions.
156
157     qualifier1 : Array1OfPosition from GccEnt;
158         ---Purpose: The qualifiers of the first argument.
159
160     pnttg1sol   : Array1OfPnt2d from TColgp;
161         ---Purpose: The tangency point between the solution and the first argument on 
162         -- the solution.
163
164     pntint2sol   : Array1OfPnt2d from TColgp;
165         ---Purpose: The tangency point between the solution and the second argument on 
166         -- the solution.
167
168     par1sol   : Array1OfReal from TColStd;
169         ---Purpose: The parameter of the tangency point between the solution and the 
170         -- first argument on the solution.
171
172     par2sol   : Array1OfReal from TColStd;
173         ---Purpose: The parameter of the tangency point between the solution and the 
174         -- second argument on the solution.
175
176     pararg1   : Array1OfReal from TColStd;
177         ---Purpose: The parameter of the tangency point between the solution and the first 
178         -- argument on the first argument.
179
180     pararg2   : Array1OfReal from TColStd;
181         ---Purpose: The parameter of the tangency point between the solution and the second
182         -- argument on the second argument.
183
184 end Lin2dTanObl;
185