1 -- File: CircPnt2dBisec.cdl
2 -- Created: Wed Apr 3 11:29:37 1991
5 ---Copyright: Matra Datavision 1991
12 ---Purpose: Describes functions for building a bisecting curve
13 -- between a 2D circle and a point.
14 -- A bisecting curve between a circle and a point is such a
15 -- curve that each of its points is at the same distance from
16 -- the circle and the point. It can be an ellipse, hyperbola,
17 -- circle or line, depending on the relative position of the
18 -- point and the circle. The algorithm computes all the
19 -- elementary curves which are solutions.
20 -- A CircPnt2dBisec object provides a framework for:
21 -- - defining the construction of the bisecting curves,
22 -- - implementing the construction algorithm, and
23 -- - consulting the result.
30 raises OutOfRange from Standard,
35 Create(Circle1 : Circ2d from gp;
36 Point2 : Pnt2d from gp) returns CircPnt2dBisec;
38 ---Purpose: Constructs bisecting curves between the circle Circle1 and the point Point2.
40 IsDone(me) returns Boolean from Standard
42 ---Purpose: Returns true (this construction algorithm never fails).
44 NbSolutions(me) returns Integer from Standard
47 ---Purpose: Returns the number of curves, representing solutions computed by this algorithm.
50 Index : Integer from Standard) returns Bisec from GccInt
51 raises OutOfRange, NotDone
53 ---Purpose: Returns the solution number Index and raises OutOfRange
54 -- exception if Index is greater than the number of solutions.
56 -- Standard_OutOfRange if Index is less than zero or
57 -- greater than the number of solutions computed by this algorithm.
60 WellDone : Boolean from Standard;
61 ---Purpose: True if the algorithm succeeded.
63 NbrSol : Integer from Standard;
64 ---Purpose: The number of possible solutions. We have to decide about the
65 -- status of the multiple solutions...
67 circle : Circ2d from gp;
68 ---Purpose: The first argument used for ThisSolution.
70 point : Pnt2d from gp;
71 ---Purpose: The second argument used for ThisSolution.
73 theposition : Integer from Standard;
74 ---Purpose: theposition = 1 when the point is outside the circle.
75 -- theposition = 0 when the point is on the circle.
76 -- theposition = -1 when the point is inside the circle.