Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:40

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 <TColStd_Array1OfReal.hxx>
0028 #include <GeomAbs_CurveType.hxx>
0029 
0030 class gp_Pnt;
0031 class gp_Vec;
0032 
0033 
0034 //! to  represent  function  C'(t)^C''(t)
0035 class GeomFill_SnglrFunc  : public Adaptor3d_Curve
0036 {
0037 public:
0038 
0039   DEFINE_STANDARD_ALLOC
0040 
0041   
0042   Standard_EXPORT GeomFill_SnglrFunc(const Handle(Adaptor3d_Curve)& HC);
0043 
0044   //! Shallow copy of adaptor
0045   Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE;
0046   
0047   Standard_EXPORT void SetRatio (const Standard_Real Ratio);
0048   
0049   Standard_EXPORT Standard_Real FirstParameter() const Standard_OVERRIDE;
0050   
0051   Standard_EXPORT Standard_Real LastParameter() const Standard_OVERRIDE;
0052   
0053   //! Returns  the number  of  intervals for  continuity
0054   //! <S>. May be one if Continuity(me) >= <S>
0055   Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
0056   
0057   //! Stores in <T> the  parameters bounding the intervals
0058   //! of continuity <S>.
0059   //!
0060   //! The array must provide  enough room to  accommodate
0061   //! for the parameters. i.e. T.Length() > NbIntervals()
0062   Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
0063   
0064   //! Computes the point of parameter U on the curve.
0065   Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE;
0066   
0067   Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
0068   
0069   Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE;
0070   
0071   //! Computes the point of parameter U on the curve.
0072   Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE;
0073   
0074   //! Computes the point of parameter U on the curve with its
0075   //! first derivative.
0076   //! Raised if the continuity of the current interval
0077   //! is not C1.
0078   Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE;
0079   
0080 
0081   //! Returns the point P of parameter U, the first and second
0082   //! derivatives V1 and V2.
0083   //! Raised if the continuity of the current interval
0084   //! is not C2.
0085   Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE;
0086   
0087 
0088   //! Returns the point P of parameter U, the first, the second
0089   //! and the third derivative.
0090   //! Raised if the continuity of the current interval
0091   //! is not C1.
0092   Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE;
0093   
0094 
0095   //! The returned vector gives the value of the derivative for the
0096   //! order of derivation N.
0097   //! Raised if N < 1.
0098   Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
0099   
0100   //! Returns the parametric  resolution corresponding
0101   //! to the real space resolution <R3d>.
0102   Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE;
0103   
0104   //! Returns  the  type of the   curve  in the  current
0105   //! interval :   Line,   Circle,   Ellipse, Hyperbola,
0106   //! Parabola, BezierCurve, BSplineCurve, OtherCurve.
0107   Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE;
0108 
0109 
0110 
0111 
0112 protected:
0113 
0114 
0115 
0116 
0117 
0118 private:
0119 
0120 
0121 
0122   Handle(Adaptor3d_Curve) myHCurve;
0123   Standard_Real ratio;
0124 
0125 
0126 };
0127 
0128 
0129 
0130 
0131 
0132 
0133 
0134 #endif // _GeomFill_SnglrFunc_HeaderFile