0023024: Update headers of OCCT files
[occt.git] / src / BRepExtrema / BRepExtrema_ExtCF.hxx
CommitLineData
b311480e 1// Copyright (c) 1999-2012 OPEN CASCADE SAS
2//
3// The content of this file is subject to the Open CASCADE Technology Public
4// License Version 6.5 (the "License"). You may not use the content of this file
5// except in compliance with the License. Please obtain a copy of the License
6// at http://www.opencascade.org and read it completely before using this file.
7//
8// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10//
11// The Original Code and all software distributed under the License is
12// distributed on an "AS IS" basis, without warranty of any kind, and the
13// Initial Developer hereby disclaims all such warranties, including without
14// limitation, any warranties of merchantability, fitness for a particular
15// purpose or non-infringement. Please see the License for the specific terms
16// and conditions governing the rights and limitations under the License.
92d1589b
A
17
18#ifndef _BRepExtrema_ExtCF_HeaderFile
19#define _BRepExtrema_ExtCF_HeaderFile
20
21#ifndef _Standard_HeaderFile
22#include <Standard.hxx>
23#endif
1c35b92f 24#ifndef _Standard_DefineAlloc_HeaderFile
25#include <Standard_DefineAlloc.hxx>
26#endif
92d1589b
A
27#ifndef _Standard_Macro_HeaderFile
28#include <Standard_Macro.hxx>
29#endif
30
31#ifndef _Extrema_ExtCS_HeaderFile
32#include <Extrema_ExtCS.hxx>
33#endif
34#ifndef _Standard_Integer_HeaderFile
35#include <Standard_Integer.hxx>
36#endif
37#ifndef _TColStd_SequenceOfReal_HeaderFile
38#include <TColStd_SequenceOfReal.hxx>
39#endif
40#ifndef _Extrema_SequenceOfPOnSurf_HeaderFile
41#include <Extrema_SequenceOfPOnSurf.hxx>
42#endif
43#ifndef _Extrema_SequenceOfPOnCurv_HeaderFile
44#include <Extrema_SequenceOfPOnCurv.hxx>
45#endif
46#ifndef _Handle_BRepAdaptor_HSurface_HeaderFile
47#include <Handle_BRepAdaptor_HSurface.hxx>
48#endif
49#ifndef _Standard_Boolean_HeaderFile
50#include <Standard_Boolean.hxx>
51#endif
52#ifndef _Standard_Real_HeaderFile
53#include <Standard_Real.hxx>
54#endif
55#ifndef _Extrema_POnCurv_HeaderFile
56#include <Extrema_POnCurv.hxx>
57#endif
58#ifndef _Extrema_POnSurf_HeaderFile
59#include <Extrema_POnSurf.hxx>
60#endif
61class BRepAdaptor_HSurface;
62class TopoDS_Edge;
63class TopoDS_Face;
64class gp_Pnt;
65
66
67class BRepExtrema_ExtCF
68{
69 public:
70
1c35b92f 71 DEFINE_STANDARD_ALLOC
92d1589b
A
72
73 Standard_EXPORT BRepExtrema_ExtCF()
74 {
75 }
76 //! It calculates all the distances. <br>
77 Standard_EXPORT BRepExtrema_ExtCF(const TopoDS_Edge& V,const TopoDS_Face& E);
78
79 Standard_EXPORT void Initialize(const TopoDS_Face& E);
80 //! An exception is raised if the fields have not been initialized. <br>
81 //! Be careful: this method uses the Face only for classify not for the fields. <br>
82 Standard_EXPORT void Perform(const TopoDS_Edge& V,const TopoDS_Face& F);
83 //! True if the distances are found. <br>
84 Standard_EXPORT Standard_Boolean IsDone() const
85 {
86 return myExtCS.IsDone();
87 }
88 //! Returns the number of extremum distances. <br>
89 Standard_EXPORT Standard_Integer NbExt() const
90 {
91 return mySqDist.Length();
92 }
93 //! Returns the value of the <N>th extremum square distance. <br>
94 Standard_EXPORT Standard_Real SquareDistance(const Standard_Integer N) const
95 {
96 return mySqDist.Value(N);
97 }
98 //! Returns True if the curve is on a parallel surface. <br>
99 Standard_EXPORT Standard_Boolean IsParallel() const
100 {
101 return myExtCS.IsParallel();
102 }
103 //! Returns the parameters on the Edge of the <N>th extremum distance. <br>
104 Standard_EXPORT Standard_Real ParameterOnEdge(const Standard_Integer N) const
105 {
106 return myPointsOnC.Value(N).Parameter();
107 }
108 //! Returns the parameters on the Face of the <N>th extremum distance. <br>
109 Standard_EXPORT void ParameterOnFace(const Standard_Integer N,Standard_Real& U,Standard_Real& V) const
110 {
111 myPointsOnS.Value(N).Parameter(U, V);
112 }
113 //! Returns the Point of the <N>th extremum distance. <br>
114 Standard_EXPORT gp_Pnt PointOnEdge(const Standard_Integer N) const
115 {
116 return myPointsOnC.Value(N).Value();
117 }
118 //! Returns the Point of the <N>th extremum distance. <br>
119 Standard_EXPORT gp_Pnt PointOnFace(const Standard_Integer N) const
120 {
121 return myPointsOnS.Value(N).Value();
122 }
123
124 private:
125
126 Extrema_ExtCS myExtCS;
127 TColStd_SequenceOfReal mySqDist;
128 Extrema_SequenceOfPOnSurf myPointsOnS;
129 Extrema_SequenceOfPOnCurv myPointsOnC;
130 Handle_BRepAdaptor_HSurface myHS;
131};
132
133#endif