1 // Created on: 1996-04-01
2 // Created by: Philippe MANGIN
3 // Copyright (c) 1996-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 _FairCurve_EnergyOfMVC_HeaderFile
18 #define _FairCurve_EnergyOfMVC_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Real.hxx>
25 #include <FairCurve_BattenLaw.hxx>
26 #include <FairCurve_DistributionOfTension.hxx>
27 #include <FairCurve_DistributionOfSagging.hxx>
28 #include <FairCurve_DistributionOfJerk.hxx>
29 #include <FairCurve_AnalysisCode.hxx>
30 #include <FairCurve_Energy.hxx>
31 #include <Standard_Integer.hxx>
32 #include <TColStd_HArray1OfReal.hxx>
33 #include <TColgp_HArray1OfPnt2d.hxx>
34 #include <Standard_Boolean.hxx>
35 #include <math_Vector.hxx>
37 // resolve name collisions with X11 headers
42 //! Energy Criterium to minimize in MinimalVariationCurve.
43 class FairCurve_EnergyOfMVC : public FairCurve_Energy
50 //! Angles corresspond to the Ox axis
51 Standard_EXPORT FairCurve_EnergyOfMVC(const Standard_Integer BSplOrder, const Handle(TColStd_HArray1OfReal)& FlatKnots, const Handle(TColgp_HArray1OfPnt2d)& Poles, const Standard_Integer ContrOrder1, const Standard_Integer ContrOrder2, const FairCurve_BattenLaw& Law, const Standard_Real PhysicalRatio, const Standard_Real LengthSliding, const Standard_Boolean FreeSliding = Standard_True, const Standard_Real Angle1 = 0, const Standard_Real Angle2 = 0, const Standard_Real Curvature1 = 0, const Standard_Real Curvature2 = 0);
53 //! return the lengthSliding = P1P2 + Sliding
54 Standard_Real LengthSliding() const;
57 FairCurve_AnalysisCode Status() const;
59 //! compute the variables <X> which correspond with the field <MyPoles>
60 Standard_EXPORT virtual Standard_Boolean Variable (math_Vector& X) const Standard_OVERRIDE;
68 //! compute the poles which correspond with the variable X
69 Standard_EXPORT virtual void ComputePoles (const math_Vector& X) Standard_OVERRIDE;
71 //! compute the energy in intermediat format
72 Standard_EXPORT virtual Standard_Boolean Compute (const Standard_Integer DerivativeOrder, math_Vector& Result) Standard_OVERRIDE;
81 Standard_Real MyLengthSliding;
82 Standard_Real OriginalSliding;
83 FairCurve_BattenLaw MyBattenLaw;
84 Standard_Real MyPhysicalRatio;
85 FairCurve_DistributionOfTension MyTension;
86 FairCurve_DistributionOfSagging MySagging;
87 FairCurve_DistributionOfJerk MyJerk;
88 FairCurve_AnalysisCode MyStatus;
94 #include <FairCurve_EnergyOfMVC.lxx>
100 #endif // _FairCurve_EnergyOfMVC_HeaderFile