Back to home page

EIC code displayed by LXR

 
 

    


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

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 
0031 //! Provides  the required  methods    to instantiate
0032 //! CGProps from GProp with a Curve from BRepAdaptor.
0033 class BRepGProp_EdgeTool 
0034 {
0035 public:
0036 
0037   DEFINE_STANDARD_ALLOC
0038 
0039   
0040 
0041   //! Returns the parametric value of the start point of
0042   //! the curve.  The curve is oriented from the start point
0043   //! to the end point.
0044   Standard_EXPORT static Standard_Real FirstParameter (const BRepAdaptor_Curve& C);
0045   
0046 
0047   //! Returns the parametric value of the end point of
0048   //! the curve.  The curve is oriented from the start point
0049   //! to the end point.
0050   Standard_EXPORT static Standard_Real LastParameter (const BRepAdaptor_Curve& C);
0051   
0052 
0053   //! Returns the number of Gauss points required to do
0054   //! the integration with a good accuracy using the
0055   //! Gauss method.  For a polynomial curve of degree n
0056   //! the maxima of accuracy is obtained with an order
0057   //! of integration equal to 2*n-1.
0058   Standard_EXPORT static Standard_Integer IntegrationOrder (const BRepAdaptor_Curve& C);
0059   
0060   //! Returns the point of parameter U on the loaded curve.
0061   Standard_EXPORT static gp_Pnt Value (const BRepAdaptor_Curve& C, const Standard_Real U);
0062   
0063 
0064   //! Returns the point of parameter U and the first derivative
0065   //! at this point.
0066   Standard_EXPORT static void D1 (const BRepAdaptor_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1);
0067   
0068   //! Returns  the number  of  intervals for  continuity
0069   //! <S>. May be one if Continuity(me) >= <S>
0070   Standard_EXPORT static Standard_Integer NbIntervals (const BRepAdaptor_Curve& C, const GeomAbs_Shape S);
0071   
0072   //! Stores in <T> the  parameters bounding the intervals
0073   //! of continuity <S>.
0074   //!
0075   //! The array must provide  enough room to  accommodate
0076   //! for the parameters. i.e. T.Length() > NbIntervals()
0077   Standard_EXPORT static void Intervals (const BRepAdaptor_Curve& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S);
0078 
0079 
0080 
0081 
0082 protected:
0083 
0084 
0085 
0086 
0087 
0088 private:
0089 
0090 
0091 
0092 
0093 
0094 };
0095 
0096 
0097 
0098 
0099 
0100 
0101 
0102 #endif // _BRepGProp_EdgeTool_HeaderFile