Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/Adaptor3d_Curve.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 1993-03-31
0002 // Created by: Bruno DUMORTIER
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_Curve_HeaderFile
0018 #define _Adaptor3d_Curve_HeaderFile
0019 
0020 #include <gp_Circ.hxx>
0021 #include <gp_Elips.hxx>
0022 #include <gp_Hypr.hxx>
0023 #include <gp_Parab.hxx>
0024 #include <GeomAbs_Shape.hxx>
0025 #include <Standard.hxx>
0026 #include <Standard_DefineAlloc.hxx>
0027 #include <Standard_Handle.hxx>
0028 #include <TColStd_Array1OfReal.hxx>
0029 #include <GeomAbs_CurveType.hxx>
0030 
0031 class gp_Pnt;
0032 class gp_Vec;
0033 class Geom_BezierCurve;
0034 class Geom_BSplineCurve;
0035 class Geom_OffsetCurve;
0036 
0037 DEFINE_STANDARD_HANDLE(Adaptor3d_Curve, Standard_Transient)
0038 
0039 //! Root class for 3D curves on which geometric
0040 //! algorithms work.
0041 //! An adapted curve is an interface between the
0042 //! services provided by a curve and those required of
0043 //! the curve by algorithms which use it.
0044 //! Two derived concrete classes are provided:
0045 //! - GeomAdaptor_Curve for a curve from the Geom package
0046 //! - Adaptor3d_CurveOnSurface for a curve lying on
0047 //! a surface from the Geom package.
0048 //!
0049 //! Polynomial coefficients of BSpline curves used for their evaluation are
0050 //! cached for better performance. Therefore these evaluations are not
0051 //! thread-safe and parallel evaluations need to be prevented.
0052 class Adaptor3d_Curve : public Standard_Transient
0053 {
0054   DEFINE_STANDARD_RTTIEXT(Adaptor3d_Curve, Standard_Transient)
0055 public:
0056 
0057   //! Shallow copy of adaptor
0058   Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const;
0059 
0060   Standard_EXPORT virtual Standard_Real FirstParameter() const;
0061   
0062   Standard_EXPORT virtual Standard_Real LastParameter() const;
0063   
0064   Standard_EXPORT virtual GeomAbs_Shape Continuity() const;
0065   
0066   //! Returns  the number  of  intervals for  continuity
0067   //! <S>. May be one if Continuity(me) >= <S>
0068   Standard_EXPORT virtual Standard_Integer NbIntervals (const GeomAbs_Shape S) const;
0069   
0070   //! Stores in <T> the  parameters bounding the intervals
0071   //! of continuity <S>.
0072   //!
0073   //! The array must provide  enough room to  accommodate
0074   //! for the parameters. i.e. T.Length() > NbIntervals()
0075   Standard_EXPORT virtual void Intervals (TColStd_Array1OfReal& T, const GeomAbs_Shape S) const;
0076   
0077   //! Returns    a  curve equivalent   of  <me>  between
0078   //! parameters <First>  and <Last>. <Tol>  is used  to
0079   //! test for 3d points confusion.
0080   //! If <First> >= <Last>
0081   Standard_EXPORT virtual Handle(Adaptor3d_Curve) Trim (const Standard_Real First, const Standard_Real Last, const Standard_Real Tol) const;
0082   
0083   Standard_EXPORT virtual Standard_Boolean IsClosed() const;
0084   
0085   Standard_EXPORT virtual Standard_Boolean IsPeriodic() const;
0086   
0087   Standard_EXPORT virtual Standard_Real Period() const;
0088   
0089   //! Computes the point of parameter U on the curve.
0090   Standard_EXPORT virtual gp_Pnt Value (const Standard_Real U) const;
0091   
0092   //! Computes the point of parameter U on the curve.
0093   Standard_EXPORT virtual void D0 (const Standard_Real U, gp_Pnt& P) const;
0094   
0095   //! Computes the point of parameter U on the curve with its
0096   //! first derivative.
0097   //! Raised if the continuity of the current interval
0098   //! is not C1.
0099   Standard_EXPORT virtual void D1 (const Standard_Real U, gp_Pnt& P, gp_Vec& V) const;
0100   
0101 
0102   //! Returns the point P of parameter U, the first and second
0103   //! derivatives V1 and V2.
0104   //! Raised if the continuity of the current interval
0105   //! is not C2.
0106   Standard_EXPORT virtual void D2 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const;
0107   
0108 
0109   //! Returns the point P of parameter U, the first, the second
0110   //! and the third derivative.
0111   //! Raised if the continuity of the current interval
0112   //! is not C3.
0113   Standard_EXPORT virtual void D3 (const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3) const;
0114   
0115 
0116   //! The returned vector gives the value of the derivative for the
0117   //! order of derivation N.
0118   //! Raised if the continuity of the current interval
0119   //! is not CN.
0120   //! Raised if N < 1.
0121   Standard_EXPORT virtual gp_Vec DN (const Standard_Real U, const Standard_Integer N) const;
0122   
0123   //! Returns the parametric  resolution corresponding
0124   //! to the real space resolution <R3d>.
0125   Standard_EXPORT virtual Standard_Real Resolution (const Standard_Real R3d) const;
0126   
0127   //! Returns  the  type of the   curve  in the  current
0128   //! interval :   Line,   Circle,   Ellipse, Hyperbola,
0129   //! Parabola, BezierCurve, BSplineCurve, OtherCurve.
0130   Standard_EXPORT virtual GeomAbs_CurveType GetType() const;
0131   
0132   Standard_EXPORT virtual gp_Lin Line() const;
0133   
0134   Standard_EXPORT virtual gp_Circ Circle() const;
0135   
0136   Standard_EXPORT virtual gp_Elips Ellipse() const;
0137   
0138   Standard_EXPORT virtual gp_Hypr Hyperbola() const;
0139   
0140   Standard_EXPORT virtual gp_Parab Parabola() const;
0141   
0142   Standard_EXPORT virtual Standard_Integer Degree() const;
0143   
0144   Standard_EXPORT virtual Standard_Boolean IsRational() const;
0145   
0146   Standard_EXPORT virtual Standard_Integer NbPoles() const;
0147   
0148   Standard_EXPORT virtual Standard_Integer NbKnots() const;
0149   
0150   Standard_EXPORT virtual Handle(Geom_BezierCurve) Bezier() const;
0151   
0152   Standard_EXPORT virtual Handle(Geom_BSplineCurve) BSpline() const;
0153 
0154   Standard_EXPORT virtual Handle(Geom_OffsetCurve) OffsetCurve() const;
0155 
0156   Standard_EXPORT virtual ~Adaptor3d_Curve();
0157 
0158 };
0159 
0160 #endif // _Adaptor3d_Curve_HeaderFile