// File generated by CPPExt (Value)
//
//                     Copyright (C) 1991 - 2000 by  
//                      Matra Datavision SA.  All rights reserved.
//  
//                     Copyright (C) 2001 - 2004 by
//                     Open CASCADE SA.  All rights reserved.
// 
// This file is part of the Open CASCADE Technology software.
//
// This software may be distributed and/or modified under the terms and
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
// and appearing in the file LICENSE included in the packaging of this file.
//  
// This software is distributed on an "AS IS" basis, without warranty of any
// kind, and Open CASCADE SA hereby disclaims all such warranties,
// including without limitation, any warranties of merchantability, fitness
// for a particular purpose or non-infringement. Please see the License for
// the specific terms and conditions governing rights and limitations under the
// License.

#ifndef _BRepApprox_TheComputeLineBezierOfApprox_HeaderFile
#define _BRepApprox_TheComputeLineBezierOfApprox_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _AppParCurves_SequenceOfMultiCurve_HeaderFile
#include <AppParCurves_SequenceOfMultiCurve.hxx>
#endif
#ifndef _AppParCurves_MultiCurve_HeaderFile
#include <AppParCurves_MultiCurve.hxx>
#endif
#ifndef _AppParCurves_MultiBSpCurve_HeaderFile
#include <AppParCurves_MultiBSpCurve.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Approx_ParametrizationType_HeaderFile
#include <Approx_ParametrizationType.hxx>
#endif
#ifndef _Handle_TColStd_HArray1OfReal_HeaderFile
#include <Handle_TColStd_HArray1OfReal.hxx>
#endif
#ifndef _Approx_SequenceOfHArray1OfReal_HeaderFile
#include <Approx_SequenceOfHArray1OfReal.hxx>
#endif
#ifndef _TColStd_SequenceOfReal_HeaderFile
#include <TColStd_SequenceOfReal.hxx>
#endif
#ifndef _Handle_AppParCurves_HArray1OfConstraintCouple_HeaderFile
#include <Handle_AppParCurves_HArray1OfConstraintCouple.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _AppParCurves_Constraint_HeaderFile
#include <AppParCurves_Constraint.hxx>
#endif
class TColStd_HArray1OfReal;
class AppParCurves_HArray1OfConstraintCouple;
class BRepApprox_TheMultiLineOfApprox;
class BRepApprox_TheMultiLineToolOfApprox;
class BRepApprox_MyGradientOfTheComputeLineBezierOfApprox;
class BRepApprox_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfApprox;
class BRepApprox_ResConstraintOfMyGradientOfTheComputeLineBezierOfApprox;
class BRepApprox_ParFunctionOfMyGradientOfTheComputeLineBezierOfApprox;
class BRepApprox_Gradient_BFGSOfMyGradientOfTheComputeLineBezierOfApprox;
class math_Vector;
class AppParCurves_MultiCurve;
class AppParCurves_MultiBSpCurve;
class TColStd_Array1OfReal;



class BRepApprox_TheComputeLineBezierOfApprox  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  
  Standard_EXPORT   BRepApprox_TheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& Line,const Standard_Integer degreemin = 4,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-3,const Standard_Real Tolerance2d = 1.0e-6,const Standard_Integer NbIterations = 5,const Standard_Boolean cutting = Standard_True,const Approx_ParametrizationType parametrization = Approx_ChordLength,const Standard_Boolean Squares = Standard_False);
  
  Standard_EXPORT   BRepApprox_TheComputeLineBezierOfApprox(const BRepApprox_TheMultiLineOfApprox& Line,const math_Vector& Parameters,const Standard_Integer degreemin = 4,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-03,const Standard_Real Tolerance2d = 1.0e-06,const Standard_Integer NbIterations = 5,const Standard_Boolean cutting = Standard_True,const Standard_Boolean Squares = Standard_False);
  
  Standard_EXPORT   BRepApprox_TheComputeLineBezierOfApprox(const math_Vector& Parameters,const Standard_Integer degreemin = 4,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-03,const Standard_Real Tolerance2d = 1.0e-06,const Standard_Integer NbIterations = 5,const Standard_Boolean cutting = Standard_True,const Standard_Boolean Squares = Standard_False);
  
  Standard_EXPORT   BRepApprox_TheComputeLineBezierOfApprox(const Standard_Integer degreemin = 4,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-03,const Standard_Real Tolerance2d = 1.0e-06,const Standard_Integer NbIterations = 5,const Standard_Boolean cutting = Standard_True,const Approx_ParametrizationType parametrization = Approx_ChordLength,const Standard_Boolean Squares = Standard_False);
  
  Standard_EXPORT     void Init(const Standard_Integer degreemin = 4,const Standard_Integer degreemax = 8,const Standard_Real Tolerance3d = 1.0e-03,const Standard_Real Tolerance2d = 1.0e-06,const Standard_Integer NbIterations = 5,const Standard_Boolean cutting = Standard_True,const Approx_ParametrizationType parametrization = Approx_ChordLength,const Standard_Boolean Squares = Standard_False) ;
  
  Standard_EXPORT     void Perform(const BRepApprox_TheMultiLineOfApprox& Line) ;
  
  Standard_EXPORT     void SetDegrees(const Standard_Integer degreemin,const Standard_Integer degreemax) ;
  
  Standard_EXPORT     void SetTolerances(const Standard_Real Tolerance3d,const Standard_Real Tolerance2d) ;
  
  Standard_EXPORT     void SetConstraints(const AppParCurves_Constraint firstC,const AppParCurves_Constraint lastC) ;
  
  Standard_EXPORT     Standard_Boolean IsAllApproximated() const;
  
  Standard_EXPORT     Standard_Boolean IsToleranceReached() const;
  
  Standard_EXPORT     void Error(const Standard_Integer Index,Standard_Real& tol3d,Standard_Real& tol2d) const;
  
  Standard_EXPORT     Standard_Integer NbMultiCurves() const;
  
  Standard_EXPORT    const AppParCurves_MultiCurve& Value(const Standard_Integer Index = 1) const;
  
  Standard_EXPORT     AppParCurves_MultiCurve& ChangeValue(const Standard_Integer Index = 1) ;
  
  Standard_EXPORT    const AppParCurves_MultiBSpCurve& SplineValue() ;
  
  Standard_EXPORT     void Parametrization(Approx_ParametrizationType& partype) const;
  
  Standard_EXPORT    const TColStd_Array1OfReal& Parameters(const Standard_Integer Index = 1) const;





protected:





private:

  
  Standard_EXPORT     Standard_Boolean Compute(const BRepApprox_TheMultiLineOfApprox& Line,const Standard_Integer fpt,const Standard_Integer lpt,math_Vector& Para,Standard_Real& TheTol3d,Standard_Real& TheTol2d) ;
  
  Standard_EXPORT     Standard_Boolean ComputeCurve(const BRepApprox_TheMultiLineOfApprox& Line,const Standard_Integer firspt,const Standard_Integer lastpt) ;
  
  Standard_EXPORT     void Parameters(const BRepApprox_TheMultiLineOfApprox& Line,const Standard_Integer firstP,const Standard_Integer LastP,math_Vector& TheParameters) const;
  
  Standard_EXPORT     Standard_Real SearchFirstLambda(const BRepApprox_TheMultiLineOfApprox& Line,const math_Vector& Para,const math_Vector& V,const Standard_Integer index) const;
  
  Standard_EXPORT     Standard_Real SearchLastLambda(const BRepApprox_TheMultiLineOfApprox& Line,const math_Vector& Para,const math_Vector& V,const Standard_Integer index) const;
  
  Standard_EXPORT     void FirstTangencyVector(const BRepApprox_TheMultiLineOfApprox& Line,const Standard_Integer index,math_Vector& V) const;
  
  Standard_EXPORT     void LastTangencyVector(const BRepApprox_TheMultiLineOfApprox& Line,const Standard_Integer index,math_Vector& V) const;


AppParCurves_SequenceOfMultiCurve myMultiCurves;
AppParCurves_MultiCurve TheMultiCurve;
AppParCurves_MultiBSpCurve myspline;
Standard_Boolean alldone;
Standard_Boolean tolreached;
Approx_ParametrizationType Par;
Handle_TColStd_HArray1OfReal myParameters;
Handle_TColStd_HArray1OfReal myfirstParam;
Approx_SequenceOfHArray1OfReal myPar;
TColStd_SequenceOfReal Tolers3d;
TColStd_SequenceOfReal Tolers2d;
Handle_AppParCurves_HArray1OfConstraintCouple myConstraints;
Standard_Integer mydegremin;
Standard_Integer mydegremax;
Standard_Real mytol3d;
Standard_Real mytol2d;
Standard_Real currenttol3d;
Standard_Real currenttol2d;
Standard_Boolean mycut;
Standard_Boolean mysquares;
Standard_Integer myitermax;
AppParCurves_Constraint myfirstC;
AppParCurves_Constraint mylastC;
Standard_Boolean IsClear;
Standard_Integer nbML;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif
