Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1995-07-18
0002 // Created by: Modelistation
0003 // Copyright (c) 1995-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 _Extrema_CurveTool_HeaderFile
0018 #define _Extrema_CurveTool_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <GeomAbs_Shape.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TColStd_Array1OfReal.hxx>
0027 #include <TColStd_HArray1OfReal.hxx>
0028 #include <GeomAbs_CurveType.hxx>
0029 #include <gp_Pnt.hxx>
0030 #include <gp_Vec.hxx>
0031 #include <gp_Lin.hxx>
0032 #include <gp_Circ.hxx>
0033 #include <gp_Elips.hxx>
0034 #include <gp_Hypr.hxx>
0035 #include <gp_Parab.hxx>
0036 class Adaptor3d_Curve;
0037 class gp_Pnt;
0038 class gp_Vec;
0039 class Geom_BezierCurve;
0040 class Geom_BSplineCurve;
0041 
0042 
0043 
0044 class Extrema_CurveTool 
0045 {
0046 public:
0047 
0048   DEFINE_STANDARD_ALLOC
0049 
0050   
0051     static Standard_Real FirstParameter (const Adaptor3d_Curve& C);
0052   
0053     static Standard_Real LastParameter (const Adaptor3d_Curve& C);
0054   
0055     static GeomAbs_Shape Continuity (const Adaptor3d_Curve& C);
0056   
0057   //! Returns  the number  of  intervals for  continuity
0058   //! <S>. May be one if Continuity(me) >= <S>
0059     static Standard_Integer NbIntervals (Adaptor3d_Curve& C, const GeomAbs_Shape S);
0060   
0061   //! Stores in <T> the  parameters bounding the intervals
0062   //! of continuity <S>.
0063   //!
0064   //! The array must provide  enough room to  accommodate
0065   //! for the parameters. i.e. T.Length() > NbIntervals()
0066     static void Intervals (Adaptor3d_Curve& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S);
0067 
0068   //! Returns the parameters bounding the intervals of subdivision of curve
0069   //! according to Curvature deflection. Value of deflection is defined in method.
0070   //!
0071     Standard_EXPORT static Handle(TColStd_HArray1OfReal) DeflCurvIntervals(const Adaptor3d_Curve& C);
0072 
0073     Standard_EXPORT static Standard_Boolean IsPeriodic (const Adaptor3d_Curve& C);
0074   
0075     static Standard_Real Period (const Adaptor3d_Curve& C);
0076   
0077     static Standard_Real Resolution (const Adaptor3d_Curve& C, const Standard_Real R3d);
0078   
0079     static GeomAbs_CurveType GetType (const Adaptor3d_Curve& C);
0080   
0081     static gp_Pnt Value (const Adaptor3d_Curve& C, const Standard_Real U);
0082   
0083     static void D0 (const Adaptor3d_Curve& C, const Standard_Real U, gp_Pnt& P);
0084   
0085     static void D1 (const Adaptor3d_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V);
0086   
0087     static void D2 (const Adaptor3d_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2);
0088   
0089     static void D3 (const Adaptor3d_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3);
0090   
0091     static gp_Vec DN (const Adaptor3d_Curve& C, const Standard_Real U, const Standard_Integer N);
0092   
0093     static gp_Lin Line (const Adaptor3d_Curve& C);
0094   
0095     static gp_Circ Circle (const Adaptor3d_Curve& C);
0096   
0097     static gp_Elips Ellipse (const Adaptor3d_Curve& C);
0098   
0099     static gp_Hypr Hyperbola (const Adaptor3d_Curve& C);
0100   
0101     static gp_Parab Parabola (const Adaptor3d_Curve& C);
0102   
0103     static Standard_Integer Degree (const Adaptor3d_Curve& C);
0104   
0105     static Standard_Boolean IsRational (const Adaptor3d_Curve& C);
0106   
0107     static Standard_Integer NbPoles (const Adaptor3d_Curve& C);
0108   
0109     static Standard_Integer NbKnots (const Adaptor3d_Curve& C);
0110   
0111     static Handle(Geom_BezierCurve) Bezier (const Adaptor3d_Curve& C);
0112   
0113     static Handle(Geom_BSplineCurve) BSpline (const Adaptor3d_Curve& C);
0114 
0115 
0116 
0117 
0118 protected:
0119 
0120 
0121 
0122 
0123 
0124 private:
0125 
0126 
0127 
0128 
0129 
0130 };
0131 
0132 
0133 #include <Extrema_CurveTool.lxx>
0134 
0135 
0136 
0137 
0138 
0139 #endif // _Extrema_CurveTool_HeaderFile