1 // Created on: 1994-02-17
2 // Created by: Bruno DUMORTIER
3 // Copyright (c) 1994-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 _GeomFill_Profiler_HeaderFile
18 #define _GeomFill_Profiler_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TColGeom_SequenceOfCurve.hxx>
25 #include <Standard_Integer.hxx>
26 #include <TColgp_Array1OfPnt.hxx>
27 #include <TColStd_Array1OfReal.hxx>
28 #include <TColStd_Array1OfInteger.hxx>
32 //! Evaluation of the common BSplineProfile of a group
33 //! of curves from Geom. All the curves will have the
34 //! same degree, the same knot-vector, so the same
36 class GeomFill_Profiler
43 Standard_EXPORT GeomFill_Profiler();
44 Standard_EXPORT virtual ~GeomFill_Profiler();
46 Standard_EXPORT void AddCurve (const Handle(Geom_Curve)& Curve);
48 //! Converts all curves to BSplineCurves.
49 //! Set them to the common profile.
50 //! <PTol> is used to compare 2 knots.
51 Standard_EXPORT virtual void Perform (const Standard_Real PTol);
53 //! Raises if not yet perform
54 Standard_EXPORT Standard_Integer Degree() const;
56 Standard_Boolean IsPeriodic() const;
58 //! Raises if not yet perform
59 Standard_EXPORT Standard_Integer NbPoles() const;
61 //! returns in <Poles> the poles of the BSplineCurve
62 //! from index <Index> adjusting to the current profile.
63 //! Raises if not yet perform
64 //! Raises if <Index> not in the range [1,NbCurves]
65 //! if the length of <Poles> is not equal to
67 Standard_EXPORT void Poles (const Standard_Integer Index, TColgp_Array1OfPnt& Poles) const;
69 //! returns in <Weights> the weights of the BSplineCurve
70 //! from index <Index> adjusting to the current profile.
71 //! Raises if not yet perform
72 //! Raises if <Index> not in the range [1,NbCurves] or
73 //! if the length of <Weights> is not equal to
75 Standard_EXPORT void Weights (const Standard_Integer Index, TColStd_Array1OfReal& Weights) const;
77 //! Raises if not yet perform
78 Standard_EXPORT Standard_Integer NbKnots() const;
80 //! Raises if not yet perform
81 //! Raises if the lengths of <Knots> and <Mults> are
82 //! not equal to NbKnots().
83 Standard_EXPORT void KnotsAndMults (TColStd_Array1OfReal& Knots, TColStd_Array1OfInteger& Mults) const;
85 const Handle(Geom_Curve)& Curve (const Standard_Integer Index) const;
94 TColGeom_SequenceOfCurve mySequence;
95 Standard_Boolean myIsDone;
96 Standard_Boolean myIsPeriodic;
108 #include <GeomFill_Profiler.lxx>
114 #endif // _GeomFill_Profiler_HeaderFile