Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:35

0001 // Created on: 1992-06-04
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1992-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 _Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter_HeaderFile
0018 #define _Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <gp_Pnt2d.hxx>
0025 #include <TColStd_SequenceOfReal.hxx>
0026 #include <TColStd_SequenceOfInteger.hxx>
0027 #include <Extrema_SequenceOfPOnCurv2d.hxx>
0028 #include <Standard_Boolean.hxx>
0029 #include <math_FunctionWithDerivative.hxx>
0030 class Standard_OutOfRange;
0031 class Standard_TypeMismatch;
0032 class Adaptor2d_Curve2d;
0033 class Geom2dInt_Geom2dCurveTool;
0034 class Extrema_POnCurv2d;
0035 class gp_Pnt2d;
0036 class gp_Vec2d;
0037 
0038 class Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter  : public math_FunctionWithDerivative
0039 {
0040 public:
0041 
0042   DEFINE_STANDARD_ALLOC
0043 
0044   
0045   Standard_EXPORT Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter();
0046   
0047   Standard_EXPORT Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C);
0048   
0049   //! sets the field mycurve of the function.
0050   Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C);
0051   
0052   //! sets the field P of the function.
0053   Standard_EXPORT void SetPoint (const gp_Pnt2d& P);
0054   
0055   //! Calculation of F(U).
0056   Standard_EXPORT Standard_Boolean Value (const Standard_Real U, Standard_Real& F) Standard_OVERRIDE;
0057   
0058   //! Calculation of F'(U).
0059   Standard_EXPORT Standard_Boolean Derivative (const Standard_Real U, Standard_Real& DF) Standard_OVERRIDE;
0060   
0061   //! Calculation of F(U) and F'(U).
0062   Standard_EXPORT Standard_Boolean Values (const Standard_Real U, Standard_Real& F, Standard_Real& DF) Standard_OVERRIDE;
0063   
0064   //! Save the found extremum.
0065   Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
0066   
0067   //! Return the number of found extrema.
0068   Standard_EXPORT Standard_Integer NbExt() const;
0069   
0070   //! Returns the Nth distance.
0071   Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
0072   
0073   //! Shows if the Nth distance is a minimum.
0074   Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
0075   
0076   //! Returns the Nth extremum.
0077   Standard_EXPORT const Extrema_POnCurv2d& Point (const Standard_Integer N) const;
0078   
0079   //! Determines boundaries of subinterval for find of root.
0080   Standard_EXPORT void SubIntervalInitialize (const Standard_Real theUfirst, const Standard_Real theUlast);
0081   
0082   //! Computes a Tol value. If 1st derivative of curve
0083   //! |D1|<Tol, it is considered D1=0.
0084   Standard_EXPORT Standard_Real SearchOfTolerance();
0085 
0086 
0087 
0088 
0089 protected:
0090 
0091 
0092 
0093 
0094 
0095 private:
0096 
0097 
0098 
0099   gp_Pnt2d myP;
0100   Standard_Address myC;
0101   Standard_Real myU;
0102   gp_Pnt2d myPc;
0103   Standard_Real myD1f;
0104   TColStd_SequenceOfReal mySqDist;
0105   TColStd_SequenceOfInteger myIsMin;
0106   Extrema_SequenceOfPOnCurv2d myPoint;
0107   Standard_Boolean myPinit;
0108   Standard_Boolean myCinit;
0109   Standard_Boolean myD1Init;
0110   Standard_Real myTol;
0111   Standard_Integer myMaxDerivOrder;
0112   Standard_Real myUinfium;
0113   Standard_Real myUsupremum;
0114 
0115 
0116 };
0117 
0118 
0119 
0120 
0121 
0122 
0123 
0124 #endif // _Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter_HeaderFile