0027232: Configuration - fix mblen missing building issue on Android
[occt.git] / src / Bisector / Bisector_Bisec.hxx
1 // Created on: 1992-10-19
2 // Created by: Remi GILET
3 // Copyright (c) 1992-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 _Bisector_Bisec_HeaderFile
18 #define _Bisector_Bisec_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Real.hxx>
25 #include <GeomAbs_JoinType.hxx>
26 #include <Standard_Boolean.hxx>
27 class Geom2d_TrimmedCurve;
28 class Geom2d_Curve;
29 class gp_Pnt2d;
30 class gp_Vec2d;
31 class Geom2d_Point;
32
33
34 //! Bisec  provides the bisecting line between two  elements
35 //! This line is trimed by a point <P> and it's contained in the domain
36 //! defined by the two vectors <V1>, <V2> and <Sense>.
37 //!
38 //! Definition of  the domain:
39 //! if <Sense>  is  true the bisecting line is contained in the sector
40 //! defined by <-V1> and <-V2> in the sense indirect.
41 //! if <Sense>  is  false the bisecting line is contained in the sector
42 //! defined by <-V1> and <-V2> in the sense direct.
43 //!
44 //! <Tolerance> is used to define degenerate bisector.
45 //! if the bisector is an hyperbola and one of this radius is smaller
46 //! than <Tolerance>, the bisector is replaced by a line or semi_line
47 //! corresponding to one of hyperbola's axes.
48 //! if the bisector is a parabola on the focal length is smaller than
49 //! <Tolerance>, the bisector is replaced by a semi_line corresponding
50 //! to the axe of symetrie of the parabola.
51 //! if the bisector is an ellipse  and the minor radius is smaller than
52 //! <Tolerance>, the bisector is replaced by a segment corresponding
53 //! to the great axe of the ellipse.
54 class Bisector_Bisec 
55 {
56 public:
57
58   DEFINE_STANDARD_ALLOC
59
60   
61   Standard_EXPORT Bisector_Bisec();
62   
63   //! Performs  the bisecting line  between the  curves
64   //! <Cu1> and <Cu2>.
65   //! <oncurve> is True if the point <P> is common to <Cu1>
66   //! and <Cu2>.
67   Standard_EXPORT void Perform (const Handle(Geom2d_Curve)& Cu1, const Handle(Geom2d_Curve)& Cu2, const gp_Pnt2d& P, const gp_Vec2d& V1, const gp_Vec2d& V2, const Standard_Real Sense, const GeomAbs_JoinType ajointype, const Standard_Real Tolerance, const Standard_Boolean oncurve = Standard_True);
68   
69   //! Performs  the bisecting line  between the  curve
70   //! <Cu1> and the point <Pnt>.
71   //! <oncurve> is True if the point <P> is the point <Pnt>.
72   Standard_EXPORT void Perform (const Handle(Geom2d_Curve)& Cu, const Handle(Geom2d_Point)& Pnt, const gp_Pnt2d& P, const gp_Vec2d& V1, const gp_Vec2d& V2, const Standard_Real Sense, const Standard_Real Tolerance, const Standard_Boolean oncurve = Standard_True);
73   
74   //! Performs  the bisecting line  between the  curve
75   //! <Cu> and the point <Pnt>.
76   //! <oncurve> is True if the point <P> is the point <Pnt>.
77   Standard_EXPORT void Perform (const Handle(Geom2d_Point)& Pnt, const Handle(Geom2d_Curve)& Cu, const gp_Pnt2d& P, const gp_Vec2d& V1, const gp_Vec2d& V2, const Standard_Real Sense, const Standard_Real Tolerance, const Standard_Boolean oncurve = Standard_True);
78   
79   //! Performs  the bisecting line  between the two points
80   //! <Pnt1>  and <Pnt2>.
81   Standard_EXPORT void Perform (const Handle(Geom2d_Point)& Pnt1, const Handle(Geom2d_Point)& Pnt2, const gp_Pnt2d& P, const gp_Vec2d& V1, const gp_Vec2d& V2, const Standard_Real Sense, const Standard_Real Tolerance = 0.0, const Standard_Boolean oncurve = Standard_True);
82   
83   //! Returns the Curve of <me>.
84   Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& Value() const;
85   
86   //! Returns the Curve of <me>.
87   Standard_EXPORT const Handle(Geom2d_TrimmedCurve)& ChangeValue();
88
89
90
91
92 protected:
93
94
95
96
97
98 private:
99
100
101
102   Handle(Geom2d_TrimmedCurve) thebisector;
103
104
105 };
106
107
108
109
110
111
112
113 #endif // _Bisector_Bisec_HeaderFile