Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-19 09:27:20

0001 // Created on: 1993-12-07
0002 // Created by: Modelistation
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 _BRepGProp_EdgeTool_HeaderFile
0018 #define _BRepGProp_EdgeTool_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <GeomAbs_Shape.hxx>
0025 #include <NCollection_Array1.hxx>
0026 class BRepAdaptor_Curve;
0027 class gp_Pnt;
0028 class gp_Vec;
0029 
0030 //! Provides the required methods to instantiate
0031 //! CGProps from GProp with a Curve from BRepAdaptor.
0032 class BRepGProp_EdgeTool
0033 {
0034 public:
0035   DEFINE_STANDARD_ALLOC
0036 
0037   //! Returns the parametric value of the start point of
0038   //! the curve. The curve is oriented from the start point
0039   //! to the end point.
0040   Standard_EXPORT static double FirstParameter(const BRepAdaptor_Curve& C);
0041 
0042   //! Returns the parametric value of the end point of
0043   //! the curve. The curve is oriented from the start point
0044   //! to the end point.
0045   Standard_EXPORT static double LastParameter(const BRepAdaptor_Curve& C);
0046 
0047   //! Returns the number of Gauss points required to do
0048   //! the integration with a good accuracy using the
0049   //! Gauss method. For a polynomial curve of degree n
0050   //! the maxima of accuracy is obtained with an order
0051   //! of integration equal to 2*n-1.
0052   Standard_EXPORT static int IntegrationOrder(const BRepAdaptor_Curve& C);
0053 
0054   //! Returns the point of parameter U on the loaded curve.
0055   Standard_EXPORT static gp_Pnt Value(const BRepAdaptor_Curve& C, const double U);
0056 
0057   //! Returns the point of parameter U and the first derivative
0058   //! at this point.
0059   Standard_EXPORT static void D1(const BRepAdaptor_Curve& C, const double U, gp_Pnt& P, gp_Vec& V1);
0060 
0061   //! Returns the number of intervals for continuity
0062   //! <S>. May be one if Continuity(me) >= <S>
0063   Standard_EXPORT static int NbIntervals(const BRepAdaptor_Curve& C, const GeomAbs_Shape S);
0064 
0065   //! Stores in <T> the parameters bounding the intervals
0066   //! of continuity <S>.
0067   //!
0068   //! The array must provide enough room to accommodate
0069   //! for the parameters. i.e. T.Length() > NbIntervals()
0070   Standard_EXPORT static void Intervals(const BRepAdaptor_Curve&    C,
0071                                         NCollection_Array1<double>& T,
0072                                         const GeomAbs_Shape         S);
0073 };
0074 
0075 #endif // _BRepGProp_EdgeTool_HeaderFile