1 // Created on: 1993-12-07
2 // Created by: Modelistation
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepGProp_EdgeTool_HeaderFile
18 #define _BRepGProp_EdgeTool_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
23 #include <Standard_Integer.hxx>
24 #include <GeomAbs_Shape.hxx>
25 #include <TColStd_Array1OfReal.hxx>
26 class BRepAdaptor_Curve;
31 //! Provides the required methods to instantiate
32 //! CGProps from GProp with a Curve from BRepAdaptor.
33 class BRepGProp_EdgeTool
41 //! Returns the parametric value of the start point of
42 //! the curve. The curve is oriented from the start point
44 Standard_EXPORT static Standard_Real FirstParameter (const BRepAdaptor_Curve& C);
47 //! Returns the parametric value of the end point of
48 //! the curve. The curve is oriented from the start point
50 Standard_EXPORT static Standard_Real LastParameter (const BRepAdaptor_Curve& C);
53 //! Returns the number of Gauss points required to do
54 //! the integration with a good accuracy using the
55 //! Gauss method. For a polynomial curve of degree n
56 //! the maxima of accuracy is obtained with an order
57 //! of integration equal to 2*n-1.
58 Standard_EXPORT static Standard_Integer IntegrationOrder (const BRepAdaptor_Curve& C);
60 //! Returns the point of parameter U on the loaded curve.
61 Standard_EXPORT static gp_Pnt Value (const BRepAdaptor_Curve& C, const Standard_Real U);
64 //! Returns the point of parameter U and the first derivative
66 Standard_EXPORT static void D1 (const BRepAdaptor_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1);
68 //! Returns the number of intervals for continuity
69 //! <S>. May be one if Continuity(me) >= <S>
70 Standard_EXPORT static Standard_Integer NbIntervals (const BRepAdaptor_Curve& C, const GeomAbs_Shape S);
72 //! Stores in <T> the parameters bounding the intervals
73 //! of continuity <S>.
75 //! The array must provide enough room to accommodate
76 //! for the parameters. i.e. T.Length() > NbIntervals()
77 Standard_EXPORT static void Intervals (const BRepAdaptor_Curve& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S);
102 #endif // _BRepGProp_EdgeTool_HeaderFile