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_Circ2dBisec_HeaderFile
18 #define _GccAna_Circ2dBisec_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 class Standard_OutOfRange;
28 class StdFail_NotDone;
33 //! This class describes functions for building bisecting curves between two 2D circles.
34 //! A bisecting curve between two circles is a curve such
35 //! that each of its points is at the same distance from the
36 //! two circles. It can be an ellipse, hyperbola, circle or line,
37 //! depending on the relative position of the two circles.
38 //! The algorithm computes all the elementary curves which
39 //! are solutions. There is no solution if the two circles are coincident.
40 //! A Circ2dBisec object provides a framework for:
41 //! - defining the construction of the bisecting curves,
42 //! - implementing the construction algorithm, and consulting the result.
43 class GccAna_Circ2dBisec
50 //! Constructs bisecting curves between the two circles Circ1 and Circ2.
51 Standard_EXPORT GccAna_Circ2dBisec(const gp_Circ2d& Circ1, const gp_Circ2d& Circ2);
53 //! This method returns True if the construction algorithm succeeded.
54 Standard_EXPORT Standard_Boolean IsDone() const;
56 //! This method returns the number of solutions.
57 //! Raises NotDone if the construction algorithm didn't succeed.
58 Standard_EXPORT Standard_Integer NbSolutions() const;
60 //! Returns the solution number Index
61 //! Raises OutOfRange exception if Index is greater than
62 //! the number of solutions.
63 //! It raises NotDone if the construction algorithm
65 Standard_EXPORT Handle(GccInt_Bisec) ThisSolution (const Standard_Integer Index) const;
80 Standard_Boolean WellDone;
81 Standard_Integer NbrSol;
82 Standard_Integer intersection;
83 Standard_Boolean sameradius;
96 #endif // _GccAna_Circ2dBisec_HeaderFile