42cf5bc1 |
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> |
42cf5bc1 |
27 | class GccInt_Bisec; |
28 | |
29 | |
30 | //! This class describes functions for building bisecting curves between two 2D circles. |
31 | //! A bisecting curve between two circles is a curve such |
32 | //! that each of its points is at the same distance from the |
33 | //! two circles. It can be an ellipse, hyperbola, circle or line, |
34 | //! depending on the relative position of the two circles. |
35 | //! The algorithm computes all the elementary curves which |
36 | //! are solutions. There is no solution if the two circles are coincident. |
37 | //! A Circ2dBisec object provides a framework for: |
38 | //! - defining the construction of the bisecting curves, |
39 | //! - implementing the construction algorithm, and consulting the result. |
40 | class GccAna_Circ2dBisec |
41 | { |
42 | public: |
43 | |
44 | DEFINE_STANDARD_ALLOC |
45 | |
46 | |
47 | //! Constructs bisecting curves between the two circles Circ1 and Circ2. |
48 | Standard_EXPORT GccAna_Circ2dBisec(const gp_Circ2d& Circ1, const gp_Circ2d& Circ2); |
49 | |
50 | //! This method returns True if the construction algorithm succeeded. |
51 | Standard_EXPORT Standard_Boolean IsDone() const; |
52 | |
53 | //! This method returns the number of solutions. |
54 | //! Raises NotDone if the construction algorithm didn't succeed. |
55 | Standard_EXPORT Standard_Integer NbSolutions() const; |
56 | |
57 | //! Returns the solution number Index |
58 | //! Raises OutOfRange exception if Index is greater than |
59 | //! the number of solutions. |
60 | //! It raises NotDone if the construction algorithm |
61 | //! didn't succeed. |
62 | Standard_EXPORT Handle(GccInt_Bisec) ThisSolution (const Standard_Integer Index) const; |
63 | |
64 | |
65 | |
66 | |
67 | protected: |
68 | |
69 | |
70 | |
71 | |
72 | |
73 | private: |
74 | |
75 | |
76 | |
77 | Standard_Boolean WellDone; |
78 | Standard_Integer NbrSol; |
79 | Standard_Integer intersection; |
80 | Standard_Boolean sameradius; |
81 | gp_Circ2d circle1; |
82 | gp_Circ2d circle2; |
83 | |
84 | |
85 | }; |
86 | |
87 | |
88 | |
89 | |
90 | |
91 | |
92 | |
93 | #endif // _GccAna_Circ2dBisec_HeaderFile |