Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:53

0001 // Created on: 1993-03-11
0002 // Created by: Isabelle GRIGNON
0003 // Copyright (c) 1993-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 _Adaptor3d_IsoCurve_HeaderFile
0018 #define _Adaptor3d_IsoCurve_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <GeomAbs_IsoType.hxx>
0022 
0023 DEFINE_STANDARD_HANDLE(Adaptor3d_IsoCurve, Adaptor3d_Curve)
0024 
0025 //! Defines an isoparametric curve on  a surface.  The
0026 //! type  of isoparametric curve  (U  or V) is defined
0027 //! with the   enumeration  IsoType from   GeomAbs  if
0028 //! NoneIso is given an error is raised.
0029 class Adaptor3d_IsoCurve  : public Adaptor3d_Curve
0030 {
0031   DEFINE_STANDARD_RTTIEXT(Adaptor3d_IsoCurve, Adaptor3d_Curve)
0032 public:
0033 
0034   //! The iso is set to NoneIso.
0035   Standard_EXPORT Adaptor3d_IsoCurve();
0036   
0037   //! The surface is loaded. The iso is set to NoneIso.
0038   Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S);
0039   
0040   //! Creates  an  IsoCurve curve.   Iso  defines the
0041   //! type (isoU or  isoU) Param defines the value of
0042   //! the iso. The bounds  of  the iso are the bounds
0043   //! of the surface.
0044   Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param);
0045   
0046   //! Create an IsoCurve curve.  Iso defines the type
0047   //! (isoU or isov).  Param defines the value of the
0048   //! iso. WFirst,WLast define the bounds of the iso.
0049   Standard_EXPORT Adaptor3d_IsoCurve(const Handle(Adaptor3d_Surface)& S, const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast);
0050   
0051   //! Shallow copy of adaptor
0052   Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE;
0053 
0054   //! Changes  the surface.  The  iso  is  reset  to
0055   //! NoneIso.
0056   Standard_EXPORT void Load (const Handle(Adaptor3d_Surface)& S);
0057   
0058   //! Changes the iso on the current surface.
0059   Standard_EXPORT void Load (const GeomAbs_IsoType Iso, const Standard_Real Param);
0060   
0061   //! Changes the iso on the current surface.
0062   Standard_EXPORT void Load (const GeomAbs_IsoType Iso, const Standard_Real Param, const Standard_Real WFirst, const Standard_Real WLast);
0063 
0064   const Handle(Adaptor3d_Surface)& Surface() const { return mySurface; }
0065 
0066   GeomAbs_IsoType Iso() const { return myIso; }
0067 
0068   Standard_Real Parameter() const { return myParameter; }
0069 
0070   virtual Standard_Real FirstParameter() const Standard_OVERRIDE { return myFirst; }
0071 
0072   virtual Standard_Real LastParameter() const Standard_OVERRIDE { return myLast; }
0073 
0074   Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
0075   
0076   //! Returns  the number  of  intervals for  continuity
0077   //! <S>. May be one if Continuity(me) >= <S>
0078   Standard_EXPORT Standard_Integer NbIntervals (const GeomAbs_Shape S) const Standard_OVERRIDE;
0079   
0080   //! Stores in <T> the  parameters bounding the intervals
0081   //! of continuity <S>.
0082   //!
0083   //! The array must provide  enough room to  accommodate
0084   //! for the parameters. i.e. T.Length() > NbIntervals()
0085   Standard_EXPORT void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const Standard_OVERRIDE;
0086   
0087   //! Returns    a  curve equivalent   of  <me>  between
0088   //! parameters <First>  and <Last>. <Tol>  is used  to
0089   //! test for 3d points confusion.
0090   //! If <First> >= <Last>
0091   Standard_EXPORT Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const Standard_OVERRIDE;
0092   
0093   Standard_EXPORT Standard_Boolean IsClosed() const Standard_OVERRIDE;
0094   
0095   Standard_EXPORT Standard_Boolean IsPeriodic() const Standard_OVERRIDE;
0096   
0097   Standard_EXPORT Standard_Real Period() const Standard_OVERRIDE;
0098   
0099   //! Computes the point of parameter U on the curve.
0100   Standard_EXPORT gp_Pnt Value (const Standard_Real U) const Standard_OVERRIDE;
0101   
0102   //! Computes the point of parameter U on the curve.
0103   Standard_EXPORT void D0 (const Standard_Real U, gp_Pnt& P) const Standard_OVERRIDE;
0104   
0105   //! Computes the point of parameter U on the curve with its
0106   //! first derivative.
0107   //! Raised if the continuity of the current interval
0108   //! is not C1.
0109   Standard_EXPORT void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const Standard_OVERRIDE;
0110   
0111 
0112   //! Returns the point P of parameter U, the first and second
0113   //! derivatives V1 and V2.
0114   //! Raised if the continuity of the current interval
0115   //! is not C2.
0116   Standard_EXPORT void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const Standard_OVERRIDE;
0117   
0118 
0119   //! Returns the point P of parameter U, the first, the second
0120   //! and the third derivative.
0121   //! Raised if the continuity of the current interval
0122   //! is not C3.
0123   Standard_EXPORT void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const Standard_OVERRIDE;
0124   
0125 
0126   //! The returned vector gives the value of the derivative for the
0127   //! order of derivation N.
0128   //! Raised if the continuity of the current interval
0129   //! is not CN.
0130   //! Raised if N < 1.
0131   Standard_EXPORT gp_Vec DN (const Standard_Real U, const Standard_Integer N) const Standard_OVERRIDE;
0132   
0133   //! Returns the parametric  resolution corresponding
0134   //! to the real space resolution <R3d>.
0135   Standard_EXPORT Standard_Real Resolution (const Standard_Real R3d) const Standard_OVERRIDE;
0136   
0137   //! Returns  the  type of the   curve  in the  current
0138   //! interval :   Line,   Circle,   Ellipse, Hyperbola,
0139   //! Parabola, BezierCurve, BSplineCurve, OtherCurve.
0140   Standard_EXPORT GeomAbs_CurveType GetType() const Standard_OVERRIDE;
0141   
0142   Standard_EXPORT gp_Lin Line() const Standard_OVERRIDE;
0143   
0144   Standard_EXPORT gp_Circ Circle() const Standard_OVERRIDE;
0145   
0146   Standard_EXPORT gp_Elips Ellipse() const Standard_OVERRIDE;
0147   
0148   Standard_EXPORT gp_Hypr Hyperbola() const Standard_OVERRIDE;
0149   
0150   Standard_EXPORT gp_Parab Parabola() const Standard_OVERRIDE;
0151   
0152   Standard_EXPORT Standard_Integer Degree() const Standard_OVERRIDE;
0153   
0154   Standard_EXPORT Standard_Boolean IsRational() const Standard_OVERRIDE;
0155   
0156   Standard_EXPORT Standard_Integer NbPoles() const Standard_OVERRIDE;
0157   
0158   Standard_EXPORT Standard_Integer NbKnots() const Standard_OVERRIDE;
0159   
0160   Standard_EXPORT Handle(Geom_BezierCurve) Bezier() const Standard_OVERRIDE;
0161   
0162   Standard_EXPORT Handle(Geom_BSplineCurve) BSpline() const Standard_OVERRIDE;
0163 
0164 private:
0165 
0166   Handle(Adaptor3d_Surface) mySurface;
0167   GeomAbs_IsoType myIso;
0168   Standard_Real myFirst;
0169   Standard_Real myLast;
0170   Standard_Real myParameter;
0171 
0172 };
0173 
0174 #endif // _Adaptor3d_IsoCurve_HeaderFile