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_ConvertCurve3dToBezier_HeaderFile
18 #define _ShapeUpgrade_ConvertCurve3dToBezier_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <TColGeom_HSequenceOfCurve.hxx>
24 #include <TColStd_HSequenceOfReal.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <ShapeUpgrade_SplitCurve3d.hxx>
29 class ShapeUpgrade_ConvertCurve3dToBezier;
30 DEFINE_STANDARD_HANDLE(ShapeUpgrade_ConvertCurve3dToBezier, ShapeUpgrade_SplitCurve3d)
32 //! converts/splits a 3d curve of any type to a list of beziers
33 class ShapeUpgrade_ConvertCurve3dToBezier : public ShapeUpgrade_SplitCurve3d
40 Standard_EXPORT ShapeUpgrade_ConvertCurve3dToBezier();
42 //! Sets mode for conversion Geom_Line to bezier.
43 void SetLineMode (const Standard_Boolean mode);
45 //! Returns the Geom_Line conversion mode.
46 Standard_Boolean GetLineMode() const;
48 //! Sets mode for conversion Geom_Circle to bezier.
49 void SetCircleMode (const Standard_Boolean mode);
51 //! Returns the Geom_Circle conversion mode.
52 Standard_Boolean GetCircleMode() const;
54 //! Returns the Geom_Conic conversion mode.
55 void SetConicMode (const Standard_Boolean mode);
57 //! Performs converting and computes the resulting shape.
58 Standard_Boolean GetConicMode() const;
60 //! Converts curve into a list of beziers, and stores the
61 //! splitting parameters on original curve.
62 Standard_EXPORT virtual void Compute() Standard_OVERRIDE;
64 //! Splits a list of beziers computed by Compute method according
65 //! the split values and splitting parameters.
66 Standard_EXPORT virtual void Build (const Standard_Boolean Segment) Standard_OVERRIDE;
68 //! Returns the list of splitted parameters in original curve
70 Standard_EXPORT Handle(TColStd_HSequenceOfReal) SplitParams() const;
75 DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_ConvertCurve3dToBezier,ShapeUpgrade_SplitCurve3d)
85 //! Returns the list of bezier curves correspondent to original
87 Standard_EXPORT Handle(TColGeom_HSequenceOfCurve) Segments() const;
89 Handle(TColGeom_HSequenceOfCurve) mySegments;
90 Handle(TColStd_HSequenceOfReal) mySplitParams;
91 Standard_Boolean myLineMode;
92 Standard_Boolean myCircleMode;
93 Standard_Boolean myConicMode;
99 #include <ShapeUpgrade_ConvertCurve3dToBezier.lxx>
105 #endif // _ShapeUpgrade_ConvertCurve3dToBezier_HeaderFile