Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-24 09:16:28

0001 // Created on: 1993-10-06
0002 // Created by: Bruno DUMORTIER
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _GeomFill_BezierCurves_HeaderFile
0018 #define _GeomFill_BezierCurves_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <GeomFill_FillingStyle.hxx>
0025 class Geom_BezierSurface;
0026 class Geom_BezierCurve;
0027 
0028 //! This class provides an algorithm for constructing a Bezier surface filled from
0029 //! contiguous Bezier curves which form its boundaries.
0030 //! The algorithm accepts two, three or four Bezier curves
0031 //! as the boundaries of the target surface.
0032 //! A range of filling styles - more or less rounded, more or less flat - is available.
0033 //! A BezierCurves object provides a framework for:
0034 //! -   defining the boundaries, and the filling style of the surface
0035 //! -   implementing the construction algorithm
0036 //! -   consulting the result.
0037 //! Warning
0038 //! Some problems may show up with rational curves.
0039 class GeomFill_BezierCurves
0040 {
0041 public:
0042   DEFINE_STANDARD_ALLOC
0043 
0044   //! Constructs an empty framework for building a Bezier
0045   //! surface from contiguous Bezier curves.
0046   //! You use the Init function to define the boundaries of the surface.
0047   Standard_EXPORT GeomFill_BezierCurves();
0048 
0049   //! Constructs a framework for building a Bezier surface
0050   //! from the four contiguous Bezier curves, C1, C2, C3 and C4
0051   //! Raises Standard_ConstructionError if the curves are not contiguous.
0052   Standard_EXPORT GeomFill_BezierCurves(const Handle(Geom_BezierCurve)& C1,
0053                                         const Handle(Geom_BezierCurve)& C2,
0054                                         const Handle(Geom_BezierCurve)& C3,
0055                                         const Handle(Geom_BezierCurve)& C4,
0056                                         const GeomFill_FillingStyle     Type);
0057 
0058   //! Constructs a framework for building a Bezier surface
0059   //! from the three contiguous Bezier curves, C1, C2 and C3
0060   //! Raises Standard_ConstructionError if the curves are not contiguous.
0061   Standard_EXPORT GeomFill_BezierCurves(const Handle(Geom_BezierCurve)& C1,
0062                                         const Handle(Geom_BezierCurve)& C2,
0063                                         const Handle(Geom_BezierCurve)& C3,
0064                                         const GeomFill_FillingStyle     Type);
0065 
0066   //! Constructs a framework for building a Bezier surface
0067   //! from the two contiguous Bezier curves, C1 and C2
0068   //! Raises Standard_ConstructionError if the curves are not contiguous.
0069   Standard_EXPORT GeomFill_BezierCurves(const Handle(Geom_BezierCurve)& C1,
0070                                         const Handle(Geom_BezierCurve)& C2,
0071                                         const GeomFill_FillingStyle     Type);
0072 
0073   //! if the curves cannot be joined
0074   Standard_EXPORT void Init(const Handle(Geom_BezierCurve)& C1,
0075                             const Handle(Geom_BezierCurve)& C2,
0076                             const Handle(Geom_BezierCurve)& C3,
0077                             const Handle(Geom_BezierCurve)& C4,
0078                             const GeomFill_FillingStyle     Type);
0079 
0080   //! if the curves cannot be joined
0081   Standard_EXPORT void Init(const Handle(Geom_BezierCurve)& C1,
0082                             const Handle(Geom_BezierCurve)& C2,
0083                             const Handle(Geom_BezierCurve)& C3,
0084                             const GeomFill_FillingStyle     Type);
0085 
0086   //! Initializes or reinitializes this algorithm with two, three,
0087   //! or four curves - C1, C2, C3, and C4 - and Type, one
0088   //! of the following filling styles:
0089   //! -   GeomFill_Stretch - the style with the flattest patch
0090   //! -   GeomFill_Coons - a rounded style of patch with
0091   //! less depth than that of Curved
0092   //! -   GeomFill_Curved - the style with the most rounded patch.
0093   //! Exceptions
0094   //! Standard_ConstructionError if the curves are not contiguous.
0095   Standard_EXPORT void Init(const Handle(Geom_BezierCurve)& C1,
0096                             const Handle(Geom_BezierCurve)& C2,
0097                             const GeomFill_FillingStyle     Type);
0098 
0099   //! Returns the Bezier surface resulting from the
0100   //! computation performed by this algorithm.
0101   const Handle(Geom_BezierSurface)& Surface() const;
0102 
0103 protected:
0104 private:
0105   Handle(Geom_BezierSurface) mySurface;
0106 };
0107 
0108 #include <GeomFill_BezierCurves.lxx>
0109 
0110 #endif // _GeomFill_BezierCurves_HeaderFile