0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / GccAna / GccAna_Circ2dBisec.hxx
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
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _GccAna_Circ2dBisec_HeaderFile
18 #define _GccAna_Circ2dBisec_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26 #include <gp_Circ2d.hxx>
27 class Standard_OutOfRange;
28 class StdFail_NotDone;
29 class gp_Circ2d;
30 class GccInt_Bisec;
31
32
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 
44 {
45 public:
46
47   DEFINE_STANDARD_ALLOC
48
49   
50   //! Constructs bisecting curves between the two circles Circ1 and Circ2.
51   Standard_EXPORT GccAna_Circ2dBisec(const gp_Circ2d& Circ1, const gp_Circ2d& Circ2);
52   
53   //! This method returns True if the construction algorithm succeeded.
54   Standard_EXPORT Standard_Boolean IsDone() const;
55   
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;
59   
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
64   //! didn't succeed.
65   Standard_EXPORT Handle(GccInt_Bisec) ThisSolution (const Standard_Integer Index) const;
66
67
68
69
70 protected:
71
72
73
74
75
76 private:
77
78
79
80   Standard_Boolean WellDone;
81   Standard_Integer NbrSol;
82   Standard_Integer intersection;
83   Standard_Boolean sameradius;
84   gp_Circ2d circle1;
85   gp_Circ2d circle2;
86
87
88 };
89
90
91
92
93
94
95
96 #endif // _GccAna_Circ2dBisec_HeaderFile