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_TheLocateExtPCOfTheProjPCurOfGInter_HeaderFile
0018 #define _Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter.hxx>
0026 class Standard_DomainError;
0027 class Standard_TypeMismatch;
0028 class StdFail_NotDone;
0029 class Adaptor2d_Curve2d;
0030 class Geom2dInt_Geom2dCurveTool;
0031 class Extrema_POnCurv2d;
0032 class gp_Pnt2d;
0033 class gp_Vec2d;
0034 
0035 class Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter 
0036 {
0037 public:
0038 
0039   DEFINE_STANDARD_ALLOC
0040 
0041   
0042   Standard_EXPORT Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter();
0043   
0044   //! Calculates the distance with a close point.
0045   //! The close point is defined by the parameter value
0046   //! U0.
0047   //! The function F(u)=distance(P,C(u)) has an extremum
0048   //! when g(u)=dF/du=0. The algorithm searches a zero
0049   //! near the close point.
0050   //! TolU is used to decide to stop the iterations.
0051   //! At the nth iteration, the criteria is:
0052   //! abs(Un - Un-1) < TolU.
0053   Standard_EXPORT Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Real U0, const Standard_Real TolU);
0054   
0055   //! Calculates the distance with a close point.
0056   //! The close point is defined by the parameter value
0057   //! U0.
0058   //! The function F(u)=distance(P,C(u)) has an extremum
0059   //! when g(u)=dF/du=0. The algorithm searches a zero
0060   //! near the close point.
0061   //! Zeros are searched between Umin et Usup.
0062   //! TolU is used to decide to stop the iterations.
0063   //! At the nth iteration, the criteria is:
0064   //! abs(Un - Un-1) < TolU.
0065   Standard_EXPORT Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C, const Standard_Real U0, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU);
0066   
0067   //! sets the fields of the algorithm.
0068   Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real TolU);
0069   
0070   //! the algorithm is done with the point P.
0071   //! An exception is raised if the fields have not
0072   //! been initialized.
0073   Standard_EXPORT void Perform (const gp_Pnt2d& P, const Standard_Real U0);
0074   
0075   //! Returns True if the distance is found.
0076   Standard_EXPORT Standard_Boolean IsDone() const;
0077   
0078   //! Returns the value of the extremum square distance.
0079   Standard_EXPORT Standard_Real SquareDistance() const;
0080   
0081   //! Returns True if the extremum distance is a minimum.
0082   Standard_EXPORT Standard_Boolean IsMin() const;
0083   
0084   //! Returns the point of the extremum distance.
0085   Standard_EXPORT const Extrema_POnCurv2d& Point() const;
0086 
0087 
0088 
0089 
0090 protected:
0091 
0092 
0093 
0094 
0095 
0096 private:
0097 
0098 
0099 
0100   Standard_Boolean myDone;
0101   Standard_Real mytolU;
0102   Standard_Real myumin;
0103   Standard_Real myusup;
0104   Geom2dInt_PCLocFOfTheLocateExtPCOfTheProjPCurOfGInter myF;
0105 
0106 
0107 };
0108 
0109 
0110 
0111 
0112 
0113 
0114 
0115 #endif // _Geom2dInt_TheLocateExtPCOfTheProjPCurOfGInter_HeaderFile