1 // Created on: 1991-04-03
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 #ifndef _GccAna_CircPnt2dBisec_HeaderFile
18 #define _GccAna_CircPnt2dBisec_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26 #include <gp_Circ2d.hxx>
27 #include <gp_Pnt2d.hxx>
28 #include <Standard_Real.hxx>
29 class Standard_OutOfRange;
30 class StdFail_NotDone;
36 //! Describes functions for building a bisecting curve
37 //! between a 2D circle and a point.
38 //! A bisecting curve between a circle and a point is such a
39 //! curve that each of its points is at the same distance from
40 //! the circle and the point. It can be an ellipse, hyperbola,
41 //! circle or line, depending on the relative position of the
42 //! point and the circle. The algorithm computes all the
43 //! elementary curves which are solutions.
44 //! A CircPnt2dBisec object provides a framework for:
45 //! - defining the construction of the bisecting curves,
46 //! - implementing the construction algorithm, and
47 //! - consulting the result.
48 class GccAna_CircPnt2dBisec
55 //! Constructs bisecting curves between the circle Circle1 and the point Point2.
56 Standard_EXPORT GccAna_CircPnt2dBisec(const gp_Circ2d& Circle1, const gp_Pnt2d& Point2);
58 //! Constructs bisecting curves between the circle Circle1 and the point Point2.
59 //! Tolerance is used.
60 Standard_EXPORT GccAna_CircPnt2dBisec(const gp_Circ2d& Circle1, const gp_Pnt2d& Point2, const Standard_Real Tolerance);
62 //! Returns true (this construction algorithm never fails).
63 Standard_EXPORT Standard_Boolean IsDone() const;
65 //! Returns the number of curves, representing solutions computed by this algorithm.
66 Standard_EXPORT Standard_Integer NbSolutions() const;
68 //! Returns the solution number Index and raises OutOfRange
69 //! exception if Index is greater than the number of solutions.
71 //! Standard_OutOfRange if Index is less than zero or
72 //! greater than the number of solutions computed by this algorithm.
73 Standard_EXPORT Handle(GccInt_Bisec) ThisSolution (const Standard_Integer Index) const;
87 //! Defines the number and the type of solutions
88 //! depending on input data
89 Standard_EXPORT void DefineSolutions();
92 Standard_Boolean WellDone;
93 Standard_Integer NbrSol;
96 Standard_Integer theposition;
97 Standard_Real myTolerance;
108 #endif // _GccAna_CircPnt2dBisec_HeaderFile