Back to home page

EIC code displayed by LXR

 
 

    


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

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