0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / GccAna / GccAna_CircPnt2dBisec.hxx
CommitLineData
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_CircPnt2dBisec_HeaderFile
18#define _GccAna_CircPnt2dBisec_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_Pnt2d.hxx>
28#include <Standard_Real.hxx>
29class Standard_OutOfRange;
30class StdFail_NotDone;
31class gp_Circ2d;
32class gp_Pnt2d;
33class GccInt_Bisec;
34
35
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.
48class GccAna_CircPnt2dBisec
49{
50public:
51
52 DEFINE_STANDARD_ALLOC
53
54
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);
57
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);
61
62 //! Returns true (this construction algorithm never fails).
63 Standard_EXPORT Standard_Boolean IsDone() const;
64
65 //! Returns the number of curves, representing solutions computed by this algorithm.
66 Standard_EXPORT Standard_Integer NbSolutions() const;
67
68 //! Returns the solution number Index and raises OutOfRange
69 //! exception if Index is greater than the number of solutions.
70 //! Exceptions
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;
74
75
76
77
78protected:
79
80
81
82
83
84private:
85
86
87 //! Defines the number and the type of solutions
88 //! depending on input data
89 Standard_EXPORT void DefineSolutions();
90
91
92 Standard_Boolean WellDone;
93 Standard_Integer NbrSol;
94 gp_Circ2d circle;
95 gp_Pnt2d point;
96 Standard_Integer theposition;
97 Standard_Real myTolerance;
98
99
100};
101
102
103
104
105
106
107
108#endif // _GccAna_CircPnt2dBisec_HeaderFile