CommitLineData
42cf5bc1 1// Created on: 1997-04-29
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
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>
27class Geom2d_BSplineCurve;
28class Geom2d_BoundedCurve;
29
30
31//! This algorithm converts and concat several curve in an BSplineCurve
32class Geom2dConvert_CompCurveToBSplineCurve
33{
34public:
35
36 DEFINE_STANDARD_ALLOC
37
38
39 //! Initialize the algorithme
40 //! - Parameterisation is used to convert
41 Standard_EXPORT Geom2dConvert_CompCurveToBSplineCurve(const Convert_ParameterisationType Parameterisation = Convert_TgtThetaOver2);
42
43 //! Initialize the algorithme with one curve
44 //! - Parameterisation is used to convert
45 Standard_EXPORT Geom2dConvert_CompCurveToBSplineCurve(const Handle(Geom2d_BoundedCurve)& BasisCurve, const Convert_ParameterisationType Parameterisation = Convert_TgtThetaOver2);
46
47 //! Append a curve in the BSpline
48 //! Return False if the curve is not G0 with the BSplineCurve.
49 //! Tolerance is used to check continuity and decrease
50 //! Multiplicty at the common Knot
51 //! After is usefull if BasisCurve is a closed curve .
52 Standard_EXPORT Standard_Boolean Add (const Handle(Geom2d_BoundedCurve)& NewCurve, const Standard_Real Tolerance, const Standard_Boolean After = Standard_False);
53
54 Standard_EXPORT Handle(Geom2d_BSplineCurve) BSplineCurve() const;
55
56 //! Clear result curve
57 Standard_EXPORT void Clear();
58
59
60
61
62protected:
63
64
65
66
67
68private:
69
70
71 //! Concat two BSplineCurves.
72 Standard_EXPORT void Add (Handle(Geom2d_BSplineCurve)& FirstCurve, Handle(Geom2d_BSplineCurve)& SecondCurve, const Standard_Boolean After);
73
74
75 Handle(Geom2d_BSplineCurve) myCurve;
76 Standard_Real myTol;
77 Convert_ParameterisationType myType;
78
79
80};
81
82
83
84
85
86
87