42cf5bc1 |
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_BSplineCurves_HeaderFile |
18 | #define _GeomFill_BSplineCurves_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_BSplineSurface; |
26 | class Standard_ConstructionError; |
27 | class Geom_BSplineCurve; |
28 | |
29 | |
30 | //! An algorithm for constructing a BSpline surface filled |
31 | //! from contiguous BSpline curves which form its boundaries. |
32 | //! The algorithm accepts two, three or four BSpline |
33 | //! curves as the boundaries of the target surface. |
34 | //! A range of filling styles - more or less rounded, more |
35 | //! or less flat - is available. |
36 | //! A BSplineCurves object provides a framework for: |
37 | //! - defining the boundaries, and the filling style of the surface |
38 | //! - implementing the construction algorithm |
39 | //! - consulting the result. |
40 | //! Warning |
41 | //! Some problems may show up with rational curves. |
42 | class GeomFill_BSplineCurves |
43 | { |
44 | public: |
45 | |
46 | DEFINE_STANDARD_ALLOC |
47 | |
48 | |
49 | //! Constructs a default BSpline surface framework. |
50 | Standard_EXPORT GeomFill_BSplineCurves(); |
51 | |
52 | Standard_EXPORT GeomFill_BSplineCurves(const Handle(Geom_BSplineCurve)& C1, const Handle(Geom_BSplineCurve)& C2, const Handle(Geom_BSplineCurve)& C3, const Handle(Geom_BSplineCurve)& C4, const GeomFill_FillingStyle Type); |
53 | |
54 | Standard_EXPORT GeomFill_BSplineCurves(const Handle(Geom_BSplineCurve)& C1, const Handle(Geom_BSplineCurve)& C2, const Handle(Geom_BSplineCurve)& C3, const GeomFill_FillingStyle Type); |
55 | |
56 | //! Constructs a framework for building a BSpline surface from either |
57 | //! - the four contiguous BSpline curves, C1, C2, C3 and C4, or |
58 | //! - the three contiguous BSpline curves, C1, C2 and C3, or |
59 | //! - the two contiguous BSpline curves, C1 and C2. |
60 | //! The type of filling style Type to be used is one of: |
61 | //! - GeomFill_Stretch - the style with the flattest patch |
62 | //! - GeomFill_Coons - a rounded style of patch with |
63 | //! less depth than that of Curved |
64 | //! - GeomFill_Curved - the style with the most rounded |
65 | //! patch.Constructs a framework for building a BSpline |
66 | //! surface common to the two BSpline curves, C1 and C2. |
67 | //! Exceptions |
68 | //! Standard_ConstructionError if the curves are not contiguous. |
69 | Standard_EXPORT GeomFill_BSplineCurves(const Handle(Geom_BSplineCurve)& C1, const Handle(Geom_BSplineCurve)& C2, const GeomFill_FillingStyle Type); |
70 | |
71 | //! if the curves cannot be joined |
72 | Standard_EXPORT void Init (const Handle(Geom_BSplineCurve)& C1, const Handle(Geom_BSplineCurve)& C2, const Handle(Geom_BSplineCurve)& C3, const Handle(Geom_BSplineCurve)& C4, const GeomFill_FillingStyle Type); |
73 | |
74 | //! if the curves cannot be joined |
75 | Standard_EXPORT void Init (const Handle(Geom_BSplineCurve)& C1, const Handle(Geom_BSplineCurve)& C2, const Handle(Geom_BSplineCurve)& C3, const GeomFill_FillingStyle Type); |
76 | |
77 | //! Initializes or reinitializes this algorithm with two, three, |
78 | //! or four curves - C1, C2, C3, and C4 - and Type, one |
79 | //! of the following filling styles: |
80 | //! - GeomFill_Stretch - the style with the flattest patch |
81 | //! - GeomFill_Coons - a rounded style of patch with |
82 | //! less depth than that of Curved |
83 | //! - GeomFill_Curved - the style with the most rounded patch. |
84 | //! Exceptions |
85 | //! Standard_ConstructionError if the curves are not contiguous. |
86 | Standard_EXPORT void Init (const Handle(Geom_BSplineCurve)& C1, const Handle(Geom_BSplineCurve)& C2, const GeomFill_FillingStyle Type); |
87 | |
88 | //! Returns the BSpline surface Surface resulting from |
89 | //! the computation performed by this algorithm. |
90 | const Handle(Geom_BSplineSurface)& Surface() const; |
91 | |
92 | |
93 | |
94 | |
95 | protected: |
96 | |
97 | |
98 | |
99 | |
100 | |
101 | private: |
102 | |
103 | |
104 | |
105 | Handle(Geom_BSplineSurface) mySurface; |
106 | |
107 | |
108 | }; |
109 | |
110 | |
111 | #include <GeomFill_BSplineCurves.lxx> |
112 | |
113 | |
114 | |
115 | |
116 | |
117 | #endif // _GeomFill_BSplineCurves_HeaderFile |