0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / Adaptor2d / Adaptor2d_HCurve2d.hxx
1 // Created on: 1994-02-23
2 // Created by: model
3 // Copyright (c) 1994-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 _Adaptor2d_HCurve2d_HeaderFile
18 #define _Adaptor2d_HCurve2d_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <MMgt_TShared.hxx>
24 #include <Standard_Real.hxx>
25 #include <GeomAbs_Shape.hxx>
26 #include <Standard_Integer.hxx>
27 #include <TColStd_Array1OfReal.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <gp_Pnt2d.hxx>
30 #include <gp_Vec2d.hxx>
31 #include <GeomAbs_CurveType.hxx>
32 #include <gp_Lin2d.hxx>
33 #include <gp_Circ2d.hxx>
34 #include <gp_Elips2d.hxx>
35 #include <gp_Hypr2d.hxx>
36 #include <gp_Parab2d.hxx>
37 class Standard_OutOfRange;
38 class Standard_NoSuchObject;
39 class Standard_DomainError;
40 class Standard_NotImplemented;
41 class Adaptor2d_Curve2d;
42 class gp_Pnt2d;
43 class gp_Vec2d;
44 class Geom2d_BezierCurve;
45 class Geom2d_BSplineCurve;
46
47
48 class Adaptor2d_HCurve2d;
49 DEFINE_STANDARD_HANDLE(Adaptor2d_HCurve2d, MMgt_TShared)
50
51 //! Root class for 2D curves manipulated by handles, on
52 //! which geometric algorithms work.
53 //! An adapted curve is an interface between the
54 //! services provided by a curve, and those required of
55 //! the curve by algorithms, which use it.
56 //! A derived specific class is provided:
57 //! Geom2dAdaptor_HCurve for a curve from the Geom2d package.
58 class Adaptor2d_HCurve2d : public MMgt_TShared
59 {
60
61 public:
62
63   
64   //! Returns a reference to the Curve2d inside the HCurve2d.
65   Standard_EXPORT virtual const Adaptor2d_Curve2d& Curve2d() const = 0;
66   
67     Standard_Real FirstParameter() const;
68   
69     Standard_Real LastParameter() const;
70   
71     GeomAbs_Shape Continuity() const;
72   
73     Standard_Integer NbIntervals (const GeomAbs_Shape S) const;
74   
75     void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
76   
77   //! If <First> >= <Last>
78     Handle(Adaptor2d_HCurve2d) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
79   
80     Standard_Boolean IsClosed() const;
81   
82     Standard_Boolean IsPeriodic() const;
83   
84     Standard_Real Period() const;
85   
86     gp_Pnt2d Value (const Standard_Real U) const;
87   
88     void D0 (const Standard_Real U, gp_Pnt2d& P) const;
89   
90     void D1 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V) const;
91   
92     void D2 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2) const;
93   
94     void D3 (const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3) const;
95   
96     gp_Vec2d DN (const Standard_Real U, const Standard_Integer N) const;
97   
98     Standard_Real Resolution (const Standard_Real R3d) const;
99   
100     GeomAbs_CurveType GetType() const;
101   
102     gp_Lin2d Line() const;
103   
104     gp_Circ2d Circle() const;
105   
106     gp_Elips2d Ellipse() const;
107   
108     gp_Hypr2d Hyperbola() const;
109   
110     gp_Parab2d Parabola() const;
111   
112     Standard_Integer Degree() const;
113   
114     Standard_Boolean IsRational() const;
115   
116     Standard_Integer NbPoles() const;
117   
118     Standard_Integer NbKnots() const;
119   
120     Handle(Geom2d_BezierCurve) Bezier() const;
121   
122     virtual Handle(Geom2d_BSplineCurve) BSpline() const;
123
124
125
126
127   DEFINE_STANDARD_RTTI(Adaptor2d_HCurve2d,MMgt_TShared)
128
129 protected:
130
131
132
133
134 private:
135
136
137
138
139 };
140
141
142 #include <Adaptor2d_HCurve2d.lxx>
143
144
145
146
147
148 #endif // _Adaptor2d_HCurve2d_HeaderFile