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_Boolean.hxx>
26 #include <Standard_Real.hxx>
27 #include <Standard_Integer.hxx>
28 #include <TColgp_Array1OfPnt.hxx>
29 #include <TColStd_Array1OfReal.hxx>
30 #include <TColStd_Array1OfInteger.hxx>
31 class StdFail_NotDone;
32 class Standard_DomainError;
36 //! Evaluation of the common BSplineProfile of a group
37 //! of curves from Geom. All the curves will have the
38 //! same degree, the same knot-vector, so the same
40 class GeomFill_Profiler
47 Standard_EXPORT GeomFill_Profiler();
48 Standard_EXPORT virtual ~GeomFill_Profiler();
50 Standard_EXPORT void AddCurve (const Handle(Geom_Curve)& Curve);
52 //! Converts all curves to BSplineCurves.
53 //! Set them to the common profile.
54 //! <PTol> is used to compare 2 knots.
55 Standard_EXPORT virtual void Perform (const Standard_Real PTol);
57 //! Raises if not yet perform
58 Standard_EXPORT Standard_Integer Degree() const;
60 Standard_Boolean IsPeriodic() const;
62 //! Raises if not yet perform
63 Standard_EXPORT Standard_Integer NbPoles() const;
65 //! returns in <Poles> the poles of the BSplineCurve
66 //! from index <Index> adjusting to the current profile.
67 //! Raises if not yet perform
68 //! Raises if <Index> not in the range [1,NbCurves]
69 //! if the length of <Poles> is not equal to
71 Standard_EXPORT void Poles (const Standard_Integer Index, TColgp_Array1OfPnt& Poles) const;
73 //! returns in <Weights> the weights of the BSplineCurve
74 //! from index <Index> adjusting to the current profile.
75 //! Raises if not yet perform
76 //! Raises if <Index> not in the range [1,NbCurves] or
77 //! if the length of <Weights> is not equal to
79 Standard_EXPORT void Weights (const Standard_Integer Index, TColStd_Array1OfReal& Weights) const;
81 //! Raises if not yet perform
82 Standard_EXPORT Standard_Integer NbKnots() const;
84 //! Raises if not yet perform
85 //! Raises if the lengthes of <Knots> and <Mults> are
86 //! not equal to NbKnots().
87 Standard_EXPORT void KnotsAndMults (TColStd_Array1OfReal& Knots, TColStd_Array1OfInteger& Mults) const;
89 const Handle(Geom_Curve)& Curve (const Standard_Integer Index) const;
98 TColGeom_SequenceOfCurve mySequence;
99 Standard_Boolean myIsDone;
100 Standard_Boolean myIsPeriodic;
112 #include <GeomFill_Profiler.lxx>
118 #endif // _GeomFill_Profiler_HeaderFile