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
52 //! compute the solution point with the close point
53 Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox(const TColStd_Array1OfReal& Param, const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2, const Standard_Real TolTangency);
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());
63 //! inter.Perform(Param,rsnld);
65 Standard_EXPORT BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2, const Standard_Real TolTangency);
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)
72 Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld);
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)
79 Standard_EXPORT IntImp_ConstIsoparametric Perform (const TColStd_Array1OfReal& Param, math_FunctionSetRoot& Rsnld, const IntImp_ConstIsoparametric ChoixIso);
81 //! Returns TRUE if the creation completed without failure.
82 Standard_Boolean IsDone() const;
84 //! Returns TRUE when there is no solution to the problem.
85 Standard_Boolean IsEmpty() const;
87 //! Returns the intersection point.
88 const IntSurf_PntOn2S& Point() const;
90 //! Returns True if the surfaces are tangent at the
91 //! intersection point.
92 Standard_Boolean IsTangent() const;
94 //! Returns the tangent at the intersection line.
95 const gp_Dir& Direction() const;
97 //! Returns the tangent at the intersection line in the
98 //! parametric space of the first surface.
99 const gp_Dir2d& DirectionOnS1() const;
101 //! Returns the tangent at the intersection line in the
102 //! parametric space of the second surface.
103 const gp_Dir2d& DirectionOnS2() const;
105 //! return the math function which
106 //! is used to compute the intersection
107 BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox& Function();
109 //! return the intersection point which is
110 //! enable for changing.
111 IntSurf_PntOn2S& ChangePoint();
126 Standard_Boolean done;
127 Standard_Boolean empty;
128 IntSurf_PntOn2S pint;
129 Standard_Boolean tangent;
133 BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox myZerParFunc;
151 #define ThePSurface BRepAdaptor_Surface
152 #define ThePSurface_hxx <BRepAdaptor_Surface.hxx>
153 #define ThePSurfaceTool BRepApprox_SurfaceTool
154 #define ThePSurfaceTool_hxx <BRepApprox_SurfaceTool.hxx>
155 #define IntImp_TheFunction BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox
156 #define IntImp_TheFunction_hxx <BRepApprox_TheFunctionOfTheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx>
157 #define IntImp_Int2S BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox
158 #define IntImp_Int2S_hxx <BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox.hxx>
160 #include <IntImp_Int2S.lxx>
163 #undef ThePSurface_hxx
164 #undef ThePSurfaceTool
165 #undef ThePSurfaceTool_hxx
166 #undef IntImp_TheFunction
167 #undef IntImp_TheFunction_hxx
169 #undef IntImp_Int2S_hxx
174 #endif // _BRepApprox_TheInt2SOfThePrmPrmSvSurfacesOfApprox_HeaderFile