0032603: Coding - get rid of unsused forward declarations
[occt.git] / src / BiTgte / BiTgte_CurveOnEdge.hxx
1 // Created on: 1997-01-10
2 // Created by: Bruno DUMORTIER
3 // Copyright (c) 1997-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 _BiTgte_CurveOnEdge_HeaderFile
18 #define _BiTgte_CurveOnEdge_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <TopoDS_Edge.hxx>
25 #include <GeomAbs_CurveType.hxx>
26 #include <gp_Circ.hxx>
27 #include <Adaptor3d_Curve.hxx>
28 #include <Standard_Real.hxx>
29 #include <GeomAbs_Shape.hxx>
30 #include <Standard_Integer.hxx>
31 #include <TColStd_Array1OfReal.hxx>
32 #include <Standard_Boolean.hxx>
33 class Geom_Curve;
34 class gp_Pnt;
35 class gp_Vec;
36 class gp_Lin;
37 class gp_Elips;
38 class gp_Hypr;
39 class gp_Parab;
40 class Geom_BezierCurve;
41 class Geom_BSplineCurve;
42
43 DEFINE_STANDARD_HANDLE(BiTgte_CurveOnEdge, Adaptor3d_Curve)
44
45 //! private class used  to create a filler rolling  on
46 //! an edge.
47 class BiTgte_CurveOnEdge  : public Adaptor3d_Curve
48 {
49   DEFINE_STANDARD_RTTIEXT(BiTgte_CurveOnEdge, Adaptor3d_Curve)
50 public:
51   
52   Standard_EXPORT BiTgte_CurveOnEdge();
53   
54   Standard_EXPORT BiTgte_CurveOnEdge(const TopoDS_Edge& EonF, const TopoDS_Edge& Edge);
55
56   //! Shallow copy of adaptor
57   Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE;
58   
59   Standard_EXPORT void Init (const TopoDS_Edge& EonF, const TopoDS_Edge& Edge);
60   
61   Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE;
62   
63   Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE;
64   
65   Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
66   
67   //! Returns  the number  of  intervals for  continuity
68   //! <S>. May be one if Continuity(me) >= <S>
69   Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
70   
71   //! Stores in <T> the  parameters bounding the intervals
72   //! of continuity <S>.
73   //!
74   //! The array must provide  enough room to  accommodate
75   //! for the parameters. i.e. T.Length() > NbIntervals()
76   Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
77   
78   //! Returns    a  curve equivalent   of  <me>  between
79   //! parameters <First>  and <Last>. <Tol>  is used  to
80   //! test for 3d points confusion.
81   //! If <First> >= <Last>
82   Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
83   
84   Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
85   
86   Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
87   
88   Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE;
89   
90   //! Computes the point of parameter U on the curve.
91   Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE;
92   
93   //! Computes the point of parameter U on the curve.
94   Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE;
95   
96   //! Computes the point of parameter U on the curve with its
97   //! first derivative.
98   //! Raised if the continuity of the current interval
99   //! is not C1.
100   Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE;
101   
102
103   //! Returns the point P of parameter U, the first and second
104   //! derivatives V1 and V2.
105   //! Raised if the continuity of the current interval
106   //! is not C2.
107   Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE;
108   
109
110   //! Returns the point P of parameter U, the first, the second
111   //! and the third derivative.
112   //! Raised if the continuity of the current interval
113   //! is not C3.
114   Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE;
115   
116
117   //! The returned vector gives the value of the derivative for the
118   //! order of derivation N.
119   //! Raised if the continuity of the current interval
120   //! is not CN.
121   //! Raised if N < 1.
122   Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
123   
124   //! Returns the parametric  resolution corresponding
125   //! to the real space resolution <R3d>.
126   Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE;
127   
128   //! Returns  the  type of the   curve  in the  current
129   //! interval :   Line,   Circle,   Ellipse, Hyperbola,
130   //! Parabola, BezierCurve, BSplineCurve, OtherCurve.
131   Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE;
132   
133   Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE;
134   
135   Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE;
136   
137   Standard_EXPORT gp_Elips Ellipse() const Standard_OVERRIDE;
138   
139   Standard_EXPORT gp_Hypr Hyperbola() const Standard_OVERRIDE;
140   
141   Standard_EXPORT gp_Parab Parabola() const Standard_OVERRIDE;
142   
143   Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE;
144   
145   Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
146   
147   Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE;
148   
149   Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE;
150   
151   Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE;
152   
153   Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE;
154
155 private:
156
157   TopoDS_Edge myEdge;
158   TopoDS_Edge myEonF;
159   Handle(Geom_Curve) myCurv;
160   Handle(Geom_Curve) myConF;
161   GeomAbs_CurveType myType;
162   gp_Circ myCirc;
163
164 };
165
166 #endif // _BiTgte_CurveOnEdge_HeaderFile