0024624: Lost word in license statement in source files
[occt.git] / src / BRepExtrema / BRepExtrema_ExtPF.hxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
92d1589b 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
92d1589b 4//
d5f74e42 5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
92d1589b
A
13
14#ifndef _BRepExtrema_ExtPF_HeaderFile
15#define _BRepExtrema_ExtPF_HeaderFile
16
17#ifndef _Standard_HeaderFile
18#include <Standard.hxx>
19#endif
1c35b92f 20#ifndef _Standard_DefineAlloc_HeaderFile
21#include <Standard_DefineAlloc.hxx>
22#endif
92d1589b
A
23#ifndef _Standard_Macro_HeaderFile
24#include <Standard_Macro.hxx>
25#endif
26
27#ifndef _Extrema_ExtPS_HeaderFile
28#include <Extrema_ExtPS.hxx>
29#endif
30#ifndef _Standard_Integer_HeaderFile
31#include <Standard_Integer.hxx>
32#endif
33#ifndef _TColStd_SequenceOfReal_HeaderFile
34#include <TColStd_SequenceOfReal.hxx>
35#endif
36#ifndef _Extrema_SequenceOfPOnSurf_HeaderFile
37#include <Extrema_SequenceOfPOnSurf.hxx>
38#endif
39#ifndef _BRepAdaptor_Surface_HeaderFile
40#include <BRepAdaptor_Surface.hxx>
41#endif
42#ifndef _Extrema_ExtFlag_HeaderFile
43#include <Extrema_ExtFlag.hxx>
44#endif
45#ifndef _Extrema_ExtAlgo_HeaderFile
46#include <Extrema_ExtAlgo.hxx>
47#endif
48#ifndef _Standard_Boolean_HeaderFile
49#include <Standard_Boolean.hxx>
50#endif
51#ifndef _Standard_Real_HeaderFile
52#include <Standard_Real.hxx>
53#endif
54class TopoDS_Vertex;
55class TopoDS_Face;
56class gp_Pnt;
57
58
59class BRepExtrema_ExtPF
60{
61 public:
62
1c35b92f 63 DEFINE_STANDARD_ALLOC
92d1589b
A
64
65 Standard_EXPORT BRepExtrema_ExtPF()
66 {}
67 //! It calculates all the distances. <br>
68 Standard_EXPORT BRepExtrema_ExtPF(const TopoDS_Vertex& TheVertex,const TopoDS_Face& TheFace,
69 const Extrema_ExtFlag TheFlag = Extrema_ExtFlag_MINMAX,
70 const Extrema_ExtAlgo TheAlgo = Extrema_ExtAlgo_Grad);
71
72 Standard_EXPORT void Initialize(const TopoDS_Face& TheFace,
73 const Extrema_ExtFlag TheFlag = Extrema_ExtFlag_MINMAX,
74 const Extrema_ExtAlgo TheAlgo = Extrema_ExtAlgo_Grad);
75
76 //! An exception is raised if the fields have not been initialized. <br>
77 //! Be careful: this method uses the Face only for classify not for the fields. <br>
78 Standard_EXPORT void Perform(const TopoDS_Vertex& TheVertex,const TopoDS_Face& TheFace);
79 //! True if the distances are found. <br>
80 Standard_EXPORT Standard_Boolean IsDone() const
81 {
82 return myExtPS.IsDone();
83 }
84 //! Returns the number of extremum distances. <br>
85 Standard_EXPORT Standard_Integer NbExt() const
86 {
87 return myPoints.Length();
88 }
89 //! Returns the value of the <N>th extremum square distance. <br>
90 Standard_EXPORT Standard_Real SquareDistance(const Standard_Integer N) const
91 {
92 return mySqDist.Value(N);
93 }
94 //! Returns the parameters on the Face of the <N>th extremum distance. <br>
95 Standard_EXPORT void Parameter(const Standard_Integer N,Standard_Real& U,Standard_Real& V) const
96 {
97 myPoints.Value(N).Parameter(U, V);
98 }
99 //! Returns the Point of the <N>th extremum distance. <br>
100 Standard_EXPORT gp_Pnt Point(const Standard_Integer N) const
101 {
102 return myPoints.Value(N).Value();
103 }
104
105 Standard_EXPORT void SetFlag(const Extrema_ExtFlag F)
106 {
107 myExtPS.SetFlag(F);
108 }
109
110 Standard_EXPORT void SetAlgo(const Extrema_ExtAlgo A)
111 {
112 myExtPS.SetAlgo(A);
113 }
114
115 private:
116
117 Extrema_ExtPS myExtPS;
118 TColStd_SequenceOfReal mySqDist;
119 Extrema_SequenceOfPOnSurf myPoints;
120 BRepAdaptor_Surface mySurf;
121};
122
123#endif