484aae54aa208ad314aaa15d8f0671a6a93062c7
[occt.git] / src / GeomConvert / GeomConvert_CompCurveToBSplineCurve.hxx
1 // Created on: 1996-09-23
2 // Created by: Philippe MANGIN
3 // Copyright (c) 1996-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 _GeomConvert_CompCurveToBSplineCurve_HeaderFile
18 #define _GeomConvert_CompCurveToBSplineCurve_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Real.hxx>
25 #include <Convert_ParameterisationType.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Standard_Integer.hxx>
28 class Geom_BSplineCurve;
29 class Geom_BoundedCurve;
30
31
32 //! Algorithm converts and concat several curve in an BSplineCurve
33 class GeomConvert_CompCurveToBSplineCurve 
34 {
35 public:
36
37   DEFINE_STANDARD_ALLOC
38
39   
40   //! Initialize the algorithme
41   //! - Parameterisation is used to convert
42   Standard_EXPORT GeomConvert_CompCurveToBSplineCurve(const Convert_ParameterisationType Parameterisation = Convert_TgtThetaOver2);
43   
44   //! Initialize the algorithme with one curve
45   //! - Parameterisation is used to convert
46   Standard_EXPORT GeomConvert_CompCurveToBSplineCurve(const Handle(Geom_BoundedCurve)& BasisCurve, const Convert_ParameterisationType Parameterisation = Convert_TgtThetaOver2);
47   
48   //! Append a curve in  the BSpline Return False if the
49   //! curve is not G0  with the BSplineCurve.  Tolerance
50   //! is   used to   check   continuity  and decrease
51   //! Multiplicity at the common Knot until MinM
52   //! if MinM = 0, the common Knot can be removed
53   Standard_EXPORT Standard_Boolean Add (const Handle(Geom_BoundedCurve)& NewCurve, const Standard_Real Tolerance, const Standard_Boolean After = Standard_False, const Standard_Boolean WithRatio = Standard_True, const Standard_Integer MinM = 0);
54   
55   Standard_EXPORT Handle(Geom_BSplineCurve) BSplineCurve() const;
56   
57   //! Clear a result curve
58   Standard_EXPORT void Clear();
59
60
61
62
63 protected:
64
65
66
67
68
69 private:
70
71   
72   //! Concat two BSplineCurves.
73   Standard_EXPORT void Add (Handle(Geom_BSplineCurve)& FirstCurve, Handle(Geom_BSplineCurve)& SecondCurve, const Standard_Boolean After, const Standard_Boolean WithRatio, const Standard_Integer MinM);
74
75
76   Handle(Geom_BSplineCurve) myCurve;
77   Standard_Real myTol;
78   Convert_ParameterisationType myType;
79
80
81 };
82
83
84
85
86
87
88
89 #endif // _GeomConvert_CompCurveToBSplineCurve_HeaderFile