1 // Created on: 1995-06-06
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox_HeaderFile
18 #define _BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <IntSurf_PntOn2S.hxx>
27 #include <gp_Dir2d.hxx>
28 #include <BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx>
29 #include <Standard_Real.hxx>
30 #include <TColStd_Array1OfReal.hxx>
31 #include <IntImp_ConstIsoparametric.hxx>
32 class StdFail_NotDone;
33 class Standard_DomainError;
34 class Standard_ConstructionError;
35 class StdFail_UndefinedDerivative;
36 class BRepAdaptor_Surface;
37 class BRepApprox_SurfaceTool;
38 class BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox;
39 class math_FunctionSetRoot;
40 class IntSurf_PntOn2S;
46 class BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox
53 //! Raises Construction Error
54 Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox();
56 //! compute the solution point with the close point
57 Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox(const TColStd_Array1OfReal& Param, const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2, const Standard_Real TolTangency);
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());
67 //! inter.Perform(Param,rsnld);
69 Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2, const Standard_Real TolTangency);
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)
76 Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld);
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)
83 Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld, const IntImp_ConstIsoparametric ChoixIso);
85 //! Returns TRUE if the creation completed without failure.
86 Standard_Boolean IsDone() const;
88 //! Returns TRUE when there is no solution to the problem.
89 Standard_Boolean IsEmpty() const;
91 //! Returns the intersection point.
92 const IntSurf_PntOn2S& Point() const;
94 //! Returns True if the surfaces are tangent at the
95 //! intersection point.
96 Standard_Boolean IsTangent() const;
98 //! Returns the tangent at the intersection line.
99 const gp_Dir& Direction() const;
101 //! Returns the tangent at the intersection line in the
102 //! parametric space of the first surface.
103 const gp_Dir2d& DirectionOnS1() const;
105 //! Returns the tangent at the intersection line in the
106 //! parametric space of the second surface.
107 const gp_Dir2d& DirectionOnS2() const;
109 //! return the math function which
110 //! is used to compute the intersection
111 BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox& Function();
113 //! return the intersection point which is
114 //! enable for changing.
115 IntSurf_PntOn2S& ChangePoint();
130 Standard_Boolean done;
131 Standard_Boolean empty;
132 IntSurf_PntOn2S pint;
133 Standard_Boolean tangent;
137 BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox myZerParFunc;
155 #define ThePSurface BRepAdaptor_Surface
156 #define ThePSurface_hxx <BRepAdaptor_Surface.hxx>
157 #define ThePSurfaceTool BRepApprox_SurfaceTool
158 #define ThePSurfaceTool_hxx <BRepApprox_SurfaceTool.hxx>
159 #define IntImp_TheFunction BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox
160 #define IntImp_TheFunction_hxx <BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx>
161 #define IntImp_Int2S BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox
162 #define IntImp_Int2S_hxx <BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx>
164 #include <IntImp_Int2S.lxx>
167 #undef ThePSurface_hxx
168 #undef ThePSurfaceTool
169 #undef ThePSurfaceTool_hxx
170 #undef IntImp_TheFunction
171 #undef IntImp_TheFunction_hxx
173 #undef IntImp_Int2S_hxx
178 #endif // _BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox_HeaderFile