1 // Created on: 1999-05-14
2 // Created by: Pavel DURANDIN
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_ShapeConvertToBezier_HeaderFile
18 #define _ShapeUpgrade_ShapeConvertToBezier_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Integer.hxx>
26 #include <ShapeUpgrade_ShapeDivide.hxx>
28 class ShapeUpgrade_FaceDivide;
32 //! API class for performing conversion of 3D, 2D curves to bezier curves
33 //! and surfaces to bezier based surfaces (
35 //! surface of revolution based on bezier curve,
36 //! offset surface based on any previous type).
37 class ShapeUpgrade_ShapeConvertToBezier : public ShapeUpgrade_ShapeDivide
44 //! Empty constructor.
45 Standard_EXPORT ShapeUpgrade_ShapeConvertToBezier();
47 //! Initialize by a Shape.
48 Standard_EXPORT ShapeUpgrade_ShapeConvertToBezier(const TopoDS_Shape& S);
50 //! Sets mode for conversion 2D curves to bezier.
51 void Set2dConversion (const Standard_Boolean mode);
53 //! Returns the 2D conversion mode.
54 Standard_Boolean Get2dConversion() const;
56 //! Sets mode for conversion 3d curves to bezier.
57 void Set3dConversion (const Standard_Boolean mode);
59 //! Returns the 3D conversion mode.
60 Standard_Boolean Get3dConversion() const;
62 //! Sets mode for conversion surfaces curves to
64 void SetSurfaceConversion (const Standard_Boolean mode);
66 //! Returns the surface conversion mode.
67 Standard_Boolean GetSurfaceConversion() const;
69 //! Sets mode for conversion Geom_Line to bezier.
70 void Set3dLineConversion (const Standard_Boolean mode);
72 //! Returns the Geom_Line conversion mode.
73 Standard_Boolean Get3dLineConversion() const;
75 //! Sets mode for conversion Geom_Circle to bezier.
76 void Set3dCircleConversion (const Standard_Boolean mode);
78 //! Returns the Geom_Circle conversion mode.
79 Standard_Boolean Get3dCircleConversion() const;
81 //! Sets mode for conversion Geom_Conic to bezier.
82 void Set3dConicConversion (const Standard_Boolean mode);
84 //! Returns the Geom_Conic conversion mode.
85 Standard_Boolean Get3dConicConversion() const;
87 //! Sets mode for conversion Geom_Plane to Bezier
88 void SetPlaneMode (const Standard_Boolean mode);
90 //! Returns the Geom_Pline conversion mode.
91 Standard_Boolean GetPlaneMode() const;
93 //! Sets mode for conversion Geom_SurfaceOfRevolution to Bezier
94 void SetRevolutionMode (const Standard_Boolean mode);
96 //! Returns the Geom_SurfaceOfRevolution conversion mode.
97 Standard_Boolean GetRevolutionMode() const;
99 //! Sets mode for conversion Geom_SurfaceOfLinearExtrusion to Bezier
100 void SetExtrusionMode (const Standard_Boolean mode);
102 //! Returns the Geom_SurfaceOfLinearExtrusion conversion mode.
103 Standard_Boolean GetExtrusionMode() const;
105 //! Sets mode for conversion Geom_BSplineSurface to Bezier
106 void SetBSplineMode (const Standard_Boolean mode);
108 //! Returns the Geom_BSplineSurface conversion mode.
109 Standard_Boolean GetBSplineMode() const;
111 //! Performs converting and computes the resulting shape
112 Standard_EXPORT virtual Standard_Boolean Perform (const Standard_Boolean newContext = Standard_True) Standard_OVERRIDE;
120 //! Returns the tool for dividing faces.
121 Standard_EXPORT virtual Handle(ShapeUpgrade_FaceDivide) GetSplitFaceTool() const Standard_OVERRIDE;
123 Standard_EXPORT virtual Message_Msg GetFaceMsg() const Standard_OVERRIDE;
125 Standard_EXPORT virtual Message_Msg GetWireMsg() const Standard_OVERRIDE;
127 //! Returns a message decsribing modification of a shape.
128 Standard_EXPORT virtual Message_Msg GetEdgeMsg() const Standard_OVERRIDE;
137 Standard_Boolean my2dMode;
138 Standard_Boolean my3dMode;
139 Standard_Boolean mySurfaceMode;
140 Standard_Boolean my3dLineMode;
141 Standard_Boolean my3dCircleMode;
142 Standard_Boolean my3dConicMode;
143 Standard_Boolean myPlaneMode;
144 Standard_Boolean myRevolutionMode;
145 Standard_Boolean myExtrusionMode;
146 Standard_Boolean myBSplineMode;
147 Standard_Integer myLevel;
153 #include <ShapeUpgrade_ShapeConvertToBezier.lxx>
159 #endif // _ShapeUpgrade_ShapeConvertToBezier_HeaderFile