0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BRepGProp / BRepGProp_EdgeTool.hxx
CommitLineData
42cf5bc1 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
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _BRepGProp_EdgeTool_HeaderFile
18#define _BRepGProp_EdgeTool_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Real.hxx>
25#include <Standard_Integer.hxx>
26#include <GeomAbs_Shape.hxx>
27#include <TColStd_Array1OfReal.hxx>
28class Standard_OutOfRange;
29class BRepAdaptor_Curve;
30class gp_Pnt;
31class gp_Vec;
32
33
34//! Provides the required methods to instantiate
35//! CGProps from GProp with a Curve from BRepAdaptor.
36class BRepGProp_EdgeTool
37{
38public:
39
40 DEFINE_STANDARD_ALLOC
41
42
43
44 //! Returns the parametric value of the start point of
45 //! the curve. The curve is oriented from the start point
46 //! to the end point.
47 Standard_EXPORT static Standard_Real FirstParameter (const BRepAdaptor_Curve& C);
48
49
50 //! Returns the parametric value of the end point of
51 //! the curve. The curve is oriented from the start point
52 //! to the end point.
53 Standard_EXPORT static Standard_Real LastParameter (const BRepAdaptor_Curve& C);
54
55
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);
62
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);
65
66
67 //! Returns the point of parameter U and the first derivative
68 //! at this point.
69 Standard_EXPORT static void D1 (const BRepAdaptor_Curve& C, const Standard_Real U, gp_Pnt& P, gp_Vec& V1);
70
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);
74
75 //! Stores in <T> the parameters bounding the intervals
76 //! of continuity <S>.
77 //!
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);
81
82
83
84
85protected:
86
87
88
89
90
91private:
92
93
94
95
96
97};
98
99
100
101
102
103
104
105#endif // _BRepGProp_EdgeTool_HeaderFile