Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-10 09:28:22

0001 // Created on: 1998-02-26
0002 // Created by: Roman BORISOV
0003 // Copyright (c) 1998-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _GeomFill_SnglrFunc_HeaderFile
0018 #define _GeomFill_SnglrFunc_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Adaptor3d_Curve.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <GeomAbs_Shape.hxx>
0027 #include <NCollection_Array1.hxx>
0028 #include <GeomAbs_CurveType.hxx>
0029 
0030 class gp_Pnt;
0031 class gp_Vec;
0032 
0033 //! to represent function C'(t)^C''(t)
0034 class GeomFill_SnglrFunc : public Adaptor3d_Curve
0035 {
0036 public:
0037   DEFINE_STANDARD_ALLOC
0038 
0039   Standard_EXPORT GeomFill_SnglrFunc(const occ::handle<Adaptor3d_Curve>& HC);
0040 
0041   //! Shallow copy of adaptor
0042   Standard_EXPORT occ::handle<Adaptor3d_Curve> ShallowCopy() const override;
0043 
0044   Standard_EXPORT void SetRatio(const double Ratio);
0045 
0046   Standard_EXPORT double FirstParameter() const override;
0047 
0048   Standard_EXPORT double LastParameter() const override;
0049 
0050   //! Returns the number of intervals for continuity
0051   //! <S>. May be one if Continuity(me) >= <S>
0052   Standard_EXPORT int NbIntervals(const GeomAbs_Shape S) const override;
0053 
0054   //! Stores in <T> the parameters bounding the intervals
0055   //! of continuity <S>.
0056   //!
0057   //! The array must provide enough room to accommodate
0058   //! for the parameters. i.e. T.Length() > NbIntervals()
0059   Standard_EXPORT void Intervals(NCollection_Array1<double>& T,
0060                                  const GeomAbs_Shape         S) const override;
0061 
0062   Standard_EXPORT bool IsPeriodic() const override;
0063 
0064   Standard_EXPORT double Period() const override;
0065 
0066   //! Computes the point of parameter theU on the curve.
0067   [[nodiscard]] Standard_EXPORT gp_Pnt EvalD0(const double theU) const final;
0068 
0069   //! Computes the point of parameter theU on the curve with its first derivative.
0070   //! Raised if the continuity of the current interval is not C1.
0071   [[nodiscard]] Standard_EXPORT Geom_Curve::ResD1 EvalD1(const double theU) const final;
0072 
0073   //! Returns the point and the first and second derivatives at parameter theU.
0074   //! Raised if the continuity of the current interval is not C2.
0075   [[nodiscard]] Standard_EXPORT Geom_Curve::ResD2 EvalD2(const double theU) const final;
0076 
0077   //! Returns the point and the first, second and third derivatives at parameter theU.
0078   //! Raised if the continuity of the current interval is not C3.
0079   [[nodiscard]] Standard_EXPORT Geom_Curve::ResD3 EvalD3(const double theU) const final;
0080 
0081   //! Returns the derivative of order theN at parameter theU.
0082   //! Raised if theN < 1.
0083   [[nodiscard]] Standard_EXPORT gp_Vec EvalDN(const double theU, const int theN) const final;
0084 
0085   //! Returns the parametric resolution corresponding
0086   //! to the real space resolution <R3d>.
0087   Standard_EXPORT double Resolution(const double R3d) const override;
0088 
0089   //! Returns the type of the curve in the current
0090   //! interval: Line, Circle, Ellipse, Hyperbola,
0091   //! Parabola, BezierCurve, BSplineCurve, OtherCurve.
0092   Standard_EXPORT GeomAbs_CurveType GetType() const override;
0093 
0094 private:
0095   occ::handle<Adaptor3d_Curve> myHCurve;
0096   double                       ratio;
0097 };
0098 
0099 #endif // _GeomFill_SnglrFunc_HeaderFile