Test for 0022778: Bug in BRepMesh
[occt.git] / src / GccAna / GccAna_CircLin2dBisec.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 class CircLin2dBisec
23
24 from GccAna
25
26         ---Purpose: Describes functions for building bisecting curves between a 2D line and a 2D circle.
27         -- A bisecting curve between a circle and a line is a curve
28         -- such that each of its points is at the same distance from
29         -- the circle and the line. It can be a parabola or a line,
30         -- depending of the relative position of the line and the
31         -- circle. The algorithm computes all the elementary curves which are solutions.
32         -- A CircLin2dBisec object provides a framework for:
33         -- -   defining the construction of the bisecting curves,
34         -- -   implementing the construction algorithm, and
35         -- -   consulting the result.
36
37
38 uses Lin2d  from gp,
39      Circ2d from gp,
40      Bisec  from GccInt
41      
42 raises OutOfRange        from Standard,
43        NotDone           from StdFail
44        
45 is
46
47 Create(Circle  : Circ2d from gp;
48        Line    : Lin2d  from gp) returns CircLin2dBisec;
49
50         ---Purpose: Constructs bisecting curves between the circle Circle and the line Line. 
51
52 IsDone(me) returns Boolean from Standard
53 is static;
54
55         --- Purpose: Returns true (this construction algorithm never fails).
56         
57 NbSolutions(me) returns Integer from Standard
58 raises NotDone
59 is static;
60         ---Purpose:
61         -- Returns the number of curves, representing solutions computed by this algorithm.
62     
63 ThisSolution(me                           ; 
64              Index : Integer from Standard) returns Bisec from GccInt
65 raises OutOfRange, NotDone
66 is static;
67         ---Purpose : Returns the solution number Index and raises OutOfRange 
68         --         exception if Index is greater than the number of solutions 
69         --    Exceptions
70         -- Standard_OutOfRange if Index is less than zero or
71         -- greater than the number of solutions computed by this algorithm.
72
73 fields
74
75     WellDone : Boolean from Standard;
76         ---Purpose: True if the algorithm succeeded.
77
78     NbrSol   : Integer from Standard;
79         ---Purpose: The number of possible solutions. We have to decide about the
80         --          status of the multiple solutions...
81
82     circle   : Circ2d from gp;
83         ---Purpose: The first argument used for ThisSolution.
84
85     line   : Lin2d from gp;
86         ---Purpose: The second argument used for ThisSolution.
87
88 end CircLin2dBisec;