0032430: Coding Rules - eliminate CLang warning -Wdeprecated-copy
[occt.git] / src / Extrema / Extrema_ExtCS.hxx
1 // Created on: 1991-02-21
2 // Created by: Isabelle GRIGNON
3 // Copyright (c) 1991-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_ExtCS_HeaderFile
18 #define _Extrema_ExtCS_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Extrema_ExtElCS.hxx>
25 #include <Extrema_SequenceOfPOnSurf.hxx>
26 #include <Extrema_SequenceOfPOnCurv.hxx>
27 #include <TColStd_SequenceOfReal.hxx>
28 #include <GeomAbs_SurfaceType.hxx>
29
30 class Adaptor3d_Curve;
31 class Adaptor3d_Surface;
32 class Extrema_POnCurv;
33 class Extrema_POnSurf;
34 class gp_Pnt;
35
36
37 //! It calculates all the extremum distances
38 //! between a curve and a surface.
39 //! These distances can be minimum or maximum.
40 class Extrema_ExtCS 
41 {
42 public:
43
44   DEFINE_STANDARD_ALLOC
45
46   
47   Standard_EXPORT Extrema_ExtCS();
48   
49   //! It calculates all the distances between C and S.
50   Standard_EXPORT Extrema_ExtCS(const Adaptor3d_Curve& C, const Adaptor3d_Surface& S, const Standard_Real TolC, const Standard_Real TolS);
51   
52   //! It calculates all the distances between C and S.
53   //! UCinf and UCmax are the start and end parameters
54   //! of the curve.
55   Standard_EXPORT Extrema_ExtCS(const Adaptor3d_Curve& C, const Adaptor3d_Surface& S, const Standard_Real UCinf, const Standard_Real UCsup, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup, const Standard_Real TolC, const Standard_Real TolS);
56
57   //! Initializes the fields of the algorithm.
58   Standard_EXPORT void Initialize (const Adaptor3d_Surface& S, const Standard_Real TolC, const Standard_Real TolS);
59
60   //! Initializes the fields of the algorithm.
61   Standard_EXPORT void Initialize (const Adaptor3d_Surface& S, const Standard_Real Uinf, const Standard_Real Usup, const Standard_Real Vinf, const Standard_Real Vsup, const Standard_Real TolC, const Standard_Real TolS);
62   
63   //! Computes the distances.
64   //! An exception is raised if the fieds have not been
65   //! initialized.
66   Standard_EXPORT void Perform (const Adaptor3d_Curve& C, const Standard_Real Uinf, const Standard_Real Usup);
67   
68   //! Returns True if the distances are found.
69   Standard_EXPORT Standard_Boolean IsDone() const;
70   
71   //! Returns True if the curve is on a parallel surface.
72   Standard_EXPORT Standard_Boolean IsParallel() const;
73   
74   //! Returns the number of extremum distances.
75   Standard_EXPORT Standard_Integer NbExt() const;
76   
77   //! Returns the value of the Nth resulting square distance.
78   Standard_EXPORT Standard_Real SquareDistance (const Standard_Integer N) const;
79   
80   //! Returns the point of the Nth resulting distance.
81   Standard_EXPORT void Points (const Standard_Integer N, Extrema_POnCurv& P1, Extrema_POnSurf& P2) const;
82
83 private:
84
85   Standard_EXPORT Standard_Boolean AddSolution (const Adaptor3d_Curve& Curve, const Standard_Real T, const Standard_Real U, const Standard_Real V, const gp_Pnt& PointOnCurve, const gp_Pnt& PointOnSurf, const Standard_Real SquareDist);
86
87 private:
88
89   // disallow copies
90   Extrema_ExtCS            (Extrema_ExtCS& ) Standard_DELETE;
91   Extrema_ExtCS& operator= (Extrema_ExtCS& ) Standard_DELETE;
92
93 private:
94
95   const Adaptor3d_Surface* myS;
96   Standard_Boolean myDone;
97   Standard_Boolean myIsPar;
98   Extrema_ExtElCS myExtElCS;
99   Extrema_SequenceOfPOnSurf myPOnS;
100   Extrema_SequenceOfPOnCurv myPOnC;
101   Standard_Real myuinf;
102   Standard_Real myusup;
103   Standard_Real myvinf;
104   Standard_Real myvsup;
105   Standard_Real mytolC;
106   Standard_Real mytolS;
107   Standard_Real myucinf;
108   Standard_Real myucsup;
109   TColStd_SequenceOfReal mySqDist;
110   GeomAbs_SurfaceType myStype;
111
112 };
113
114 #endif // _Extrema_ExtCS_HeaderFile