0026595: Lost some comments in OCCT-code after cdl elimination
[occt.git] / src / IntWalk / IntWalk_TheInt2S.hxx
CommitLineData
42cf5bc1 1// Created on: 1991-03-28
2// Created by: Jacques GOUSSARD
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 _IntWalk_TheInt2S_HeaderFile
18#define _IntWalk_TheInt2S_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Boolean.hxx>
25#include <IntSurf_PntOn2S.hxx>
26#include <gp_Dir.hxx>
27#include <gp_Dir2d.hxx>
28#include <IntWalk_TheFunctionOfTheInt2S.hxx>
29#include <Standard_Real.hxx>
30#include <TColStd_Array1OfReal.hxx>
31#include <IntImp_ConstIsoparametric.hxx>
32class StdFail_NotDone;
33class Standard_DomainError;
34class Standard_ConstructionError;
35class StdFail_UndefinedDerivative;
36class Adaptor3d_HSurface;
37class Adaptor3d_HSurfaceTool;
38class IntWalk_TheFunctionOfTheInt2S;
39class math_FunctionSetRoot;
40class IntSurf_PntOn2S;
41class gp_Dir;
42class gp_Dir2d;
43
44
45
46class IntWalk_TheInt2S
47{
48public:
49
50 DEFINE_STANDARD_ALLOC
51
52
36b9ff75 53 //! Raises Construction Error
42cf5bc1 54 Standard_EXPORT IntWalk_TheInt2S();
55
36b9ff75 56 //! compute the solution point with the close point
42cf5bc1 57 Standard_EXPORT IntWalk_TheInt2S(const TColStd_Array1OfReal& Param, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real TolTangency);
58
36b9ff75 59 //! initialize the parameters to compute the solution point
60 //! it 's possible to write to optimize:
61 //! IntImp_Int2S inter(S1,S2,Func,TolTangency);
62 //! math_FunctionSetRoot rsnld(inter.Function());
63 //! while ...{
64 //! Param(1)=...
65 //! Param(2)=...
66 //! param(3)=...
67 //! inter.Perform(Param,rsnld);
68 //! }
42cf5bc1 69 Standard_EXPORT IntWalk_TheInt2S(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real TolTangency);
70
36b9ff75 71 //! returns the best constant isoparametric to find
72 //! the next intersection's point +stores the solution
73 //! point (the solution point is found with the close point
74 //! to intersect the isoparametric with the other patch;
75 //! the choice of the isoparametic is calculated)
42cf5bc1 76 Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld);
77
36b9ff75 78 //! returns the best constant isoparametric to find
79 //! the next intersection's point +stores the solution
80 //! point (the solution point is found with the close point
81 //! to intersect the isoparametric with the other patch;
82 //! the choice of the isoparametic is given by ChoixIso)
42cf5bc1 83 Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld, const IntImp_ConstIsoparametric ChoixIso);
84
36b9ff75 85 //! Returns TRUE if the creation completed without failure.
42cf5bc1 86 Standard_Boolean IsDone() const;
87
36b9ff75 88 //! Returns TRUE when there is no solution to the problem.
42cf5bc1 89 Standard_Boolean IsEmpty() const;
90
36b9ff75 91 //! Returns the intersection point.
42cf5bc1 92 const IntSurf_PntOn2S& Point() const;
93
36b9ff75 94 //! Returns True if the surfaces are tangent at the
95 //! intersection point.
42cf5bc1 96 Standard_Boolean IsTangent() const;
97
36b9ff75 98 //! Returns the tangent at the intersection line.
42cf5bc1 99 const gp_Dir& Direction() const;
100
36b9ff75 101 //! Returns the tangent at the intersection line in the
102 //! parametric space of the first surface.
42cf5bc1 103 const gp_Dir2d& DirectionOnS1() const;
104
36b9ff75 105 //! Returns the tangent at the intersection line in the
106 //! parametric space of the second surface.
42cf5bc1 107 const gp_Dir2d& DirectionOnS2() const;
108
36b9ff75 109 //! return the math function which
110 //! is used to compute the intersection
42cf5bc1 111 IntWalk_TheFunctionOfTheInt2S& Function();
112
36b9ff75 113 //! return the intersection point which is
114 //! enable for changing.
42cf5bc1 115 IntSurf_PntOn2S& ChangePoint();
116
117
118
119
120protected:
121
122
123
124
125
126private:
127
128
129
130 Standard_Boolean done;
131 Standard_Boolean empty;
132 IntSurf_PntOn2S pint;
133 Standard_Boolean tangent;
134 gp_Dir d3d;
135 gp_Dir2d d2d1;
136 gp_Dir2d d2d2;
137 IntWalk_TheFunctionOfTheInt2S myZerParFunc;
138 Standard_Real tol;
139 Standard_Real ua0;
140 Standard_Real va0;
141 Standard_Real ua1;
142 Standard_Real va1;
143 Standard_Real ub0;
144 Standard_Real vb0;
145 Standard_Real ub1;
146 Standard_Real vb1;
147 Standard_Real ures1;
148 Standard_Real ures2;
149 Standard_Real vres1;
150 Standard_Real vres2;
151
152
153};
154
155#define ThePSurface Handle(Adaptor3d_HSurface)
156#define ThePSurface_hxx <Adaptor3d_HSurface.hxx>
157#define ThePSurfaceTool Adaptor3d_HSurfaceTool
158#define ThePSurfaceTool_hxx <Adaptor3d_HSurfaceTool.hxx>
159#define IntImp_TheFunction IntWalk_TheFunctionOfTheInt2S
160#define IntImp_TheFunction_hxx <IntWalk_TheFunctionOfTheInt2S.hxx>
161#define IntImp_Int2S IntWalk_TheInt2S
162#define IntImp_Int2S_hxx <IntWalk_TheInt2S.hxx>
163
164#include <IntImp_Int2S.lxx>
165
166#undef ThePSurface
167#undef ThePSurface_hxx
168#undef ThePSurfaceTool
169#undef ThePSurfaceTool_hxx
170#undef IntImp_TheFunction
171#undef IntImp_TheFunction_hxx
172#undef IntImp_Int2S
173#undef IntImp_Int2S_hxx
174
175
176
177
178#endif // _IntWalk_TheInt2S_HeaderFile