Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:06

0001 // Created on: 1993-04-07
0002 // Created by: Laurent BUCHARD
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 _IntCurveSurface_TheHCurveTool_HeaderFile
0018 #define _IntCurveSurface_TheHCurveTool_HeaderFile
0019 
0020 #include <Adaptor3d_Curve.hxx>
0021 #include <GeomAbs_Shape.hxx>
0022 #include <TColStd_Array1OfReal.hxx>
0023 #include <gp_Pnt.hxx>
0024 #include <gp_Vec.hxx>
0025 #include <gp_Lin.hxx>
0026 #include <TColStd_HArray1OfReal.hxx>
0027 class Standard_OutOfRange;
0028 class Standard_NoSuchObject;
0029 class Standard_DomainError;
0030 class gp_Pnt;
0031 class gp_Vec;
0032 class Geom_BezierCurve;
0033 class Geom_BSplineCurve;
0034 
0035 
0036 
0037 class IntCurveSurface_TheHCurveTool 
0038 {
0039 public:
0040 
0041   DEFINE_STANDARD_ALLOC
0042 
0043   
0044     static Standard_Real FirstParameter (const Handle(Adaptor3d_Curve)& C);
0045   
0046     static Standard_Real LastParameter (const Handle(Adaptor3d_Curve)& C);
0047   
0048     static GeomAbs_Shape Continuity (const Handle(Adaptor3d_Curve)& C);
0049   
0050   //! Returns  the number  of  intervals for  continuity
0051   //! <S>. May be one if Continuity(myclass) >= <S>
0052     static Standard_Integer NbIntervals (const Handle(Adaptor3d_Curve)& C, const GeomAbs_Shape S);
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     static void Intervals (const Handle(Adaptor3d_Curve)& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S);
0060   
0061     static Standard_Boolean IsClosed (const Handle(Adaptor3d_Curve)& C);
0062   
0063     static Standard_Boolean IsPeriodic (const Handle(Adaptor3d_Curve)& C);
0064   
0065     static Standard_Real Period (const Handle(Adaptor3d_Curve)& C);
0066   
0067   //! Computes the point of parameter U on the curve.
0068     static gp_Pnt Value (const Handle(Adaptor3d_Curve)& C, const Standard_Real U);
0069   
0070   //! Computes the point of parameter U on the curve.
0071     static void D0 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P);
0072   
0073   //! Computes the point of parameter U on the curve with its
0074   //! first derivative.
0075   //! Raised if the continuity of the current interval
0076   //! is not C1.
0077     static void D1 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V);
0078   
0079 
0080   //! Returns the point P of parameter U, the first and second
0081   //! derivatives V1 and V2.
0082   //! Raised if the continuity of the current interval
0083   //! is not C2.
0084     static void D2 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
0085   
0086 
0087   //! Returns the point P of parameter U, the first, the second
0088   //! and the third derivative.
0089   //! Raised if the continuity of the current interval
0090   //! is not C3.
0091     static void D3 (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
0092   
0093 
0094   //! The returned vector gives the value of the derivative for the
0095   //! order of derivation N.
0096   //! Raised if the continuity of the current interval
0097   //! is not CN.
0098   //! Raised if N < 1.
0099     static gp_Vec DN (const Handle(Adaptor3d_Curve)& C, const Standard_Real U, const Standard_Integer N);
0100   
0101   //! Returns the parametric  resolution corresponding
0102   //! to the real space resolution <R3d>.
0103     static Standard_Real Resolution (const Handle(Adaptor3d_Curve)& C, const Standard_Real R3d);
0104   
0105   //! Returns  the  type of the   curve  in the  current
0106   //! interval :   Line,   Circle,   Ellipse, Hyperbola,
0107   //! Parabola, BezierCurve, BSplineCurve, OtherCurve.
0108     static GeomAbs_CurveType GetType (const Handle(Adaptor3d_Curve)& C);
0109   
0110     static gp_Lin Line (const Handle(Adaptor3d_Curve)& C);
0111   
0112     static gp_Circ Circle (const Handle(Adaptor3d_Curve)& C);
0113   
0114     static gp_Elips Ellipse (const Handle(Adaptor3d_Curve)& C);
0115   
0116     static gp_Hypr Hyperbola (const Handle(Adaptor3d_Curve)& C);
0117   
0118     static gp_Parab Parabola (const Handle(Adaptor3d_Curve)& C);
0119   
0120     static Handle(Geom_BezierCurve) Bezier (const Handle(Adaptor3d_Curve)& C);
0121   
0122     static Handle(Geom_BSplineCurve) BSpline (const Handle(Adaptor3d_Curve)& C);
0123   
0124   Standard_EXPORT static Standard_Integer NbSamples (const Handle(Adaptor3d_Curve)& C, const Standard_Real U0, const Standard_Real U1);
0125   
0126   Standard_EXPORT static void SamplePars (const Handle(Adaptor3d_Curve)& C, const Standard_Real U0, const Standard_Real U1, const Standard_Real Defl, const Standard_Integer NbMin, Handle(TColStd_HArray1OfReal)& Pars);
0127 
0128 
0129 
0130 
0131 protected:
0132 
0133 
0134 
0135 
0136 
0137 private:
0138 
0139 
0140 
0141 
0142 
0143 };
0144 
0145 #define CurveGen Handle(Adaptor3d_Curve)
0146 #define CurveGen_hxx <Adaptor3d_Curve.hxx>
0147 #define IntCurveSurface_HCurveTool IntCurveSurface_TheHCurveTool
0148 #define IntCurveSurface_HCurveTool_hxx <IntCurveSurface_TheHCurveTool.hxx>
0149 
0150 #include <IntCurveSurface_HCurveTool.lxx>
0151 
0152 #undef CurveGen
0153 #undef CurveGen_hxx
0154 #undef IntCurveSurface_HCurveTool
0155 #undef IntCurveSurface_HCurveTool_hxx
0156 
0157 
0158 
0159 
0160 #endif // _IntCurveSurface_TheHCurveTool_HeaderFile