42cf5bc1 |
1 | // Created on: 1997-02-18 |
2 | // Created by: Stagiaire Francois DUMONT |
3 | // Copyright (c) 1997-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 _Hermit_HeaderFile |
18 | #define _Hermit_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Real.hxx> |
25 | class Geom2d_BSplineCurve; |
26 | class Geom_BSplineCurve; |
27 | |
28 | |
29 | //! This is used to reparameterize Rational BSpline |
30 | //! Curves so that we can concatenate them later to |
31 | //! build C1 Curves It builds and 1D-reparameterizing |
32 | //! function starting from an Hermite interpolation and |
33 | //! adding knots and modifying poles of the 1D BSpline |
34 | //! obtained that way. The goal is to build a(u) so that |
35 | //! if we consider a BSpline curve |
36 | //! N(u) |
37 | //! f(u) = ----- |
38 | //! D(u) |
39 | //! |
40 | //! the function a(u)D(u) has value 1 at the umin and umax |
41 | //! and has 0.0e0 derivative value a umin and umax. |
42 | //! The details of the computation occuring in this package |
43 | //! can be found by reading : |
44 | //! " Etude sur la concatenation de NURBS en vue du |
45 | //! balayage de surfaces" PFE n S85 Ensam Lille |
46 | class Hermit |
47 | { |
48 | public: |
49 | |
50 | DEFINE_STANDARD_ALLOC |
51 | |
52 | |
53 | //! returns the correct spline a(u) which will |
54 | //! be multiplicated with BS later. |
55 | Standard_EXPORT static Handle(Geom2d_BSplineCurve) Solution (const Handle(Geom_BSplineCurve)& BS, const Standard_Real TolPoles = 0.000001, const Standard_Real TolKnots = 0.000001); |
56 | |
57 | //! returns the correct spline a(u) which will |
58 | //! be multiplicated with BS later. |
59 | Standard_EXPORT static Handle(Geom2d_BSplineCurve) Solution (const Handle(Geom2d_BSplineCurve)& BS, const Standard_Real TolPoles = 0.000001, const Standard_Real TolKnots = 0.000001); |
60 | |
61 | //! returns the knots to insert to a(u) to |
62 | //! stay with a constant sign and in the |
63 | //! tolerances. |
64 | Standard_EXPORT static void Solutionbis (const Handle(Geom_BSplineCurve)& BS, Standard_Real& Knotmin, Standard_Real& Knotmax, const Standard_Real TolPoles = 0.000001, const Standard_Real TolKnots = 0.000001); |
65 | |
66 | |
67 | |
68 | |
69 | protected: |
70 | |
71 | |
72 | |
73 | |
74 | |
75 | private: |
76 | |
77 | |
78 | |
79 | |
80 | |
81 | }; |
82 | |
83 | |
84 | |
85 | |
86 | |
87 | |
88 | |
89 | #endif // _Hermit_HeaderFile |