Commit | Line | Data |
---|---|---|
42cf5bc1 | 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 | |
d3b7582d BB |
53 | //! |
54 | //! WithRatio defines whether the resulting curve should have a uniform | |
55 | //! parameterization. Setting WithRatio to Standard_False may greatly | |
56 | //! decrease the speed of algorithms like CPnts_AbscissaPoint::AdvPerform | |
57 | //! when applied to the resulting curve. | |
42cf5bc1 | 58 | 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); |
59 | ||
60 | Standard_EXPORT Handle(Geom_BSplineCurve) BSplineCurve() const; | |
61 | ||
62 | //! Clear a result curve | |
63 | Standard_EXPORT void Clear(); | |
64 | ||
65 | ||
66 | ||
67 | ||
68 | protected: | |
69 | ||
70 | ||
71 | ||
72 | ||
73 | ||
74 | private: | |
75 | ||
76 | ||
77 | //! Concat two BSplineCurves. | |
78 | Standard_EXPORT void Add (Handle(Geom_BSplineCurve)& FirstCurve, Handle(Geom_BSplineCurve)& SecondCurve, const Standard_Boolean After, const Standard_Boolean WithRatio, const Standard_Integer MinM); | |
79 | ||
80 | ||
81 | Handle(Geom_BSplineCurve) myCurve; | |
82 | Standard_Real myTol; | |
83 | Convert_ParameterisationType myType; | |
84 | ||
85 | ||
86 | }; | |
87 | ||
88 | ||
89 | ||
90 | ||
91 | ||
92 | ||
93 | ||
94 | #endif // _GeomConvert_CompCurveToBSplineCurve_HeaderFile |