Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:56

0001 // Created on: 1995-03-14
0002 // Created by: Modelistation
0003 // Copyright (c) 1995-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 AppCont_LeastSquare_HeaderFile
0018 #define AppCont_LeastSquare_HeaderFile
0019 
0020 #include <AppCont_Function.hxx>
0021 #include <AppParCurves_MultiCurve.hxx>
0022 #include <math_Matrix.hxx>
0023 #include <NCollection_Array1.hxx>
0024 #include <AppParCurves_Constraint.hxx>
0025 #include <math_Vector.hxx>
0026 
0027 struct PeriodicityInfo
0028 {
0029   Standard_Boolean isPeriodic;
0030   Standard_Real    myPeriod;
0031 };
0032 
0033 class AppCont_LeastSquare
0034 {
0035 public:
0036 
0037   Standard_EXPORT AppCont_LeastSquare(const AppCont_Function&       SSP,
0038                                       const Standard_Real           U0,
0039                                       const Standard_Real           U1,
0040                                       const AppParCurves_Constraint FirstCons,
0041                                       const AppParCurves_Constraint LastCons,
0042                                       const Standard_Integer        Deg,
0043                                       const Standard_Integer        NbPoints);
0044 
0045   Standard_EXPORT const AppParCurves_MultiCurve& Value();
0046 
0047   Standard_EXPORT void Error(Standard_Real& F, 
0048                              Standard_Real& MaxE3d,
0049                              Standard_Real& MaxE2d) const;
0050 
0051   Standard_EXPORT Standard_Boolean IsDone() const;
0052 
0053 private:
0054 
0055   //! Fix border point evaluation.
0056   void FixSingleBorderPoint(const AppCont_Function&   theSSP,
0057                             const Standard_Real       theU,
0058                             const Standard_Real       theU0,
0059                             const Standard_Real       theU1,
0060                             NCollection_Array1<gp_Pnt2d>& theFix2d,
0061                             NCollection_Array1<gp_Pnt>&   theFix);
0062 
0063   AppParCurves_MultiCurve mySCU;
0064   math_Matrix myPoints;
0065   math_Matrix myPoles;
0066   math_Vector myParam;
0067   math_Matrix myVB;
0068   NCollection_Array1<PeriodicityInfo> myPerInfo;
0069   Standard_Boolean myDone;
0070   Standard_Integer myDegre;
0071   Standard_Integer myNbdiscret, myNbP, myNbP2d;
0072 };
0073 
0074 #endif