1 // Created on: 1999-05-13
2 // Created by: data exchange team
3 // Copyright (c) 1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _ShapeUpgrade_ConvertCurve2dToBezier_HeaderFile
18 #define _ShapeUpgrade_ConvertCurve2dToBezier_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <TColGeom2d_HSequenceOfCurve.hxx>
24 #include <ShapeUpgrade_SplitCurve2d.hxx>
27 class ShapeUpgrade_ConvertCurve2dToBezier;
28 DEFINE_STANDARD_HANDLE(ShapeUpgrade_ConvertCurve2dToBezier, ShapeUpgrade_SplitCurve2d)
30 //! converts/splits a 2d curve to a list of beziers
31 class ShapeUpgrade_ConvertCurve2dToBezier : public ShapeUpgrade_SplitCurve2d
36 //! Empty constructor.
37 Standard_EXPORT ShapeUpgrade_ConvertCurve2dToBezier();
39 //! Converts curve into a list of beziers, and stores the
40 //! splitting parameters on original curve.
41 Standard_EXPORT virtual void Compute() Standard_OVERRIDE;
43 //! Splits a list of beziers computed by Compute method according
44 //! the split values and splitting parameters.
45 Standard_EXPORT virtual void Build (const Standard_Boolean Segment) Standard_OVERRIDE;
47 //! Returns the list of split parameters in original curve parametrisation.
48 Standard_EXPORT Handle(TColStd_HSequenceOfReal) SplitParams() const;
50 DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_ConvertCurve2dToBezier,ShapeUpgrade_SplitCurve2d)
54 //! Returns the list of bezier curves correspondent to original
56 Standard_EXPORT Handle(TColGeom2d_HSequenceOfCurve) Segments() const;
58 Handle(TColGeom2d_HSequenceOfCurve) mySegments;
59 Handle(TColStd_HSequenceOfReal) mySplitParams;
63 #endif // _ShapeUpgrade_ConvertCurve2dToBezier_HeaderFile