42cf5bc1 |
1 | // Created on: 1999-09-21 |
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_ExtPRevS_HeaderFile |
18 | #define _Extrema_ExtPRevS_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Standard_Real.hxx> |
24 | #include <gp_Ax2.hxx> |
25 | #include <Extrema_GenExtPS.hxx> |
26 | #include <Standard_Boolean.hxx> |
27 | #include <Standard_Integer.hxx> |
28 | #include <Extrema_POnSurf.hxx> |
29 | #include <Standard_Transient.hxx> |
6b84c3f7 |
30 | class GeomAdaptor_HSurfaceOfRevolution; |
42cf5bc1 |
31 | class StdFail_NotDone; |
32 | class Standard_OutOfRange; |
33 | class gp_Pnt; |
34 | class Extrema_POnSurf; |
35 | |
36 | |
37 | class Extrema_ExtPRevS; |
38 | DEFINE_STANDARD_HANDLE(Extrema_ExtPRevS, Standard_Transient) |
39 | |
40 | //! It calculates all the extremum (minimum and |
41 | //! maximum) distances between a point and a surface |
42 | //! of revolution. |
43 | class Extrema_ExtPRevS : public Standard_Transient |
44 | { |
45 | |
46 | public: |
47 | |
48 | |
49 | Standard_EXPORT Extrema_ExtPRevS(); |
50 | |
51 | //! It calculates all the distances between a point |
52 | //! from gp and a SurfacePtr from Adaptor3d. |
6b84c3f7 |
53 | Standard_EXPORT Extrema_ExtPRevS(const gp_Pnt& P, const Handle(GeomAdaptor_HSurfaceOfRevolution)& 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 |
54 | |
55 | //! It calculates all the distances between a point |
56 | //! from gp and a SurfacePtr from Adaptor3d. |
6b84c3f7 |
57 | Standard_EXPORT Extrema_ExtPRevS(const gp_Pnt& P, const Handle(GeomAdaptor_HSurfaceOfRevolution)& S, const Standard_Real TolU, const Standard_Real TolV); |
42cf5bc1 |
58 | |
6b84c3f7 |
59 | Standard_EXPORT void Initialize (const Handle(GeomAdaptor_HSurfaceOfRevolution)& 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 |
60 | |
61 | Standard_EXPORT void Perform (const gp_Pnt& P); |
62 | |
63 | //! Returns True if the distances are found. |
64 | Standard_EXPORT Standard_Boolean IsDone() const; |
65 | |
66 | //! Returns the number of extremum distances. |
67 | Standard_EXPORT Standard_Integer NbExt() const; |
68 | |
69 | //! Returns the value of the Nth resulting square distance. |
70 | Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const; |
71 | |
72 | //! Returns the point of the Nth resulting distance. |
73 | Standard_EXPORT const Extrema_POnSurf& Point (const Standard_Integer N) const; |
74 | |
75 | |
76 | |
77 | |
78 | DEFINE_STANDARD_RTTI(Extrema_ExtPRevS,Standard_Transient) |
79 | |
80 | protected: |
81 | |
82 | |
83 | |
84 | |
85 | private: |
86 | |
87 | |
6b84c3f7 |
88 | Handle(GeomAdaptor_HSurfaceOfRevolution) myS; |
42cf5bc1 |
89 | Standard_Real myvinf; |
90 | Standard_Real myvsup; |
91 | Standard_Real mytolv; |
92 | gp_Ax2 myPosition; |
93 | Extrema_GenExtPS myExtPS; |
94 | Standard_Boolean myIsAnalyticallyComputable; |
95 | Standard_Boolean myDone; |
96 | Standard_Integer myNbExt; |
97 | Standard_Real mySqDist[8]; |
98 | Extrema_POnSurf myPoint[8]; |
99 | |
100 | |
101 | }; |
102 | |
103 | |
104 | |
105 | |
106 | |
107 | |
108 | |
109 | #endif // _Extrema_ExtPRevS_HeaderFile |