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>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Real.hxx>
25 #include <Standard_Integer.hxx>
26 #include <GeomAbs_Shape.hxx>
27 #include <TColStd_Array1OfReal.hxx>
28 class Standard_OutOfRange;
29 class BRepAdaptor_Curve;
34 //! Provides the required methods to instantiate
35 //! CGProps from GProp with a Curve from BRepAdaptor.
36 class BRepGProp_EdgeTool
44 //! Returns the parametric value of the start point of
45 //! the curve. The curve is oriented from the start point
47 Standard_EXPORT static Standard_Real FirstParameter (const BRepAdaptor_Curve& C);
50 //! Returns the parametric value of the end point of
51 //! the curve. The curve is oriented from the start point
53 Standard_EXPORT static Standard_Real LastParameter (const BRepAdaptor_Curve& C);
56 //! Returns the number of Gauss points required to do
57 //! the integration with a good accuracy using the
58 //! Gauss method. For a polynomial curve of degree n
59 //! the maxima of accuracy is obtained with an order
60 //! of integration equal to 2*n-1.
61 Standard_EXPORT static Standard_Integer IntegrationOrder (const BRepAdaptor_Curve& C);
63 //! Returns the point of parameter U on the loaded curve.
64 Standard_EXPORT static gp_Pnt Value (const BRepAdaptor_Curve& C, const Standard_Real U);
67 //! Returns the point of parameter U and the first derivative
69 Standard_EXPORT static void D1 (const BRepAdaptor_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1);
71 //! Returns the number of intervals for continuity
72 //! <S>. May be one if Continuity(me) >= <S>
73 Standard_EXPORT static Standard_Integer NbIntervals (const BRepAdaptor_Curve& C, const GeomAbs_Shape S);
75 //! Stores in <T> the parameters bounding the intervals
76 //! of continuity <S>.
78 //! The array must provide enough room to accomodate
79 //! for the parameters. i.e. T.Length() > NbIntervals()
80 Standard_EXPORT static void Intervals (const BRepAdaptor_Curve& C, TColStd_Array1OfReal& T, const GeomAbs_Shape S);
105 #endif // _BRepGProp_EdgeTool_HeaderFile