1 // Created on: 1998-02-26
2 // Created by: Roman BORISOV
3 // Copyright (c) 1998-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _GeomFill_SnglrFunc_HeaderFile
18 #define _GeomFill_SnglrFunc_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Real.hxx>
25 #include <Adaptor3d_Curve.hxx>
26 #include <Standard_Integer.hxx>
27 #include <GeomAbs_Shape.hxx>
28 #include <TColStd_Array1OfReal.hxx>
29 #include <Standard_Boolean.hxx>
30 #include <GeomAbs_CurveType.hxx>
31 class Adaptor3d_HCurve;
32 class Standard_OutOfRange;
33 class Standard_DomainError;
38 //! to represent function C'(t)^C''(t)
39 class GeomFill_SnglrFunc : public Adaptor3d_Curve
46 Standard_EXPORT GeomFill_SnglrFunc(const Handle(Adaptor3d_HCurve)& HC);
48 Standard_EXPORT void SetRatio (const Standard_Real Ratio);
50 Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE;
52 Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE;
54 //! Returns the number of intervals for continuity
55 //! <S>. May be one if Continuity(me) >= <S>
56 Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
58 //! Stores in <T> the parameters bounding the intervals
59 //! of continuity <S>.
61 //! The array must provide enough room to accomodate
62 //! for the parameters. i.e. T.Length() > NbIntervals()
63 Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
65 //! Computes the point of parameter U on the curve.
66 Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE;
68 Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
70 Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE;
72 //! Computes the point of parameter U on the curve.
73 Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE;
75 //! Computes the point of parameter U on the curve with its
77 //! Raised if the continuity of the current interval
79 Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE;
82 //! Returns the point P of parameter U, the first and second
83 //! derivatives V1 and V2.
84 //! Raised if the continuity of the current interval
86 Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE;
89 //! Returns the point P of parameter U, the first, the second
90 //! and the third derivative.
91 //! Raised if the continuity of the current interval
93 Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE;
96 //! The returned vector gives the value of the derivative for the
97 //! order of derivation N.
99 Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
101 //! Returns the parametric resolution corresponding
102 //! to the real space resolution <R3d>.
103 Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE;
105 //! Returns the type of the curve in the current
106 //! interval : Line, Circle, Ellipse, Hyperbola,
107 //! Parabola, BezierCurve, BSplineCurve, OtherCurve.
108 Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE;
123 Handle(Adaptor3d_HCurve) myHCurve;
135 #endif // _GeomFill_SnglrFunc_HeaderFile