0029069: Samples - handle UNICODE filenames within C++/CLI CSharp sample
[occt.git] / src / Extrema / Extrema_GenLocateExtCS.hxx
1 // Created on: 1996-01-25
2 // Created by: Laurent PAINNOT
3 // Copyright (c) 1996-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_GenLocateExtCS_HeaderFile
18 #define _Extrema_GenLocateExtCS_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Real.hxx>
26 #include <Extrema_POnCurv.hxx>
27 #include <Extrema_POnSurf.hxx>
28 class Standard_DomainError;
29 class StdFail_NotDone;
30 class Adaptor3d_Curve;
31 class Adaptor3d_Surface;
32 class Extrema_POnCurv;
33 class Extrema_POnSurf;
34
35
36 //! With two close points it calculates the distance
37 //! between two surfaces.
38 //! This distance can be a minimum or a maximum.
39 class Extrema_GenLocateExtCS 
40 {
41 public:
42
43   DEFINE_STANDARD_ALLOC
44
45   
46   Standard_EXPORT Extrema_GenLocateExtCS();
47   
48   //! Calculates the distance with two close points.
49   //! The close points are defined by the parameter values
50   //! T for C and (U,V) for S.
51   //! The function F(t,u,v)=distance(C(t),S(u,v))
52   //! has an extremun when gradient(F)=0. The algorithm searchs
53   //! a zero near the close points.
54   Standard_EXPORT Extrema_GenLocateExtCS(const Adaptor3d_Curve& C, const Adaptor3d_Surface& S, const Standard_Real T, const Standard_Real U, const Standard_Real V, const Standard_Real Tol1, const Standard_Real Tol2);
55   
56   Standard_EXPORT void Perform (const Adaptor3d_Curve& C, const Adaptor3d_Surface& S, const Standard_Real T, const Standard_Real U, const Standard_Real V, const Standard_Real Tol1, const Standard_Real Tol2);
57   
58   //! Returns True if the distance is found.
59   Standard_EXPORT Standard_Boolean IsDone() const;
60   
61   //! Returns the value of the extremum square distance.
62   Standard_EXPORT Standard_Real SquareDistance() const;
63   
64   //! Returns the point of the extremum distance on C.
65   Standard_EXPORT const Extrema_POnCurv& PointOnCurve() const;
66   
67   //! Returns the point of the extremum distance on S.
68   Standard_EXPORT const Extrema_POnSurf& PointOnSurface() const;
69
70
71
72
73 protected:
74
75
76
77
78
79 private:
80
81
82
83   Standard_Boolean myDone;
84   Standard_Real mySqDist;
85   Extrema_POnCurv myPoint1;
86   Extrema_POnSurf myPoint2;
87
88
89 };
90
91
92
93
94
95
96
97 #endif // _Extrema_GenLocateExtCS_HeaderFile