1 // Created on: 1995-03-14
2 // Created by: Modelistation
3 // Copyright (c) 1995-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 AppCont_LeastSquare_HeaderFile
18 #define AppCont_LeastSquare_HeaderFile
20 #include <AppCont_Function.hxx>
21 #include <AppParCurves_MultiCurve.hxx>
22 #include <math_Vector.hxx>
23 #include <math_Matrix.hxx>
24 #include <NCollection_Array1.hxx>
25 #include <AppParCurves_Constraint.hxx>
28 struct PeriodicityInfo
30 Standard_Boolean isPeriodic;
31 Standard_Real myPeriod;
34 class AppCont_LeastSquare
38 Standard_EXPORT AppCont_LeastSquare(const AppCont_Function& SSP,
39 const Standard_Real U0,
40 const Standard_Real U1,
41 const AppParCurves_Constraint FirstCons,
42 const AppParCurves_Constraint LastCons,
43 const Standard_Integer Deg,
44 const Standard_Integer NbPoints);
46 Standard_EXPORT const AppParCurves_MultiCurve& Value();
48 Standard_EXPORT void Error(Standard_Real& F,
49 Standard_Real& MaxE3d,
50 Standard_Real& MaxE2d) const;
52 Standard_EXPORT Standard_Boolean IsDone() const;
56 //! Fix border point evaluation.
57 void FixSingleBorderPoint(const AppCont_Function& theSSP,
58 const Standard_Real theU,
59 const Standard_Real theU0,
60 const Standard_Real theU1,
61 NCollection_Array1<gp_Pnt2d>& theFix2d,
62 NCollection_Array1<gp_Pnt>& theFix);
64 AppParCurves_MultiCurve mySCU;
69 NCollection_Array1<PeriodicityInfo> myPerInfo;
70 Standard_Boolean myDone;
71 Standard_Integer myDegre;
72 Standard_Integer myNbdiscret, myNbP, myNbP2d;