0026252: GeomAdaptor_Surface should use inner adaptor to calculate values of complex...
[occt.git] / src / Extrema / Extrema_ExtPExtS.hxx
CommitLineData
42cf5bc1 1// Created on: 1999-09-16
2// Created by: Edward AGAPOV
3// Copyright (c) 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_ExtPExtS_HeaderFile
18#define _Extrema_ExtPExtS_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Real.hxx>
24#include <Extrema_FuncExtPS.hxx>
25#include <gp_Vec.hxx>
26#include <gp_Ax2.hxx>
27#include <Extrema_GenExtPS.hxx>
28#include <Standard_Boolean.hxx>
29#include <Standard_Integer.hxx>
30#include <Extrema_POnSurf.hxx>
31#include <Standard_Transient.hxx>
32class Adaptor3d_HCurve;
6b84c3f7 33class GeomAdaptor_HSurfaceOfLinearExtrusion;
42cf5bc1 34class StdFail_NotDone;
35class Standard_OutOfRange;
36class gp_Pnt;
37class Extrema_POnSurf;
38class gp_Ax2;
39
40
41class Extrema_ExtPExtS;
42DEFINE_STANDARD_HANDLE(Extrema_ExtPExtS, Standard_Transient)
43
44//! It calculates all the extremum (minimum and
45//! maximum) distances between a point and a linear
46//! extrusion surface.
47class Extrema_ExtPExtS : public Standard_Transient
48{
49
50public:
51
52
53 Standard_EXPORT Extrema_ExtPExtS();
54
55 //! It calculates all the distances between a point
56 //! from gp and a Surface.
6b84c3f7 57 Standard_EXPORT Extrema_ExtPExtS(const gp_Pnt& P, const Handle(GeomAdaptor_HSurfaceOfLinearExtrusion)& S, const Standard_Real Umin, const Standard_Real Usup, const Standard_Real Vmin, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV);
42cf5bc1 58
59 //! It calculates all the distances between a point
60 //! from gp and a Surface.
6b84c3f7 61 Standard_EXPORT Extrema_ExtPExtS(const gp_Pnt& P, const Handle(GeomAdaptor_HSurfaceOfLinearExtrusion)& S, const Standard_Real TolU, const Standard_Real TolV);
42cf5bc1 62
63 //! Initializes the fields of the algorithm.
6b84c3f7 64 Standard_EXPORT void Initialize (const Handle(GeomAdaptor_HSurfaceOfLinearExtrusion)& S, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup, const Standard_Real TolU, const Standard_Real TolV);
42cf5bc1 65
66 Standard_EXPORT void Perform (const gp_Pnt& P);
67
68 //! Returns True if the distances are found.
69 Standard_EXPORT Standard_Boolean IsDone() const;
70
71 //! Returns the number of extremum distances.
72 Standard_EXPORT Standard_Integer NbExt() const;
73
74 //! Returns the value of the Nth resulting square distance.
75 Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
76
77 //! Returns the point of the Nth resulting distance.
78 Standard_EXPORT const Extrema_POnSurf& Point (const Standard_Integer N) const;
79
80
81
82
83 DEFINE_STANDARD_RTTI(Extrema_ExtPExtS,Standard_Transient)
84
85protected:
86
87
88
89
90private:
91
92
93 Standard_EXPORT void MakePreciser (Standard_Real& U, const gp_Pnt& P, const Standard_Boolean isMin, const gp_Ax2& OrtogSection) const;
94
95 Standard_Real myuinf;
96 Standard_Real myusup;
97 Standard_Real mytolu;
98 Standard_Real myvinf;
99 Standard_Real myvsup;
100 Standard_Real mytolv;
101 Extrema_FuncExtPS myF;
102 Handle(Adaptor3d_HCurve) myC;
6b84c3f7 103 Handle(GeomAdaptor_HSurfaceOfLinearExtrusion) myS;
42cf5bc1 104 gp_Vec myDirection;
105 gp_Ax2 myPosition;
106 Extrema_GenExtPS myExtPS;
107 Standard_Boolean myIsAnalyticallyComputable;
108 Standard_Boolean myDone;
109 Standard_Integer myNbExt;
110 Standard_Real mySqDist[4];
111 Extrema_POnSurf myPoint[4];
112
113
114};
115
116
117
118
119
120
121
122#endif // _Extrema_ExtPExtS_HeaderFile