0026937: Eliminate NO_CXX_EXCEPTION macro support
[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
42cf5bc1 51
36b9ff75 52 //! compute the solution point with the close point
42cf5bc1 53 Standard_EXPORT IntWalk_TheInt2S(const TColStd_Array1OfReal& Param, const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real TolTangency);
54
36b9ff75 55 //! initialize the parameters to compute the solution point
56 //! it 's possible to write to optimize:
57 //! IntImp_Int2S inter(S1,S2,Func,TolTangency);
58 //! math_FunctionSetRoot rsnld(inter.Function());
59 //! while ...{
60 //! Param(1)=...
61 //! Param(2)=...
62 //! param(3)=...
63 //! inter.Perform(Param,rsnld);
64 //! }
42cf5bc1 65 Standard_EXPORT IntWalk_TheInt2S(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Standard_Real TolTangency);
66
36b9ff75 67 //! returns the best constant isoparametric to find
68 //! the next intersection's point +stores the solution
69 //! point (the solution point is found with the close point
70 //! to intersect the isoparametric with the other patch;
71 //! the choice of the isoparametic is calculated)
42cf5bc1 72 Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld);
73
36b9ff75 74 //! returns the best constant isoparametric to find
75 //! the next intersection's point +stores the solution
76 //! point (the solution point is found with the close point
77 //! to intersect the isoparametric with the other patch;
78 //! the choice of the isoparametic is given by ChoixIso)
42cf5bc1 79 Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld, const IntImp_ConstIsoparametric ChoixIso);
80
36b9ff75 81 //! Returns TRUE if the creation completed without failure.
42cf5bc1 82 Standard_Boolean IsDone() const;
83
36b9ff75 84 //! Returns TRUE when there is no solution to the problem.
42cf5bc1 85 Standard_Boolean IsEmpty() const;
86
36b9ff75 87 //! Returns the intersection point.
42cf5bc1 88 const IntSurf_PntOn2S& Point() const;
89
36b9ff75 90 //! Returns True if the surfaces are tangent at the
91 //! intersection point.
42cf5bc1 92 Standard_Boolean IsTangent() const;
93
36b9ff75 94 //! Returns the tangent at the intersection line.
42cf5bc1 95 const gp_Dir& Direction() const;
96
36b9ff75 97 //! Returns the tangent at the intersection line in the
98 //! parametric space of the first surface.
42cf5bc1 99 const gp_Dir2d& DirectionOnS1() const;
100
36b9ff75 101 //! Returns the tangent at the intersection line in the
102 //! parametric space of the second surface.
42cf5bc1 103 const gp_Dir2d& DirectionOnS2() const;
104
36b9ff75 105 //! return the math function which
106 //! is used to compute the intersection
42cf5bc1 107 IntWalk_TheFunctionOfTheInt2S& Function();
108
36b9ff75 109 //! return the intersection point which is
110 //! enable for changing.
42cf5bc1 111 IntSurf_PntOn2S& ChangePoint();
112
113
114
115
116protected:
117
118
119
120
121
122private:
123
124
125
126 Standard_Boolean done;
127 Standard_Boolean empty;
128 IntSurf_PntOn2S pint;
129 Standard_Boolean tangent;
130 gp_Dir d3d;
131 gp_Dir2d d2d1;
132 gp_Dir2d d2d2;
133 IntWalk_TheFunctionOfTheInt2S myZerParFunc;
134 Standard_Real tol;
135 Standard_Real ua0;
136 Standard_Real va0;
137 Standard_Real ua1;
138 Standard_Real va1;
139 Standard_Real ub0;
140 Standard_Real vb0;
141 Standard_Real ub1;
142 Standard_Real vb1;
143 Standard_Real ures1;
144 Standard_Real ures2;
145 Standard_Real vres1;
146 Standard_Real vres2;
147
148
149};
150
151#define ThePSurface Handle(Adaptor3d_HSurface)
152#define ThePSurface_hxx <Adaptor3d_HSurface.hxx>
153#define ThePSurfaceTool Adaptor3d_HSurfaceTool
154#define ThePSurfaceTool_hxx <Adaptor3d_HSurfaceTool.hxx>
155#define IntImp_TheFunction IntWalk_TheFunctionOfTheInt2S
156#define IntImp_TheFunction_hxx <IntWalk_TheFunctionOfTheInt2S.hxx>
157#define IntImp_Int2S IntWalk_TheInt2S
158#define IntImp_Int2S_hxx <IntWalk_TheInt2S.hxx>
159
160#include <IntImp_Int2S.lxx>
161
162#undef ThePSurface
163#undef ThePSurface_hxx
164#undef ThePSurfaceTool
165#undef ThePSurfaceTool_hxx
166#undef IntImp_TheFunction
167#undef IntImp_TheFunction_hxx
168#undef IntImp_Int2S
169#undef IntImp_Int2S_hxx
170
171
172
173
174#endif // _IntWalk_TheInt2S_HeaderFile