0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / Extrema / Extrema_PCFOfEPCOfExtPC2d.hxx
CommitLineData
42cf5bc1 1// Created on: 1991-02-26
2// Created by: Isabelle GRIGNON
3// Copyright (c) 1991-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _Extrema_PCFOfEPCOfExtPC2d_HeaderFile
18#define _Extrema_PCFOfEPCOfExtPC2d_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
42cf5bc1 22
23#include <gp_Pnt2d.hxx>
42cf5bc1 24#include <TColStd_SequenceOfReal.hxx>
25#include <TColStd_SequenceOfInteger.hxx>
5d88fd54 26#include <Extrema_SequenceOfPOnCurv2d.hxx>
42cf5bc1 27#include <Standard_Integer.hxx>
28#include <math_FunctionWithDerivative.hxx>
29class Standard_OutOfRange;
30class Standard_TypeMismatch;
31class Adaptor2d_Curve2d;
32class Extrema_Curve2dTool;
33class Extrema_POnCurv2d;
34class gp_Pnt2d;
35class gp_Vec2d;
42cf5bc1 36
37class Extrema_PCFOfEPCOfExtPC2d : public math_FunctionWithDerivative
38{
39public:
40
41 DEFINE_STANDARD_ALLOC
42
43
44 Standard_EXPORT Extrema_PCFOfEPCOfExtPC2d();
45
46 Standard_EXPORT Extrema_PCFOfEPCOfExtPC2d(const gp_Pnt2d& P, const Adaptor2d_Curve2d& C);
47
36b9ff75 48 //! sets the field mycurve of the function.
42cf5bc1 49 Standard_EXPORT void Initialize (const Adaptor2d_Curve2d& C);
50
36b9ff75 51 //! sets the field P of the function.
42cf5bc1 52 Standard_EXPORT void SetPoint (const gp_Pnt2d& P);
53
36b9ff75 54 //! Calculation of F(U).
79104795 55 Standard_EXPORT Standard_Boolean Value (const Standard_Real U, Standard_Real& F) Standard_OVERRIDE;
42cf5bc1 56
36b9ff75 57 //! Calculation of F'(U).
79104795 58 Standard_EXPORT Standard_Boolean Derivative (const Standard_Real U, Standard_Real& DF) Standard_OVERRIDE;
42cf5bc1 59
36b9ff75 60 //! Calculation of F(U) and F'(U).
79104795 61 Standard_EXPORT Standard_Boolean Values (const Standard_Real U, Standard_Real& F, Standard_Real& DF) Standard_OVERRIDE;
42cf5bc1 62
36b9ff75 63 //! Save the found extremum.
42cf5bc1 64 Standard_EXPORT virtual Standard_Integer GetStateNumber() Standard_OVERRIDE;
65
54adc5e9 66 //! Return the number of found extrema.
42cf5bc1 67 Standard_EXPORT Standard_Integer NbExt() const;
68
36b9ff75 69 //! Returns the Nth distance.
42cf5bc1 70 Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
71
36b9ff75 72 //! Shows if the Nth distance is a minimum.
42cf5bc1 73 Standard_EXPORT Standard_Boolean IsMin (const Standard_Integer N) const;
74
36b9ff75 75 //! Returns the Nth extremum.
42cf5bc1 76 Standard_EXPORT const Extrema_POnCurv2d& Point (const Standard_Integer N) const;
77
36b9ff75 78 //! Determines boundaries of subinterval for find of root.
42cf5bc1 79 Standard_EXPORT void SubIntervalInitialize (const Standard_Real theUfirst, const Standard_Real theUlast);
80
36b9ff75 81 //! Computes a Tol value. If 1st derivative of curve
82 //! |D1|<Tol, it is considered D1=0.
42cf5bc1 83 Standard_EXPORT Standard_Real SearchOfTolerance();
84
85
86
87
88protected:
89
90
91
92
93
94private:
95
96
97
98 gp_Pnt2d myP;
99 Standard_Address myC;
100 Standard_Real myU;
101 gp_Pnt2d myPc;
102 Standard_Real myD1f;
103 TColStd_SequenceOfReal mySqDist;
104 TColStd_SequenceOfInteger myIsMin;
5d88fd54 105 Extrema_SequenceOfPOnCurv2d myPoint;
42cf5bc1 106 Standard_Boolean myPinit;
107 Standard_Boolean myCinit;
108 Standard_Boolean myD1Init;
109 Standard_Real myTol;
110 Standard_Integer myMaxDerivOrder;
111 Standard_Real myUinfium;
112 Standard_Real myUsupremum;
113
114
115};
116
117
118
119
120
121
122
123#endif // _Extrema_PCFOfEPCOfExtPC2d_HeaderFile