0026595: Lost some comments in OCCT-code after cdl elimination
[occt.git] / src / HLRBRep / HLRBRep_TheExactInterCSurf.hxx
1 // Created on: 1992-10-14
2 // Created by: Christophe MARION
3 // Copyright (c) 1992-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 _HLRBRep_TheExactInterCSurf_HeaderFile
18 #define _HLRBRep_TheExactInterCSurf_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Boolean.hxx>
25 #include <HLRBRep_TheCSFunctionOfInterCSurf.hxx>
26 #include <Standard_Real.hxx>
27 #include <Standard_Address.hxx>
28 class StdFail_NotDone;
29 class Standard_DomainError;
30 class HLRBRep_SurfaceTool;
31 class gp_Lin;
32 class HLRBRep_LineTool;
33 class HLRBRep_TheCSFunctionOfInterCSurf;
34 class math_FunctionSetRoot;
35 class gp_Pnt;
36
37
38
39 class HLRBRep_TheExactInterCSurf 
40 {
41 public:
42
43   DEFINE_STANDARD_ALLOC
44
45   
46   //! compute the solution point with the close point
47   //! MarginCoef is the coefficient for extension of UV bounds.
48   //! Ex., UFirst -= MarginCoef*(ULast-UFirst)
49   Standard_EXPORT HLRBRep_TheExactInterCSurf(const Standard_Real U, const Standard_Real V, const Standard_Real W, const HLRBRep_TheCSFunctionOfInterCSurf& F, const Standard_Real TolTangency, const Standard_Real MarginCoef = 0.0);
50   
51   //! initialize the parameters to compute the solution
52   Standard_EXPORT HLRBRep_TheExactInterCSurf(const HLRBRep_TheCSFunctionOfInterCSurf& F, const Standard_Real TolTangency);
53   
54   //! compute the solution
55   //! it's possible to write to optimize:
56   //! IntImp_IntCS inter(S1,C1,Toltangency)
57   //! math_FunctionSetRoot rsnld(Inter.function())
58   //! while ...{
59   //! u=...
60   //! v=...
61   //! w=...
62   //! inter.Perform(u,v,w,rsnld)
63   //! }
64   //! or
65   //! IntImp_IntCS inter(Toltangency)
66   //! inter.SetSurface(S);
67   //! math_FunctionSetRoot rsnld(Inter.function())
68   //! while ...{
69   //! C=...
70   //! inter.SetCurve(C);
71   //! u=...
72   //! v=...
73   //! w=...
74   //! inter.Perform(u,v,w,rsnld)
75   //! }
76   Standard_EXPORT void Perform (const Standard_Real U, const Standard_Real V, const Standard_Real W, math_FunctionSetRoot& Rsnld, const Standard_Real u0, const Standard_Real v0, const Standard_Real u1, const Standard_Real v1, const Standard_Real w0, const Standard_Real w1);
77   
78   //! Returns TRUE if the creation completed without failure.
79   Standard_EXPORT Standard_Boolean IsDone() const;
80   
81   Standard_EXPORT Standard_Boolean IsEmpty() const;
82   
83   //! returns the intersection point
84   //! The exception NotDone is raised if IsDone is false.
85   //! The exception DomainError is raised if IsEmpty is true.
86   Standard_EXPORT const gp_Pnt& Point() const;
87   
88   Standard_EXPORT Standard_Real ParameterOnCurve() const;
89   
90   Standard_EXPORT void ParameterOnSurface (Standard_Real& U, Standard_Real& V) const;
91   
92   //! return the math function which
93   //! is used to compute the intersection
94   Standard_EXPORT HLRBRep_TheCSFunctionOfInterCSurf& Function();
95
96
97
98
99 protected:
100
101
102
103
104
105 private:
106
107
108
109   Standard_Boolean done;
110   Standard_Boolean empty;
111   HLRBRep_TheCSFunctionOfInterCSurf myFunction;
112   Standard_Real w;
113   Standard_Real u;
114   Standard_Real v;
115   Standard_Real tol;
116
117
118 };
119
120
121
122
123
124
125
126 #endif // _HLRBRep_TheExactInterCSurf_HeaderFile