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_CircLin2dBisec_HeaderFile |
18 | #define _GccAna_CircLin2dBisec_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 | #include <gp_Lin2d.hxx> |
28 | class Standard_OutOfRange; |
29 | class StdFail_NotDone; |
30 | class gp_Circ2d; |
31 | class gp_Lin2d; |
32 | class GccInt_Bisec; |
33 | |
34 | |
35 | //! Describes functions for building bisecting curves between a 2D line and a 2D circle. |
36 | //! A bisecting curve between a circle and a line is a curve |
37 | //! such that each of its points is at the same distance from |
38 | //! the circle and the line. It can be a parabola or a line, |
39 | //! depending of the relative position of the line and the |
40 | //! circle. The algorithm computes all the elementary curves which are solutions. |
41 | //! A CircLin2dBisec object provides a framework for: |
42 | //! - defining the construction of the bisecting curves, |
43 | //! - implementing the construction algorithm, and |
44 | //! - consulting the result. |
45 | class GccAna_CircLin2dBisec |
46 | { |
47 | public: |
48 | |
49 | DEFINE_STANDARD_ALLOC |
50 | |
51 | |
52 | //! Constructs bisecting curves between the circle Circle and the line Line. |
53 | Standard_EXPORT GccAna_CircLin2dBisec(const gp_Circ2d& Circle, const gp_Lin2d& Line); |
54 | |
55 | //! Returns true (this construction algorithm never fails). |
56 | Standard_EXPORT Standard_Boolean IsDone() const; |
57 | |
58 | |
59 | //! Returns the number of curves, representing solutions computed by this algorithm. |
60 | Standard_EXPORT Standard_Integer NbSolutions() const; |
61 | |
62 | //! Returns the solution number Index and raises OutOfRange |
63 | //! exception if Index is greater than the number of solutions |
64 | //! Exceptions |
65 | //! Standard_OutOfRange if Index is less than zero or |
66 | //! greater than the number of solutions computed by this algorithm. |
67 | Standard_EXPORT Handle(GccInt_Bisec) ThisSolution (const Standard_Integer Index) const; |
68 | |
69 | |
70 | |
71 | |
72 | protected: |
73 | |
74 | |
75 | |
76 | |
77 | |
78 | private: |
79 | |
80 | |
81 | |
82 | Standard_Boolean WellDone; |
83 | Standard_Integer NbrSol; |
84 | gp_Circ2d circle; |
85 | gp_Lin2d line; |
86 | |
87 | |
88 | }; |
89 | |
90 | |
91 | |
92 | |
93 | |
94 | |
95 | |
96 | #endif // _GccAna_CircLin2dBisec_HeaderFile |