42cf5bc1 |
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 |
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 _ShapeUpgrade_ConvertCurve2dToBezier_HeaderFile |
18 | #define _ShapeUpgrade_ConvertCurve2dToBezier_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <TColGeom2d_HSequenceOfCurve.hxx> |
24 | #include <TColStd_HSequenceOfReal.hxx> |
25 | #include <ShapeUpgrade_SplitCurve2d.hxx> |
26 | #include <Standard_Boolean.hxx> |
27 | |
28 | |
29 | class ShapeUpgrade_ConvertCurve2dToBezier; |
30 | DEFINE_STANDARD_HANDLE(ShapeUpgrade_ConvertCurve2dToBezier, ShapeUpgrade_SplitCurve2d) |
31 | |
32 | //! converts/splits a 2d curve to a list of beziers |
33 | class ShapeUpgrade_ConvertCurve2dToBezier : public ShapeUpgrade_SplitCurve2d |
34 | { |
35 | |
36 | public: |
37 | |
38 | |
39 | //! Empty constructor. |
40 | Standard_EXPORT ShapeUpgrade_ConvertCurve2dToBezier(); |
41 | |
42 | //! Converts curve into a list of beziers, and stores the |
43 | //! splitting parameters on original curve. |
44 | Standard_EXPORT virtual void Compute() Standard_OVERRIDE; |
45 | |
46 | //! Splits a list of beziers computed by Compute method according |
47 | //! the split values and splitting parameters. |
48 | Standard_EXPORT virtual void Build (const Standard_Boolean Segment) Standard_OVERRIDE; |
49 | |
50 | //! Returns the list of splitted parameters in original curve |
51 | //! parametrisation. |
52 | Standard_EXPORT Handle(TColStd_HSequenceOfReal) SplitParams() const; |
53 | |
54 | |
55 | |
56 | |
92efcf78 |
57 | DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_ConvertCurve2dToBezier,ShapeUpgrade_SplitCurve2d) |
42cf5bc1 |
58 | |
59 | protected: |
60 | |
61 | |
62 | |
63 | |
64 | private: |
65 | |
66 | |
67 | //! Returns the list of bezier curves correspondent to original |
68 | //! curve. |
69 | Standard_EXPORT Handle(TColGeom2d_HSequenceOfCurve) Segments() const; |
70 | |
71 | Handle(TColGeom2d_HSequenceOfCurve) mySegments; |
72 | Handle(TColStd_HSequenceOfReal) mySplitParams; |
73 | |
74 | |
75 | }; |
76 | |
77 | |
78 | |
79 | |
80 | |
81 | |
82 | |
83 | #endif // _ShapeUpgrade_ConvertCurve2dToBezier_HeaderFile |