0030675: Visualization - remove redundant proxy classes in hierarchy of PrsMgr_Presen...
[occt.git] / src / GeomFill / GeomFill_BezierCurves.hxx
1 // Created on: 1993-10-06
2 // Created by: Bruno DUMORTIER
3 // Copyright (c) 1993-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 _GeomFill_BezierCurves_HeaderFile
18 #define _GeomFill_BezierCurves_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <GeomFill_FillingStyle.hxx>
25 class Geom_BezierSurface;
26 class Standard_ConstructionError;
27 class Geom_BezierCurve;
28
29
30 //! This class provides an algorithm for constructing a Bezier surface filled from
31 //! contiguous Bezier curves which form its boundaries.
32 //! The algorithm accepts two, three or four Bezier curves
33 //! as the boundaries of the target surface.
34 //! A range of filling styles - more or less rounded, more or less flat - is available.
35 //! A BezierCurves object provides a framework for:
36 //! -   defining the boundaries, and the filling style of the surface
37 //! -   implementing the construction algorithm
38 //! -   consulting the result.
39 //! Warning
40 //! Some problems may show up with rational curves.
41 class GeomFill_BezierCurves 
42 {
43 public:
44
45   DEFINE_STANDARD_ALLOC
46
47   
48   //! Constructs an empty framework for building a Bezier
49   //! surface from contiguous Bezier curves.
50   //! You use the Init function to define the boundaries of the surface.
51   Standard_EXPORT GeomFill_BezierCurves();
52   
53   //! Constructs a framework for building a Bezier surface
54   //! from the four contiguous Bezier curves, C1, C2, C3 and C4
55   //! Raises Standard_ConstructionError if the curves are not contiguous.
56   Standard_EXPORT GeomFill_BezierCurves(const Handle(Geom_BezierCurve)& C1, const Handle(Geom_BezierCurve)& C2, const Handle(Geom_BezierCurve)& C3, const Handle(Geom_BezierCurve)& C4, const GeomFill_FillingStyle Type);
57   
58   //! Constructs a framework for building a Bezier surface
59   //! from the three contiguous Bezier curves, C1, C2 and C3
60   //! Raises Standard_ConstructionError if the curves are not contiguous.
61   Standard_EXPORT GeomFill_BezierCurves(const Handle(Geom_BezierCurve)& C1, const Handle(Geom_BezierCurve)& C2, const Handle(Geom_BezierCurve)& C3, const GeomFill_FillingStyle Type);
62   
63   //! Constructs a framework for building a Bezier surface
64   //! from the two contiguous Bezier curves, C1 and C2
65   //! Raises Standard_ConstructionError if the curves are not contiguous.
66   Standard_EXPORT GeomFill_BezierCurves(const Handle(Geom_BezierCurve)& C1, const Handle(Geom_BezierCurve)& C2, const GeomFill_FillingStyle Type);
67   
68   //! if the curves cannot be joined
69   Standard_EXPORT void Init (const Handle(Geom_BezierCurve)& C1, const Handle(Geom_BezierCurve)& C2, const Handle(Geom_BezierCurve)& C3, const Handle(Geom_BezierCurve)& C4, const GeomFill_FillingStyle Type);
70   
71   //! if the curves cannot be joined
72   Standard_EXPORT void Init (const Handle(Geom_BezierCurve)& C1, const Handle(Geom_BezierCurve)& C2, const Handle(Geom_BezierCurve)& C3, const GeomFill_FillingStyle Type);
73   
74   //! Initializes or reinitializes this algorithm with two, three,
75   //! or four curves - C1, C2, C3, and C4 - and Type, one
76   //! of the following filling styles:
77   //! -   GeomFill_Stretch - the style with the flattest patch
78   //! -   GeomFill_Coons - a rounded style of patch with
79   //! less depth than that of Curved
80   //! -   GeomFill_Curved - the style with the most rounded patch.
81   //! Exceptions
82   //! Standard_ConstructionError if the curves are not contiguous.
83   Standard_EXPORT void Init (const Handle(Geom_BezierCurve)& C1, const Handle(Geom_BezierCurve)& C2, const GeomFill_FillingStyle Type);
84   
85   //! Returns the Bezier surface resulting from the
86   //! computation performed by this algorithm.
87     const Handle(Geom_BezierSurface)& Surface() const;
88
89
90
91
92 protected:
93
94
95
96
97
98 private:
99
100
101
102   Handle(Geom_BezierSurface) mySurface;
103
104
105 };
106
107
108 #include <GeomFill_BezierCurves.lxx>
109
110
111
112
113
114 #endif // _GeomFill_BezierCurves_HeaderFile