Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-22 08:57:58

0001 // Created on: 1994-02-18
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_SectionGenerator_HeaderFile
0018 #define _GeomFill_SectionGenerator_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <NCollection_Array1.hxx>
0025 #include <NCollection_HArray1.hxx>
0026 #include <GeomFill_Profiler.hxx>
0027 #include <Standard_Integer.hxx>
0028 #include <gp_Pnt.hxx>
0029 #include <gp_Vec.hxx>
0030 #include <gp_Pnt2d.hxx>
0031 #include <gp_Vec2d.hxx>
0032 
0033 //! gives the functions needed for instantiation from
0034 //! AppSurf in AppBlend. Allow to evaluate a surface
0035 //! passing by all the curves if the Profiler.
0036 class GeomFill_SectionGenerator : public GeomFill_Profiler
0037 {
0038 public:
0039   DEFINE_STANDARD_ALLOC
0040 
0041   Standard_EXPORT GeomFill_SectionGenerator();
0042 
0043   Standard_EXPORT void SetParam(const occ::handle<NCollection_HArray1<double>>& Params);
0044 
0045   Standard_EXPORT void GetShape(int& NbPoles, int& NbKnots, int& Degree, int& NbPoles2d) const;
0046 
0047   Standard_EXPORT void Knots(NCollection_Array1<double>& TKnots) const;
0048 
0049   Standard_EXPORT void Mults(NCollection_Array1<int>& TMults) const;
0050 
0051   //! Used for the first and last section
0052   //! The method returns true if the derivatives
0053   //! are computed, otherwise it returns false.
0054   Standard_EXPORT bool Section(const int                     P,
0055                                NCollection_Array1<gp_Pnt>&   Poles,
0056                                NCollection_Array1<gp_Vec>&   DPoles,
0057                                NCollection_Array1<gp_Pnt2d>& Poles2d,
0058                                NCollection_Array1<gp_Vec2d>& DPoles2d,
0059                                NCollection_Array1<double>&   Weigths,
0060                                NCollection_Array1<double>&   DWeigths) const;
0061 
0062   Standard_EXPORT void Section(const int                     P,
0063                                NCollection_Array1<gp_Pnt>&   Poles,
0064                                NCollection_Array1<gp_Pnt2d>& Poles2d,
0065                                NCollection_Array1<double>&   Weigths) const;
0066 
0067   //! Returns the parameter of Section<P>, to impose it for the
0068   //! approximation.
0069   Standard_EXPORT double Parameter(const int P) const;
0070 
0071 protected:
0072   occ::handle<NCollection_HArray1<double>> myParams;
0073 };
0074 
0075 #endif // _GeomFill_SectionGenerator_HeaderFile