Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-22 08:29:07

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 <TColStd_Array1OfReal.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 Standard_Real 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 Standard_Real 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 Standard_Integer 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 Standard_Real 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,
0060                                  const Standard_Real      U,
0061                                  gp_Pnt&                  P,
0062                                  gp_Vec&                  V1);
0063 
0064   //! Returns  the number  of  intervals for  continuity
0065   //! <S>. May be one if Continuity(me) >= <S>
0066   Standard_EXPORT static Standard_Integer NbIntervals(const BRepAdaptor_Curve& C,
0067                                                       const GeomAbs_Shape      S);
0068 
0069   //! Stores in <T> the  parameters bounding the intervals
0070   //! of continuity <S>.
0071   //!
0072   //! The array must provide  enough room to  accommodate
0073   //! for the parameters. i.e. T.Length() > NbIntervals()
0074   Standard_EXPORT static void Intervals(const BRepAdaptor_Curve& C,
0075                                         TColStd_Array1OfReal&    T,
0076                                         const GeomAbs_Shape      S);
0077 
0078 protected:
0079 private:
0080 };
0081 
0082 #endif // _BRepGProp_EdgeTool_HeaderFile