Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:46:48

0001 // Created on: 1994-02-17
0002 // Created by: Bruno DUMORTIER
0003 // Copyright (c) 1994-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_Profiler_HeaderFile
0018 #define _GeomFill_Profiler_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TColGeom_SequenceOfCurve.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TColgp_Array1OfPnt.hxx>
0027 #include <TColStd_Array1OfReal.hxx>
0028 #include <TColStd_Array1OfInteger.hxx>
0029 class Geom_Curve;
0030 
0031 
0032 //! Evaluation of the common BSplineProfile of a group
0033 //! of curves  from Geom. All the curves will have the
0034 //! same  degree,  the same knot-vector, so  the  same
0035 //! number of poles.
0036 class GeomFill_Profiler 
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043   Standard_EXPORT GeomFill_Profiler();
0044   Standard_EXPORT virtual ~GeomFill_Profiler();
0045   
0046   Standard_EXPORT void AddCurve (const Handle(Geom_Curve)& Curve);
0047   
0048   //! Converts all curves to BSplineCurves.
0049   //! Set them to the common profile.
0050   //! <PTol> is used to compare 2 knots.
0051   Standard_EXPORT virtual void Perform (const Standard_Real PTol);
0052   
0053   //! Raises if not yet perform
0054   Standard_EXPORT Standard_Integer Degree() const;
0055   
0056     Standard_Boolean IsPeriodic() const;
0057   
0058   //! Raises if not yet perform
0059   Standard_EXPORT Standard_Integer NbPoles() const;
0060   
0061   //! returns in <Poles> the  poles  of the BSplineCurve
0062   //! from index <Index> adjusting to the current profile.
0063   //! Raises if not yet perform
0064   //! Raises if <Index> not in the range [1,NbCurves]
0065   //! if  the  length  of  <Poles>  is  not  equal  to
0066   //! NbPoles().
0067   Standard_EXPORT void Poles (const Standard_Integer Index, TColgp_Array1OfPnt& Poles) const;
0068   
0069   //! returns in <Weights> the weights of the BSplineCurve
0070   //! from index <Index> adjusting to the current profile.
0071   //! Raises if not yet perform
0072   //! Raises if <Index> not in the range [1,NbCurves] or
0073   //! if  the  length  of  <Weights>  is  not  equal  to
0074   //! NbPoles().
0075   Standard_EXPORT void Weights (const Standard_Integer Index, TColStd_Array1OfReal& Weights) const;
0076   
0077   //! Raises if not yet perform
0078   Standard_EXPORT Standard_Integer NbKnots() const;
0079   
0080   //! Raises if not yet perform
0081   //! Raises if  the lengths of <Knots> and <Mults> are
0082   //! not equal to NbKnots().
0083   Standard_EXPORT void KnotsAndMults (TColStd_Array1OfReal& Knots, TColStd_Array1OfInteger& Mults) const;
0084   
0085     const Handle(Geom_Curve)& Curve (const Standard_Integer Index) const;
0086 
0087 
0088 
0089 
0090 protected:
0091 
0092 
0093 
0094   TColGeom_SequenceOfCurve mySequence;
0095   Standard_Boolean myIsDone;
0096   Standard_Boolean myIsPeriodic;
0097 
0098 
0099 private:
0100 
0101 
0102 
0103 
0104 
0105 };
0106 
0107 
0108 #include <GeomFill_Profiler.lxx>
0109 
0110 
0111 
0112 
0113 
0114 #endif // _GeomFill_Profiler_HeaderFile