0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[occt.git] / src / ShapeUpgrade / ShapeUpgrade_ConvertSurfaceToBezierBasis.hxx
1 // Created on: 1999-05-21
2 // Created by: Pavel DURANDIN
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_ConvertSurfaceToBezierBasis_HeaderFile
18 #define _ShapeUpgrade_ConvertSurfaceToBezierBasis_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Standard_Boolean.hxx>
24 #include <ShapeUpgrade_SplitSurface.hxx>
25 class ShapeExtend_CompositeSurface;
26
27
28 class ShapeUpgrade_ConvertSurfaceToBezierBasis;
29 DEFINE_STANDARD_HANDLE(ShapeUpgrade_ConvertSurfaceToBezierBasis, ShapeUpgrade_SplitSurface)
30
31 //! Converts a plane, bspline surface, surface of revolution, surface
32 //! of extrusion, offset surface to grid of bezier basis surface (
33 //! bezier surface,
34 //! surface of revolution based on bezier curve,
35 //! offset surface based on any previous type).
36 class ShapeUpgrade_ConvertSurfaceToBezierBasis : public ShapeUpgrade_SplitSurface
37 {
38
39 public:
40
41   
42   //! Empty constructor.
43   Standard_EXPORT ShapeUpgrade_ConvertSurfaceToBezierBasis();
44   
45   //! Splits a list of beziers computed by Compute method according
46   //! the split values and splitting parameters.
47   Standard_EXPORT virtual void Build (const Standard_Boolean Segment) Standard_OVERRIDE;
48   
49   //! Converts surface into a grid of bezier based surfaces, and
50   //! stores this grid.
51   Standard_EXPORT virtual void Compute (const Standard_Boolean Segment) Standard_OVERRIDE;
52   
53   //! Returns the grid of bezier based surfaces correspondent to
54   //! original surface.
55   Standard_EXPORT Handle(ShapeExtend_CompositeSurface) Segments() const;
56   
57   //! Sets mode for conversion Geom_Plane to Bezier
58     void SetPlaneMode (const Standard_Boolean mode);
59   
60   //! Returns the Geom_Pline conversion mode.
61     Standard_Boolean GetPlaneMode() const;
62   
63   //! Sets mode for conversion Geom_SurfaceOfRevolution to Bezier
64     void SetRevolutionMode (const Standard_Boolean mode);
65   
66   //! Returns the Geom_SurfaceOfRevolution conversion mode.
67     Standard_Boolean GetRevolutionMode() const;
68   
69   //! Sets mode for conversion Geom_SurfaceOfLinearExtrusion to Bezier
70     void SetExtrusionMode (const Standard_Boolean mode);
71   
72   //! Returns the Geom_SurfaceOfLinearExtrusion conversion mode.
73     Standard_Boolean GetExtrusionMode() const;
74   
75   //! Sets mode for conversion Geom_BSplineSurface to Bezier
76     void SetBSplineMode (const Standard_Boolean mode);
77   
78   //! Returns the Geom_BSplineSurface conversion mode.
79     Standard_Boolean GetBSplineMode() const;
80
81
82
83
84   DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_ConvertSurfaceToBezierBasis,ShapeUpgrade_SplitSurface)
85
86 protected:
87
88
89
90
91 private:
92
93
94   Handle(ShapeExtend_CompositeSurface) mySegments;
95   Standard_Boolean myPlaneMode;
96   Standard_Boolean myRevolutionMode;
97   Standard_Boolean myExtrusionMode;
98   Standard_Boolean myBSplineMode;
99
100
101 };
102
103
104 #include <ShapeUpgrade_ConvertSurfaceToBezierBasis.lxx>
105
106
107
108
109
110 #endif // _ShapeUpgrade_ConvertSurfaceToBezierBasis_HeaderFile